What is pi to many decimal places?
Type how many decimal places of pi you want. The pi calculator shows π cut off and rounded at that place, and the digit there. Switch to the Leibniz series to see how a sum of fractions approaches π.
- π
- 3.1415926535
π = 3.1415926535
- Rounded
- 3.1415926536
- Digit at that place
- 5
π: 3.1415926535. π = 3.1415926535
How to calculate
Gives π (pi) to any number of decimal places up to 1,000 with Machin’s formula, the digit at any place, and the Leibniz series approximation of π to n terms with its error.
Example with the default inputs (Show Digits of π, Decimal places 10): π = 3.1415926535
Method: π = 16 arctan(1/5) − 4 arctan(1/239) (Machin), with arctan x = x − x³/3 + x⁵/5 − …; Leibniz: π ≈ 4 × (1 − 1/3 + 1/5 − … ± 1/(2n − 1)).
- Digits are cut off (not rounded) after the places you ask for; the rounded value is shown too.
- Machin’s series is summed in whole numbers with 10 extra digits, so every digit shown up to 1,000 places is correct.
Worked examples
Each example is checked against the calculator on every build.
- Show Digits of π, Decimal places 10 gives π 3.1415926535, Rounded 3.1415926536, Digit at that place 5.Source: Wolfram MathWorld, Machin's Formula (π/4 = 4 arctan(1/5) − arctan(1/239)). https://mathworld.wolfram.com/MachinsFormula.html
- Show Digits of π, Decimal places 50 gives π 3.1415926535 8979323846 2643383279 5028841971 6939937510, Digit at that place 0, Rounded 3.1415926535 8979323846 2643383279 5028841971 6939937511.Source: Wolfram MathWorld, Machin's Formula (π/4 = 4 arctan(1/5) − arctan(1/239)). https://mathworld.wolfram.com/MachinsFormula.html
- Show Digits of π, Decimal places 2 gives π 3.14, Rounded 3.14, Digit at that place 4.Source: Wolfram MathWorld, Machin's Formula (π/4 = 4 arctan(1/5) − arctan(1/239)). https://mathworld.wolfram.com/MachinsFormula.html
- Show Leibniz series, Terms 4 gives Series sum 2.895238, Error (sum − π) -0.246355.Source: OpenStax, Calculus Volume 2, §6.4 Working with Taylor Series, Table 6.1 (arctan x = Σ (−1)ⁿ x²ⁿ⁺¹ ÷ (2n + 1) for −1 ≤ x ≤ 1). https://openstax.org/books/calculus-volume-2/pages/6-4-working-with-taylor-series (arctan 1 = π/4)
- Show Leibniz series, Terms 1,000 gives Series sum 3.140593.Source: OpenStax, Calculus Volume 2, §6.4 Working with Taylor Series, Table 6.1 (arctan x = Σ (−1)ⁿ x²ⁿ⁺¹ ÷ (2n + 1) for −1 ≤ x ≤ 1). https://openstax.org/books/calculus-volume-2/pages/6-4-working-with-taylor-series
How it works
Digits of π (1 to 1,000 decimal places n):
- arctan x = x − x³/3 + x⁵/5 − x⁷/7 + … (the Maclaurin series, OpenStax Table 6.1).
- Machin's formula: π = 16 arctan(1/5) − 4 arctan(1/239).
- The series is summed in whole numbers scaled by 10^(n + 10): each power of 1/x is cut to a whole number, then divided by 2k + 1 and cut again, until a term is 0. The 10 extra digits absorb the cut-off error, so the first n decimals are correct.
- π (cut off) = the first n decimals after "3.", in groups of 10.
- Rounded = the same digits rounded half up at place n, using digit n + 1.
- Digit at that place = the nth decimal digit.
Leibniz series (1 to 1,000,000 terms n): π ≈ 4 × Σ (−1)ᵏ ÷ (2k + 1) for k = 0 to n − 1, summed from the smallest term up with compensated (Kahan) summation in double precision. Error = sum − π (π as the double 3.141592653589793). The error is never more than the first term left out, 4 ÷ (2n + 1). The sum shows to 15 significant figures and the error to 6.
Worked examples by hand
10 places. 3.14159265358979… cut after 10 places is 3.1415926535; the 11th digit is 8, so rounded it is 3.1415926536; the 10th digit is 5.
50 places. 3.1415926535 8979323846 2643383279 5028841971 6939937510; the 51st digit is 5, so the rounded value ends in …37511; the 50th digit is 0.
2 places. 3.14, the 3rd digit is 1, so rounded is also 3.14; the 2nd digit is 4.
Leibniz, 4 terms. 4 × (1 − 1/3 + 1/5 − 1/7) = 4 × 76/105 = 304/105 = 2.895238; error 2.895238 − 3.141593 = −0.246355.
Leibniz, 1,000 terms. The sum is 3.14059265384, about 0.001 below π (the first term left out is 4/2001 ≈ 0.002).
Other questions people ask
What is pi to 10 decimal places?
π = 3.1415926535 cut off after 10 places, or 3.1415926536 rounded. The 10th decimal digit is 5.
How is pi calculated?
Modern methods add up fast series. This page uses Machin’s formula, π = 16 arctan(1/5) − 4 arctan(1/239), with the series arctan x = x − x³/3 + x⁵/5 − … . Each term adds about 1.4 correct digits for 1/5.
What is the Leibniz series for pi?
Put x = 1 in the arctangent series: π/4 = 1 − 1/3 + 1/5 − 1/7 + … . It is easy to write but slow: 1,000 terms give 3.14059, still wrong in the third decimal place.
Is 22/7 equal to pi?
No. 22/7 = 3.142857…, which is about 0.00126 more than π. It is a handy estimate; π is irrational, so no fraction equals it.
What is the 100th digit of pi?
Set the decimal places to 100: the digit at that place is 9. The page shows the digit at any place up to 1,000.
Why are there two values, cut off and rounded?
Lists of the digits of pi cut off after a place, while a value you calculate with is usually rounded. They differ when the next digit is 5 or more: π to 4 places is 3.1415 cut off and 3.1416 rounded.