How this instrument works
Rather than storing π as a fixed looked-up constant, this page computes it directly from Machin's formula: π = 16·atan(1⁄5) − 4·atan(1⁄239). Discovered by the mathematician John Machin in 1706, this identity was, for roughly two centuries afterward, the fastest known way to calculate π by hand to many decimal places, since each of its two arctangent terms converges to its own value quickly.
The formula's cleverness lies in choosing two small, specific fractions (1⁄5 and 1⁄239) whose arctangents combine, with the right whole-number multipliers (16 and 4), to land exactly on π — a relationship following from the tangent addition formula run in reverse, verified by mathematicians long before electronic computation existed to check it numerically.
This page also accepts a multiplier k, scaling the result to any desired multiple of π — useful directly for angle conversions (2π is a full turn in radians, π⁄2 is a right angle), without needing a separate lookup for each one.
- Enter the multiple of π you want into the k field (1 for π itself).
- Read k × π: Machin's formula, computed directly and scaled by k.
- Try k=2 to get a full circle's radian measure, or k=0.5 for a right angle in radians.
Worked example — k=1, k=2, and k=0.5
With k=1, Machin's formula reproduces π itself to full floating-point precision, 3.14159265… — no lookup table involved, just two arctangent evaluations combined with simple whole-number multipliers.
With k=2, the same formula scaled up gives 2π≈6.283185307 — the full angle of one complete turn around a circle, measured in radians. With k=0.5, the formula gives π⁄2≈1.570796327 — a quarter turn, the radian measure of a right angle.
Questions
What is Machin's formula?
An identity discovered by John Machin in 1706, π = 16·atan(1⁄5) − 4·atan(1⁄239), that computes π directly from two arctangent evaluations — for roughly two centuries, the fastest known method for calculating π by hand to many decimal places.
Why use two arctangent terms instead of just one?
A single arctangent term alone doesn't land exactly on π; Machin found that two specific fractions, 1⁄5 and 1⁄239, combined with the right whole-number multipliers, do combine to π exactly, a relationship traceable back to the tangent addition formula.
How accurate is this calculator's result?
Accurate to full floating-point precision — Machin's formula, evaluated with ordinary double-precision arithmetic, reproduces π correctly to about 15 decimal digits, more than enough for virtually any practical calculation.
What is the multiplier k for?
It scales the result to any desired multiple of π directly — useful for common angle conversions like a full circle (2π) or a right angle (π⁄2), without needing a separate lookup for each one.
Are there other formulas for computing π this way?
Yes — Machin-like formulas of this same two-arctangent structure exist with different fraction and multiplier choices, and entirely different approaches (infinite series, iterative algorithms) have since overtaken Machin's formula for computing π to extreme numbers of digits.