Randomly logo Randomly

Pi (π) digit generator

Generate the digits of π to as many decimal places as you like (up to 1000). Evaluated with Machin's arctangent formula and guard digits, so every digit is correct.

Max digits 1000 Method Machin

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.

A free pi digit generator that computes up to 1000 decimal digits of π directly in your browser. Uses Machin's arctangent formula with guard digits in exact BigInt arithmetic, so every digit displayed is correct. Paste the output into code, use it for memorization practice, or verify reference values.

How to generate digits of pi

  1. Set how many decimal digits you want (up to 1000).
  2. Click Generate — computation takes under a second.
  3. Click the output to copy all digits to your clipboard.

Machin's formula for computing π

Machin's formula (1706) states: π/4 = 4·arctan(1/5) - arctan(1/239). Each arctangent is expanded as a series: arctan(x) = x - x³/3 + x⁵/5 - … The small arguments (1/5 and 1/239) make the series converge rapidly. Computing with guard digits in exact BigInt integer arithmetic — scaling by a large power of 10 — means the result is rounded correctly to every decimal place you request, with no floating-point error.

Frequently asked questions

How many digits of pi can I generate?

Up to 1000 decimal digits. The computation uses Machin's formula in exact integer arithmetic, so all digits 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 was used to compute π by hand to 100 digits.

Are the digits accurate?

Yes. The generator uses BigInt arithmetic with guard digits to ensure every displayed digit is correctly rounded, with no floating-point rounding errors.

What are the first digits of pi?

3.14159265358979323846… The generator starts with 3. and lists the decimal digits that follow.

Other tools