Skip to content

The mathematics of π: what pi is and why it never ends

Pi (π) is the ratio of any circle’s circumference to its diameter — about 3.14159. It is one of the most important numbers in mathematics: it shows up in geometry, waves, probability, physics and astronomy, and its decimal digits go on forever without repeating. This guide explains what pi is, the formulas that use it, why it is irrational, and how mathematicians calculate it.

What is pi?

Take any circle — a coin, a wheel, the orbit of a satellite — and divide the distance around it (its circumference) by the distance across it (its diameter). The answer is always the same number:

π = C ÷ d ≈ 3.14159265358979…C is the circumference and d the diameter of any circle.

That ratio does not depend on the size of the circle, which is what makes pi a mathematical constant. The value of pi is a little more than 3: rounded, it is 3.14 to two decimal places and 3.14159 to five. Simple fractions such as 22/7 (3.142857…) and 355/113 (3.1415929…) are useful approximations, but neither is exactly pi.

The Greek letter π was first used for this number by the Welsh mathematician William Jones in 1706, and it became standard after Leonhard Euler adopted it. It is usually explained as the first letter of the Greek words for “periphery” and “perimeter”.

Pi in geometry: the circle formulas

Because pi links a circle’s size to its boundary, it appears in every formula for round shapes. These are the ones most people need:

Common formulas that use pi (r = radius, d = diameter, h = height)
MeasurementFormula
Circumference of a circleC = πd = 2πr
Area of a circleA = πr²
Surface area of a sphereA = 4πr²
Volume of a sphereV = (4/3)πr³
Volume of a cylinderV = πr²h
Volume of a coneV = (1/3)πr²h
Angle of a full turn360° = 2π radians

For example, a pizza 30 cm across has a radius of 15 cm, so its area is π × 15² ≈ 707 cm². A bicycle wheel with a 70 cm diameter travels π × 70 ≈ 220 cm every time it turns once.

The last row matters more than it looks. Mathematicians measure angles in radians, where a full circle is 2π and a half turn is π. That is why pi appears in trigonometry, and through trigonometry in almost anything that rotates, repeats or vibrates.

Why pi is irrational — and transcendental

A rational number can be written as a fraction of two whole numbers, and its decimal expansion either stops (like 1/4 = 0.25) or eventually repeats (like 1/7 = 0.142857142857…). Pi is not like that. In 1761 Johann Heinrich Lambert proved that pi is irrational: no fraction equals it exactly, so its decimal digits never end and never fall into a repeating cycle.

In 1882 Ferdinand von Lindemann went further and proved pi is transcendental — it is not the solution of any polynomial equation with whole-number coefficients. That settled an ancient puzzle: it is impossible to “square the circle”, that is, to construct a square with exactly the same area as a given circle using only a compass and straightedge.

Infinite does not mean big. Pi is only slightly more than 3. Its decimal expansion is infinite because pi is irrational, not because it is large.

One open question remains: nobody has proved that pi is normal — that every digit and every sequence of digits appears equally often in the long run. Every calculation so far suggests it behaves that way. In the first million decimals, for instance, about 63% of all possible six-digit sequences appear at least once, close to what you would expect from random digits.

Famous formulas that contain pi

Pi turns up in places that seem to have nothing to do with circles. A few of the best known:

Euler’s identity

eiπ + 1 = 0Connects five fundamental constants: e, i, π, 1 and 0.

The Basel problem

1/1² + 1/2² + 1/3² + 1/4² + … = π²/6Solved by Euler in 1734: the sum of the reciprocals of the square numbers.

The Leibniz series

π/4 = 1 − 1/3 + 1/5 − 1/7 + 1/9 − …Beautiful but painfully slow — it takes hundreds of terms to get just two correct decimals.

The Gaussian integral

∫ e−x² dx (from −∞ to ∞) = √πThe reason pi appears in the bell curve of statistics.

Stirling’s approximation

n! ≈ √(2πn) · (n/e)nEstimates factorials of large numbers — used throughout probability and physics.

Where pi appears: from circles to the universe

From circles to computers, from nature to the universe — π is everywhere. Four places you meet it:

Geometry

Every circle’s circumference is π times its diameter — from a coin to a planet’s orbit. Roll a circle once and it covers just over three diameters.

C = πd · A = πr²

Physics

Waves, pendulums, sound and light: anything that oscillates is described in cycles of 2π radians. A simple pendulum’s period is about 2π√(L/g).

x(t) = A sin(2πft)

Technology

Algorithms compute and use π constantly — in signal processing (Fourier transforms), graphics, GPS and engineering. Calculating π to trillions of digits is a classic stress test for computers.

6 sides → 3.000 · 12 → 3.106 · 96 → 3.141

The universe

Orbits, planetary periods and the geometry of spacetime. Kepler’s third law gives an orbit’s period, and Einstein’s field equations contain 8πG.

T = 2π √(a³ / GM)

Pi also appears in Coulomb’s law of electric force (through 4πε₀), in quantum mechanics (the reduced Planck constant is ħ = h/2π), and in the normal distribution used throughout statistics.

How many digits of pi do we actually need?

Surprisingly few. NASA’s Jet Propulsion Laboratory uses 3.141592653589793 — 15 decimal places — for its highest-accuracy interplanetary navigation. JPL’s own example: for a circle whose radius is the distance to Voyager 1 — billions of miles — a circumference calculated with that value would be off by only about an inch and a half.

JPL also points out that about 38 decimal places would be enough to calculate the circumference of the observable universe to within the width of a single hydrogen atom. Everyday calculations need far less: 3.14 or 3.1416 is plenty for homework, carpentry or cooking.

So why compute trillions of digits? Mostly to test computer hardware and algorithms, to study the statistical behaviour of the digits, and because it is a fascinating challenge. You can see the first 1,000 digits of pi on one page, or scroll through a million of them.

How pi is calculated

Because pi is irrational, no shortcut gives its digits directly — they must be computed. The methods improved dramatically over time:

  1. Ancient approximations. Babylonian mathematicians used 25/8 = 3.125, and the Egyptian Rhind papyrus implies (16/9)² ≈ 3.16.
  2. Archimedes’ polygons (c. 250 BC). Archimedes trapped the circle between polygons drawn inside and outside it. With 96-sided polygons he proved 3 10/71 < π < 3 1/7 — between about 3.1408 and 3.1429.
  3. Infinite series. From the 14th century, starting with the Indian mathematician Madhava, pi could be written as an endless sum. In 1706 John Machin used a much faster formula to reach 100 decimal places: π/4 = 4 arctan(1/5) − arctan(1/239)
  4. Ramanujan and the Chudnovsky algorithm. Srinivasa Ramanujan found astonishingly fast series in 1914. In 1988 the brothers David and Gregory Chudnovsky published a related series in which every term adds about 14 more correct digits. It powers modern record computations.

The million digits on PI Explorer were computed with the Chudnovsky algorithm and double-checked against an independent calculation using Machin’s formula. Read how the digits are verified.

Questions about pi

What is the exact value of pi?

Pi has no exact decimal value — its digits never end. It begins 3.14159265358979323846… and is usually written simply as the symbol π when an exact value is needed.

Is pi equal to 22/7?

No. 22/7 = 3.142857…, which is slightly larger than pi (3.141592…) and is correct only to two decimal places. 355/113 is much closer and is accurate to six decimal places.

Is pi a rational number?

No. Pi is irrational (proved in 1761) and transcendental (proved in 1882), so it cannot be written as a fraction of whole numbers.

Who discovered pi?

Nobody discovered pi at a single moment. Ancient Babylonians and Egyptians used approximations about 4,000 years ago, Archimedes gave the first rigorous method around 250 BC, and the symbol π has been in use since the 1700s.

How many digits of pi are known?

Computers have calculated pi to well over 100 trillion digits, and the record keeps growing. PI Explorer lets you browse the first one million.

Keep exploring

See the digits for yourself.