Safekipedia
ApproximationsHistory of mathematicsPiPi algorithms

Approximations of pi

Adapted from Wikipedia · Adventurer 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 made for a very long time. Early guesses were already quite close to the real value.

Before the beginning of the Common Era, people were within 0.04% of the true value. In Chinese mathematics, this got even better to about seven correct decimal places by the 5th century.

Later, big steps happened. In the 14th century, Madhava of Sangamagrama made approximations correct to eleven and then thirteen digits. Jamshīd al-Kāshī got to 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 hand calculation was done by William Shanks, who correctly computed 527 decimals of pi in 1853. Today, computers do this work. On December 11, 2025, the record was set by StorageReview with Alexander Yee's y-cruncher, achieving an amazing 314 trillion (3.14×1014) digits.

Early history

The ancient world had many ways to guess the value of pi (π), the ratio of a circle’s circumference to its diameter. Some of the first guesses came from ancient Egypt, where one way gave a value just under 3.16. In Babylon, people often just used 3, even 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. This was a record that lasted a very long time.

Middle Ages

In the 14th century, the Indian mathematician Madhava of Sangamagrama helped people understand pi (π) better. He used special math tools to calculate pi to 11 decimal places, which was a big improvement at the time. He also found a clever way to get pi correct to 13 decimal places.

Other mathematicians built on Madhava’s work. For example, Bhaskara II in the 12th century used shapes with many sides to estimate pi. 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 how precise math could be 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 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. Some of his later digits were not quite right because of 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 found quick ways to calculate pi. His methods could show more digits of pi with each step. One of his formulas could get pi right to seven decimal places in just 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

You can estimate π using simple fractions for easier calculations. Two common examples are 22⁄7, which is not perfect but close, and 355⁄113, which is even more accurate. In Chinese math, these 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 (π). Pi 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 found the first way to calculate pi. He used shapes called polygons inside and outside a circle. He started with hexagons and then used shapes with more sides to get closer to the value of pi.

Later mathematicians found quicker ways to calculate pi. They used special math rules and angles. For example, Machin's formula helped computers find many digits of pi fast. These new methods use trigonometric functions like arctangent to find pi more precisely 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.

Later, in 1996, Plouffe made 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.

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 special 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 π

Many programs can calculate π to many digits on personal computers. Most computer algebra systems can find π and other common mathematical constants with as much detail as you need.

Some programs are made just for calculating π and can work faster than general tools. These help computers do very long calculations. Examples include TachusPi by Fabrice Bellard and y-cruncher by Alexander Yee. Other tools like PiFast and Super PI 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.