Safekipedia
ApproximationsHistory of mathematicsPiPi algorithms

Approximations of pi

Adapted from Wikipedia · Discoverer experience

Animation showing how random points can help estimate the value of Pi using the Monte Carlo method.

Approximations for the mathematical constant pi (π) have been pursued throughout history, with early estimates already quite close to the true value. Before the beginning of the Common Era, approximations reached an accuracy within 0.04% of the actual value. In Chinese mathematics, this improved to about seven correct decimal digits by the 5th century.

Major progress occurred much later. In the 14th century, Madhava of Sangamagrama developed approximations correct to eleven and then thirteen digits. Jamshīd al-Kāshī achieved sixteen digits, and by the 17th century, mathematicians like Ludolph van Ceulen reached 35 digits. By the 19th century, Jurij Vega had extended this to 126 digits.

The most famous manual calculation was performed by William Shanks, who correctly computed 527 decimals of pi in 1853. In modern times, electronic digital computers have taken over this task. On December 11, 2025, the record was set by StorageReview with Alexander Yee's y-cruncher, achieving an astonishing 314 trillion (3.14×1014) digits.

Early history

The ancient world had many ways to estimate the value of pi (π), the ratio of a circle’s circumference to its diameter. Some of the earliest estimates came from ancient Egypt, where one method gave a value just under 3.16. In Babylon, people often simply used 3, though they knew this was not exact.

Later, in China, mathematicians made much better guesses. By around the year 263 CE, Liu Hui used shapes with many sides to get pi to about seven decimal places. Even more amazing, around the 5th century, another Chinese mathematician named Zu Chongzhi calculated pi to seven decimal places, a record that stood for a very long time.

Middle Ages

In the 14th century, the Indian mathematician Madhava of Sangamagrama made big steps in understanding pi (π). He created special mathematical tools that helped him calculate pi to 11 decimal places, which was a huge improvement at the time. He even found a way to get pi correct to 13 decimal places by using a clever trick in his calculations.

Other mathematicians followed Madhava’s work. For example, Bhaskara II in the 12th century used shapes with many sides to estimate pi, getting close to its value. Later, in the 15th century, Jamshīd al-Kāshī, a Persian astronomer and mathematician, used an even bigger shape with millions of sides to find pi to 16 decimal places. His work showed just how precise math could become during this time.

16th to 19th centuries

In the 1500s, a French mathematician named François Viète found a special way to get closer and closer to the value of pi using an infinite product, which we now call Viète's formula.

Later, in the early 1600s, a German-Dutch mathematician named Ludolph van Ceulen used a very-sided shape to calculate the first 35 decimal places of pi. He was so proud of this that he had these numbers put on his tombstone. Around the same time, Willebrord Snellius showed that using shapes with many sides could help find pi more quickly. This was later proven by Christiaan Huygens.

In 1656, John Wallis shared a new formula for pi, known as the Wallis product. Then, in 1706, John Machin used a clever math trick to find 100 digits of pi. Other mathematicians continued this work, finding even more digits over the next century.

By the mid-1800s, an amateur mathematician named William Shanks calculated pi to over 500 decimal places, though some of his later digits were not quite right due to small mistakes in his calculations.

20th and 21st centuries

Main article: Chronology of computation of pi § The age of electronic computers (from 1949 onwards)

In 1910, the Indian mathematician Srinivasa Ramanujan discovered several fast ways to calculate pi. His methods could find more digits of pi with each step. One of his formulas could get pi correct to seven decimal places just by using the first step.

From the mid-20th century on, all the improvements in calculating pi were made using calculators or computers. In 1962, a team led by Daniel Shanks calculated pi to over 100,000 decimal places. In 1989, the Chudnovsky brothers used a supercomputer to calculate pi to over 1 billion decimal places. Since then, records have been broken many times using their method.

Recent records

  1. In August 2009, a Japanese supercomputer calculated pi to about 2.6 trillion digits.
  2. In December 2009, Fabrice Bellard used a home computer to compute 2.7 trillion digits of pi.
  3. In August 2010, Shigeru Kondo used a home computer to calculate 5 trillion digits of pi.
  4. In October 2011, Kondo broke his own record by computing ten trillion digits of pi.
  5. In December 2013, Kondo broke his record again by computing 12.1 trillion digits of pi.
  6. In October 2014, Sandon Van Ness calculated 13.3 trillion digits of pi.
  7. In November 2016, Peter Trueb computed 22.4 trillion digits of pi.
  8. In March 2019, Emma Haruka Iwao, an employee at Google, computed 31.4 trillion digits of pi.
  9. In January 2020, Timothy Mullican announced the computation of 50 trillion digits of pi.
  10. On 14 August 2021, a team at the University of Applied Sciences of the Grisons announced completion of the computation of pi to 62.8 trillion digits.
  11. On 8 June 2022, Emma Haruka Iwao announced the computation of 100 trillion digits of pi.
  12. On 14 March 2024, Jordan Ranous, Kevin O’Brien and Brian Beeler computed pi to 105 trillion digits.
  13. On 28 June 2024, the StorageReview Team computed pi to 202 trillion digits.
  14. On 2 April 2025, Linus Media Group and Kioxia computed pi to 300 trillion digits.
  15. On 11 December 2025, the StorageReview Team computed pi to 314 trillion digits.

Practical approximations

Depending on what you need to calculate, π can be approximated using simple fractions. Two well-known examples are 22⁄7, which has a small error, and 355⁄113, which is much more precise. In Chinese mathematics, these fractions are called Yuelü (approximate ratio) and Milü (close ratio).

Non-mathematical "definitions" of π

Some old texts and laws tried to give simple numbers for the value of pi (π), which is the ratio of a circle’s circumference to its diameter. One famous example is the "Indiana Pi Bill" from 1897. This bill, nearly passed by the Indiana General Assembly, suggested a way to solve a geometry problem called "squaring the circle". It mentioned a value for pi of 3.2, which is not correct. A math professor helped stop the bill before it became a law.

The Hebrew Bible is sometimes said to use pi = 3. This comes from a description of a round bowl that is 10 cubits wide and 30 cubits around. Some thinkers, like Rabbi Nehemiah and Maimonides, explained this by saying the measurements were taken from different parts of the bowl’s edge. They believed this made the value close enough for religious use.

Development of efficient formulae

Numerical approximation of π: as points are randomly scattered inside the unit square, some fall within the unit circle. The fraction of points inside the circle approaches π/4 as points are added.

Archimedes developed the first method to calculate pi by comparing the perimeters of polygons inscribed in and circumscribed around a circle. Starting with hexagons, he showed how to double the number of sides repeatedly to get closer approximations.

Later mathematicians discovered faster ways to calculate pi using formulas involving angles and special functions. For example, Machin's formula allowed computers to calculate many digits of pi quickly. These methods build on the idea that pi can be expressed as sums or products involving trigonometric functions like arctangent, leading to very precise approximations with fewer steps.

rareaapproximation of π
2133.25
3293.22222
4493.0625
5813.24
103173.17
2012573.1425
100314173.1417
100031415493.141549

Digit extraction methods

The Bailey–Borwein–Plouffe formula (BBP) for calculating π was discovered in 1995 by Simon Plouffe. This special formula can find any single digit of π in the hexadecimal (base 16) system without needing to calculate all the digits before it. This is possible because the formula uses a spigot algorithm.

Later, in 1996, Plouffe created a way to find any specific decimal (base 10) digit of π faster than before. This method does not need to store all the digits up to that point, meaning, in theory, even a very far-off digit like the one-millionth could be found with a basic calculator — though it would take a very long time.

Another mathematician, Fabrice Bellard, improved the speed of these calculations even more with a new formula, though it works only with binary (base 2) numbers.

Efficient methods

Many clever ways to calculate pi have been discovered over time. The Indian mathematician Srinivasa Ramanujan worked with Godfrey Harold Hardy in England and created several smart formulas for pi.

Today, scientists use computers with special methods to find pi to many decimal places. One common method is the Gauss–Legendre algorithm, and another is Borwein's algorithm. In 1997, David H. Bailey, Peter Borwein, and Simon Plouffe found a neat way to pick out single digits of pi without having to calculate all the digits before it. Later, Fabrice Bellard made this idea even better. These methods help us learn more about the number pi and are used in many computer programs.

AlgorithmYearTime complexity or Speed
Gauss–Legendre algorithm1975O ( M ( n ) log ⁡ ( n ) ) {\displaystyle O(M(n)\log(n))}
Chudnovsky algorithm1988O ( n log ⁡ ( n ) 3 ) {\displaystyle O(n\log(n)^{3})}
Binary splitting of the arctan series in Machin's formulaO ( M ( n ) ( log ⁡ n ) 2 ) {\displaystyle O(M(n)(\log n)^{2})}
Leibniz formula for π1300sSublinear convergence. Five billion terms for 10 correct decimal places

Projects

Pi Hex

Pi Hex was a project that used many computers together to find three specific binary digits of π. In 2000, after two years of work, the project found the five trillionth, the forty trillionth, and the quadrillionth digits. All three of these digits were 0.

Software for calculating π

Over the years, many programs have been created to calculate π to many digits on personal computers. Most computer algebra systems can calculate π and other common mathematical constants to any level of detail you want.

Some programs are made just for calculating π and can work faster than general tools. These programs help computers handle very long and memory-heavy calculations. Examples include TachusPi by Fabrice Bellard, which set a world record in 2009, and y-cruncher by Alexander Yee, used by every record holder since 2010 to compute world record numbers of digits. Other tools like PiFast by Xavier Gourdon and Super PI by Kanada Laboratory are also popular for calculating π efficiently.

This article is a child-friendly adaptation of the Wikipedia article on Approximations of pi, available under CC BY-SA 4.0.

Images from Wikimedia Commons. Tap any image to view credits and license.