
Who was the first person to calculate pi? The first person to realise that, hang on, when you divide the circumference of a circle by its diameter, you always seem to get the same number, namely slightly more than 3? We will never know exactly, of course, but it is a reasonable assumption that they lived about 4000 years ago.
Letâs start with the ancient Egyptians. A papyrus dated to around 1550 BC, which appears to be a maths textbook of sorts, give examples for 84 mathematical problems. Known by modern scholars as the , its author, a scribe named Ahmose, gave it the brilliant title Directions for Knowing All Dark Things.
Problem 48 explains how to calculate the area of a circle within a square. Assuming the square has sides of length 9, and the circleâs diameter is the same, it demonstrates that the area of the circle should be 64/81ths that of the square. Given the square has an area of 81, that makes the area of the circle 64. This is not a direct calculation of pi, but if we plug it into our modern formula for the area of a circle â ÏrÂČ, where the radius (r) is half the diameter, or 9/2 in this case â we get Ï = 256/81 or 3.16, which is correct to one decimal place. Not bad.
Advertisement
Ahmose doesnât appear to have come up with the problems himself; the document states it is a copy from a text originating from centuries earlier. We have found similar, though not identical, estimates in artefacts from the ancient Babylonians and Sumerians, but it seems that such calculations were not universal â the Hebrew Bible, and in turn the Christian Old Testament, as being 10 cubits wide and having a perimeter of 30 cubits, suggesting a value of 3 for pi. Well, itâs a start.
It wasnât until Archimedes, who lived in the 3rd century BC, that we started to improve our measurement of pi. While Ahmose placed a circle inside a square to calculate pi, Archimedes took a more sophisticated approach. He put his circle within a hexagon, and then a smaller hexagon within the circle. By calculating the perimeters of the two hexagons, he could place an upper and lower bound on the perimeter of the circle, and so come up with a minimum and maximum value for pi.
But here is the clever bit â Archimedes didnât stop with hexagons. He did the same trick with dodecagons, or 12-sided polygons, then moved to 24-sided, 48-sided and finally 96-sided shapes. Each doubling of the number of sides brought the polygons closer to approximating a circle, ultimately giving a value of pi between 223/71 and 22/7, or 3.1408 and 3.1429. Now we had two decimal places of pi â and you may recognise 22/7 as a common approximation for its value that is still used today.
For about 1500 years, Archimedesâs method was the only game in town, though people did manage to increase the accuracy of estimates for pi. These include the Chinese mathematician Zu Chongzhi, who in the 5th century AD used a 24,576-sided polygon to approximate pi between 3.1415926 and 3.1415927, and Jamshid al-Kashi, a Persian mathematician who in 1424 calculated pi to 16 decimal places using a polygon with over 800 million sides. Al-Kashiâs aim at the time was to be able to calculate the circumference of the celestial sphere (essentially, the known universe at the time) with an error no greater than that of the width of a single horsehair.
Histories of mathematics will often skip straight from Archimedes to the 17th-century invention of calculus, by Isaac Newton and Gottfried Leibniz, as the next step on the path to pi, but one important development came earlier. The 14th-century Indian mathematician MÄdhava of SangamagrÄma was the first to express trigonometric functions â like cosine and sine, which you may know as tools for calculating angles in a triangle â as infinite sums. This allowed him to calculate their value step by step, with ever-increasing accuracy, by computing the next term in the series.
One of these sums, now sometimes known as the MÄdhava-Leibniz series due to their independent discoveries, says that Ï/4 = 1 â 1/3 + 1/5 â 1/7 + 1/9⊠and so on for infinity. This series converges on pi, but incredibly slowly â reaching four decimal places requires adding 5000 terms, while 10 decimal places a grinding 5 billion. Thankfully, MÄdhava developed alternative infinite sums that worked much faster, computing pi to 11 decimal places â a record until al-Kashi beat it.
The pen-and-paper exploration of pi continued for the next few centuries. One attempt worth noting is that of German mathematician Ludolph van Ceulen, who spent most of his life on the problem. He calculated pi to 20 decimal places in 1596, using Archimedesâs method with a polygon of more than 32 billion sides, and in 1621, after his death, his wife published details of his 35-decimal calculation using a polygon of more than 4 quintillion sides. This value was also inscribed on his tombstone.
Not long after, it became clear that calculus really was the way forward, allowing for the creation of all sorts of infinite sums to approximate pi. In 1666, Newton came up with one and used it to calculate pi to 15 decimal places, later writing, âI am ashamed to tell you to how many figures I carried these computations, having no other business at the time.â
English mathematician John Machin became the first to break the 100-decimal barrier in 1706, using a sum of his own creation. After that, these infinite sum-based calculations were increasingly error-prone â French mathematician Thomas Fantet de Lagny published 127 decimal places in 1719, using a similar method to Machinâs, but it turned out only the first 112 were correct. The record then crept up to 126 in 1789 and 152 in 1841, once errors had been stripped out.
William Shanks, an amateur English mathematician, was the last of the pencil-pushers to wring juice from Machinâs formula. Shanks ran a boarding school but devoted his leisure time to calculation. In 1853 he published 530 decimal places of pi, although the last three were wrong. He then extended this to 707 decimal places by 1873. Unfortunately, he hadnât picked up on his earlier error, meaning that most of the extra digits were also wrong.
Nevertheless, Shanksâs 527-decimal record would not be beaten until the invention of the computer â well, almost. In 1946, a D. F. Ferguson to point out the errors in Shanksâs calculations. This led to a flurry of papers from Ferguson in the thrillingly titled journal Mathematical Tables and Other Aids to Computation in which he and John W. Wrench, Jr used a mechanical calculator â a proto-computer, if you will â to calculate the correct values, eventually .
The first calculation of pi on a true modern computer was performed using literally the first one ever made â the Electronic Numerical Integrator and Computer, or ENIAC. (Exactly why it qualifies as the first modern computer is an entirely separate article, so please just take my word for it!)
Built in 1945 by the US Army, ENIAC was used for a number of sober tasks, including calculating the effects of thermonuclear weapon. But in 1949, a team lead by renowned polymath John von Neumann got . Their efforts, executed over 70 hours of the extended Labor Day weekend (when the computer would otherwise not be used), hit 2037 decimal places.
As computers progressed, they continued to break records â 100,000, 1 million, 10 million â Ìębut, until the 1970s, they all used variants of Machinâs method.
The late 20th century saw a flurry of new formulas developed, each using more complex infinite sums than Machin, and many were inspired by an infinite sum dreamt up by the legendary Indian mathematician Srinivasa Ramanujan in 1910. Ramanujanâs approach to mathematics was unorthodox â his results, while usually correct, werenât always rigorously proven â and it seems that his formula was forgotten for decades. There are also no records of him ever actually using it to calculate any digits of pi, which might have contributed to it being overlooked.
Once mathematicians unearthed his work, however, it turbocharged the hunt for pi. Of particular note is a Ramanujan-inspired method created in 1988 by two brothers, Gregory and David Chudnovsky, who were the first to reach 1 billion decimal places.
The pairâs method is still used today; the most recent record was set in June 2024 by StorageReview, a computer hardware testing publication. The team says it using a computer that had 28 solid state drives, each with a storage capacity of over 60 terabytes (TB) â the average computer now has a single drive of about 1 TB. The calculation took 85 days in total.
At this point, you might reasonably be wondering how much more pi anyone could need. There are a few schools of thought. For any practical calculation, al-Kashi was not too far off the mark with his 16 decimal places, as slightly more than twice that â 37 decimal places â turns out to be enough to calculate the circumference of the observable universe with an accuracy equivalent to the width of a hydrogen atom.
But as StorageReviewâs attempt demonstrates, calculating pi has taken on another purpose: acting as a kind of marathon number-crunch to put computing hardware through its paces. With that in mind, there is potentially no limit to the number of decimal places you might meaningfully calculate.
And yet there is another view. I asked at the beginning of this article who the first person to calculate pi was. In a sense, the answer is no one, because it has never been done. Pi is an irrational number, meaning it cannot be expressed as the ratio of two integers, which is why 22/7 can only ever be an approximation. It is also a transcendental number, meaning it canât be expressed as a finite algebraic equation. This means that pi is inherently infinite, its decimal places never-ending, and we can never fully calculate the true value of pi.
Ìę