Study and Productivity

The Digits of Pi: How They Are Computed and What They Hide

How the digits of pi are calculated with Machin's formula, where famous sequences like the Feynman point appear, digit frequencies and tips for memorising.

Saizul Amin
Saizul Amin30 Oct 2026 · 3 min read
The Digits of Pi: How They Are Computed and What They Hide

The Digits of Pi: How They Are Computed and What They Hide

Pi, the ratio of a circle's circumference to its diameter, begins 3.14159 and continues forever without repeating. People celebrate it on 14 March, memorise thousands of its digits and search it for birthdays. This guide explains how the digits are actually computed, what patterns they show and how to explore them with the pi digits explorer.

Why pi never ends

In 1761 Johann Lambert proved that π is irrational: it cannot be written as a fraction, so its decimal expansion never ends or repeats. In 1882 Ferdinand von Lindemann proved it is transcendental: it is not the root of any polynomial with integer coefficients, which settled the ancient problem of squaring the circle (it is impossible with ruler and compass).

Early approximations

  • The Babylonians used 3⅛ = 3.125.
  • Archimedes, with 96-sided polygons, showed 223/71 < π < 22/7.
  • Zu Chongzhi in 5th-century China found 355/113 = 3.1415929, correct to six decimals.

Machin's formula

In 1706 John Machin discovered:

π = 16 arctan(1/5) − 4 arctan(1/239).

Each arctangent is computed with the series arctan(x) = x − x³/3 + x⁵/5 − …, which converges quickly for small x. Machin computed 100 digits by hand. The explorer uses the same formula with exact big-integer arithmetic: all numbers are integers scaled by a large power of ten, with a few guard digits so rounding never affects the result. That is how it computes up to 10,000 digits in your browser.

Modern records

Modern computations use faster formulas, such as those of the Chudnovsky brothers, which add about 14 digits per term. Records now exceed one hundred trillion digits. These computations test computer hardware and algorithms more than they serve any practical need.

How many digits do we need?

  • NASA's Jet Propulsion Laboratory uses about 15 decimals for interplanetary navigation.
  • 39 or 40 decimals are enough to compute the circumference of the observable universe to within the width of a hydrogen atom.
  • For engineering, 3.14159 is usually more than enough.

Patterns and the Feynman point

The digits look random. At decimal 762 there are six consecutive 9s, the "Feynman point", named after the physicist who joked he would like to recite π up to there and then say "nine nine nine nine nine nine and so on".

Is your birthday in pi?

With a random-looking sequence, any 4-digit string is expected about once every 10,000 digits, so most 4-digit years appear in the first 10,000 decimals. A 6-digit date like 140385 is expected only once in about a million digits, so most are not in the first 10,000. Try yours.

Digit frequencies

In the first 10,000 decimals each digit appears close to 1,000 times. Mathematicians conjecture that π is normal, meaning every finite sequence appears with exactly the expected frequency in the long run, but nobody has proved it.

Memorising pi

  • Learn digits in groups of 5 or 10.
  • Use a "piem", where word lengths give the digits: "How I wish I could calculate pi" gives 3.141592.
  • Use the memory palace technique: place images for digit groups along a familiar route.

Using the explorer

  1. Enter how many digits to display, up to 10,000.
  2. Enter a sequence to search.
  3. Read the digits in blocks of 50 with their positions.
  4. See where your sequence first appears and how often each digit occurs.

Limits

The explorer shows up to 10,000 decimals. Positions are counted after the decimal point, so the first "1" is position 1.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages