Math and trigonometry functions

PI

Matches all 15 recorded answers

Recorded: 1 in the answer bank and 14 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicPI
BulgarianPI
CzechPI
DanishPI
GermanPI
GreekPI
English (Australia)PI
English (United Kingdom)PI
English (United States)PI
SpanishPI
EstonianPI
FinnishPII
FrenchPI
HebrewPI
CroatianPI
HungarianPI
IndonesianPI
ItalianPI.GRECO
JapanesePI
KoreanPI
LithuanianPI
LatvianPI
NorwegianPI
DutchPI
PolishPI
Portuguese (Brazil)PI
Portuguese (Portugal)PI
RomanianPI
RussianПИ
SlovakPI
SlovenianPI
Serbian (Latin)PI
SwedishPI
ThaiPI
TurkishPİ
UkrainianPI
VietnamesePI
Chinese (Simplified)PI
Chinese (Hong Kong)PI
Chinese (Traditional)PI

Names from Microsoft's support site.

What it does

PI()

PI() returns Excel's floating-point approximation to π, the ratio of a circle's circumference to its diameter. It takes no arguments. Use PI()*radius^2 for a circle's area and 2*PI()*radius for its circumference when ordinary floating-point arithmetic is appropriate.

In the recorded Excel 16.0.20527.20088 capture, the returned binary64 is 0x400921fb54442d18, approximately 3.141592653589793. This is the nearest binary64 value to π; it is still a finite approximation to an irrational number.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Calculate =PI() to see the decimal and raw binary64 bits. Compare =PI()-3.14159265358979 to see why a decimal copied from a documentation display is not the same stored constant.

Quirks

Microsoft's description gives π to fifteen significant decimal digits. Parsing that shorter decimal, 3.14159265358979, produces binary64 0x400921fb54442d11, seven representable steps below the recorded PI result. The description is not an instruction to store that truncated string.

Identities involving exact π need not hold exactly when evaluated with a rounded constant and rounded arithmetic. Multiplying or dividing this normal binary64 constant by 2 is exact in binary arithmetic; dividing by 3 or 180 generally introduces another rounding.

The order of operations also matters: x*PI()/180 and x*(PI()/180) round at different places. Their mathematical equality does not imply identical numeric results.

How to implement

For the recorded constant, construct binary64 from the 64-bit pattern 0x400921fb54442d18 or the equivalent hexadecimal floating-point literal 0x1.921fb54442d18p+1. Return a numeric value and reject an argument-bearing call at the formula boundary. Computing π through a platform inverse-trigonometric function adds an unnecessary dependency on that function's rounding.

Keep a worksheet PI constant separate from a high-precision constant used inside trigonometric argument reduction. Reducing a large angle with only a rounded binary64 π loses information; many-word reduction methods address a different problem from returning this worksheet constant.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

PI · 1 lines · calc-func/src/catalogue/math.rs on GitHub
24 pi "PI" (0, 0) [] |s, a, sv| { s.number(std::f64::consts::PI) }

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, CPU not recorded1

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0.20527.20088

Windows (64-bit) NT 10.00, AMD Ryzen 7 4800H with Radeon Graphics, en-ZA

The formulas below were read directly from Excel in the named capture. These rows do not establish behaviour on other builds or on unmeasured inputs.

Observed formulas and results
  • =PI() → 3.141592653589793
    0x400921fb54442d18 (formula-literal)
  • =PI() → 3.141592653589793
    0x400921fb54442d18 (formula-literal)

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

1 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

RADIANS and DEGREES convert angle units; they have their own arithmetic and rounding order. SQRTPI computes a function involving π. Use a higher-precision representation when the surrounding calculation needs more precision than binary64 can retain.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents