How Is Pi Calculated?
You cannot measure your way to pi's true value — a tape measure runs out of digits long before pi does. So mathematicians found cleverer routes, each one squeezing out more decimals than the last.
Measuring circles (the ancient, hopeless way)
The oldest method is exactly what you would guess: wrap a string around a circle, measure the string, measure the diameter, and divide. Every ancient civilization that built wheels or laid out fields did some version of this, and every one of them landed near 3-and-a-bit. The trouble is precision. Real string stretches, real circles are lumpy, and the human eye can only read a ruler so finely. This approach gets you to 3.1, maybe 3.14 on a very good day, and then stops cold. Pi has infinitely many digits; a physical measurement has a handful. To go further, you have to stop measuring and start reasoning.
Archimedes' polygon method (~250 BCE)
The first real breakthrough came from Archimedes of Syracuse, and it is still one of the most beautiful ideas in mathematics. He didn't measure the circle — he trapped it. Draw a polygon inside a circle and another outside it. The circle's circumference must be longer than the inner polygon's perimeter and shorter than the outer one. Since you can calculate a polygon's perimeter exactly using geometry, you get a lower and upper bound on pi.
Then you add more sides. A hexagon is crude; a 12-gon is better; a 24-gon better still. Each doubling tightens the squeeze. Archimedes worked his way up to a 96-sided polygon — entirely by hand, without decimal notation — and proved that pi lies between 3.1408 and 3.1429, or in his fractions, between 223/71 and 22/7. That's pi correct to two decimal places, established with total logical certainty. This "method of exhaustion" ruled for the next 1,800 years; people just kept adding sides.
Infinite series (the modern engine)
The next leap arrived when mathematicians realized pi could be written as an infinite sum — a formula you keep adding to, getting closer with every term. The most famous is the Leibniz–Gregory series:
π/4 = 1 − 1/3 + 1/5 − 1/7 + 1/9 − 1/11 + …
It is stunningly elegant: just the odd numbers, alternating plus and minus. It is also agonizingly slow. To pin down even ten correct digits this way, you need billions of terms — the sum crawls toward pi at a glacial pace. Beautiful to look at, useless for records.
The fix was to be less pretty and more efficient. In 1706, John Machin found a formula built from arctangents that converges far faster:
π/4 = 4·arctan(1/5) − arctan(1/239)
Because arctangent series converge quickly when their input is small, Machin used his formula to compute 100 digits of pi by hand. "Machin-like formulas" became the workhorse of pi calculation for the next two centuries — Ludolph van Ceulen's earlier 35 hand-computed digits looked quaint by comparison.
Ramanujan and Chudnovsky (the record machines)
In 1914, the self-taught Indian genius Srinivasa Ramanujan produced series that converge with almost supernatural speed — each term adds several correct digits at once, where Leibniz added a fraction of one. Working in that same spirit, the Chudnovsky brothers published their formula in 1988. The Chudnovsky formula adds roughly 14 correct digits per term, and it is the algorithm behind essentially every modern world record. You don't need to memorize it, but its shape tells the story: a constant out front, and a fraction whose factorials grow fast enough to nail down fourteen decimals with every single step.
Spigot algorithms and the BBP surprise
In 1995, Bailey, Borwein, and Plouffe found something genuinely startling — the BBP formula, which can compute a specific hexadecimal digit of pi without calculating any of the digits before it. For 2,000 years everyone assumed you had to compute pi in order, digit by digit from the front. BBP proved you could reach in and grab, say, the trillionth digit directly. "Spigot" algorithms similarly drip out digits one at a time without storing the whole number.
How the records actually get set
Today's record-setters don't sharpen pencils — they run software called y-cruncher on machines with enormous memory and dozens of terabytes of disk, chewing through the Chudnovsky formula for months. The current records exceed 100 trillion digits. The bottleneck isn't the math anymore; it's storage, RAM bandwidth, and not crashing halfway through a 150-day run.
Calculate a few digits yourself
Want to feel pi appear out of arithmetic? Take the Leibniz series and add the first few terms: 1 − 1/3 + 1/5 − 1/7 ≈ 0.7238, and multiplying by 4 gives roughly 2.895. Add more terms and watch it wobble toward 3.14159…. It converges painfully slowly, which is exactly why mathematicians spent 300 years inventing better formulas. For a faster thrill, try Machin's formula on a calculator — a handful of arctangent terms and you'll have pi to a dozen places.