# What is pi to many decimal places?

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.

- Page: https://www.acalculator.org/math/pi-calculator
- JSON spec: https://www.acalculator.org/math/pi-calculator.json
- Version: 94f50cd64679

## Default answer

Example with the default inputs (Show Digits of π, Decimal places 10): π = 3.1415926535

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| show | Show | π to a number of decimal places, or the Leibniz series approximation. |
| n | Decimal places | How many digits after the decimal point, from 1 to 1,000. |
| terms | Terms | How many terms of the Leibniz series to add, from 1 to 1,000,000. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| value | π | π cut off after the decimal places asked for (digits mode), or the series sum (series mode). |
| rounded | Rounded | π rounded half up to the decimal places asked for. |
| digit | Digit at that place | The last decimal digit shown: the digit at the place asked for. |
| approx | Series sum | 4 × (1 − 1/3 + 1/5 − 1/7 + …) to the number of terms. |
| error | Error (sum − π) | How far the series sum is from π. |

## 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)).

## Assumptions

- 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

1. show = digits, n = 10 gives value = 3.1415926535, rounded = 3.1415926536, digit = 5. Source: Wolfram MathWorld, Machin's Formula (π/4 = 4 arctan(1/5) − arctan(1/239)). https://mathworld.wolfram.com/MachinsFormula.html.
2. show = digits, n = 50 gives value = 3.1415926535 8979323846 2643383279 5028841971 6939937510, digit = 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.
3. show = digits, n = 2 gives value = 3.14, rounded = 3.14, digit = 4. Source: Wolfram MathWorld, Machin's Formula (π/4 = 4 arctan(1/5) − arctan(1/239)). https://mathworld.wolfram.com/MachinsFormula.html.
4. show = leibniz, terms = 4 gives approx = 2.895238, error = -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).
5. show = leibniz, terms = 1,000 gives approx = 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.

## FAQ

### 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.

## Sources

- OpenStax, Calculus Volume 2, §6.4 Working with Taylor Series, Table 6.1 (the Maclaurin series of arctan x, for −1 ≤ x ≤ 1). https://openstax.org/books/calculus-volume-2/pages/6-4-working-with-taylor-series (retrieved 2026-10-02)
- Wolfram MathWorld, Machin's Formula (π/4 = 4 arctan(1/5) − arctan(1/239)). https://mathworld.wolfram.com/MachinsFormula.html (retrieved 2026-10-02)
- Python 3 documentation, decimal — Decimal fixed-point and floating-point arithmetic, Recipes, pi() (an independent check of the digits). https://docs.python.org/3/library/decimal.html (retrieved 2026-10-02)
