Pi (π) digit generator
Get π to anywhere from 10 to 1000 decimal places, worked out with Machin's arctangent formula and 10 guard digits so every digit shown is correct.
Output · π to 100 places
Readyπ is the ratio of a circle's circumference to its diameter — an irrational number whose digits never repeat. This tool evaluates π = 16·arctan(1/5) − 4·arctan(1/239) with guard digits, so every shown digit is correct.
- Max digits
- 1,000
- Method
- Machin
Related tools
This pi digit generator works out π in your browser to anywhere from 10 to 1000 decimal places. It uses Machin's arctangent formula with exact BigInt integers, so there's no floating-point drift and every digit it shows is correct. Copy the result for code, memorization practice, or checking a reference value.
How to generate digits of pi
- Drag the Decimal places slider. It moves in steps of 10, from 10 to 1000.
- The digits update as you drag. There's no button to press.
- Click the digits, or the Copy π button, to copy them.
Machin's formula for computing π
Machin's formula (1706) says π/4 = 4·arctan(1/5) - arctan(1/239). Each arctangent expands into the series x - x³/3 + x⁵/5 - …, and because 1/5 and 1/239 are small, the terms shrink fast. The tool scales everything by 10 to the power of your digit count plus 10, works in whole numbers, then drops the 10 extra guard digits. The last digit is cut off rather than rounded, which is how tables of π digits are normally written.
Frequently asked questions
How many digits of pi can I generate?
Up to 1000 decimal places, in steps of 10. The math is done in exact integers, so all of them are correct.
What is Machin's formula?
A formula from 1706: π/4 = 4·arctan(1/5) - arctan(1/239). It converges much faster than the basic Leibniz series, and John Machin used it to calculate π to 100 digits by hand.
Are the digits accurate?
Yes. The 10 guard digits soak up the small errors from the series, and the result is truncated rather than rounded, so each digit shown is a true digit of π.
What are the first digits of pi?
3.14159265358979323846… The output starts with 3. and then lists the decimal digits.
Built and maintained by Bipul Kumar. Found a wrong number or a broken result? Tell me and I'll fix it.