Machin's Computation of Pi

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Around 1706, John Machin found the arc tangent formula .


He expanded it using Gregory's series to compute to over 100 digits. The convergence of this series is much more rapid than that for the simple Gregory–Leibniz series: .

Let and be the series for and . Manchin's formula is then .

Split and into four series according to the signs of their coefficients:





Machin used values truncated to 103 decimals, which means that only terms greater than are calculated.

To make sure that all terms of and with indices are less than , it is necessary that . For , this means .


Contributed by: Izidor Hafner (May 2016)
Open content licensed under CC BY-NC-SA



Let , be an arc of radius 1, and be perpendicular to , , , and . Construct points and on the arc , and and on the straight line , so that and .

Then and , .

So , .

See [1, pp. 8–9].


[1] V. F. Rickey. "Machin's Formula for Computing Pi." (Apr 28, 2016)

[2] MacTutor. "John Machin." (Apr 28, 2016)

[3] Wikipedia. "John Machin." (Apr 28, 2016)

[4] W. W. Rouse Ball, H. S. M. Coxeter, Mathematical Recreations and Essays, 13th ed., New York: Dover Publications, 1987 p. 356.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.