Write π on a calculator:
3.1415926535...
Now divide 22 by 7:
3.1428571428...
They are surprisingly close.
So why does such a simple fraction work so well? And why must we still refuse to write π = 22/7?
Quick Answer
22/7 is an excellent approximation to π, but it is not π.
Historically, Archimedes showed that π is less than 22/7. He used 22/7 as an upper fence, not as the exact value.[1]
Modern number theory gives another reason the fraction stands out: 22/7 is one of the first continued-fraction convergents of π, a family of fractions known for giving efficient rational approximations.[2]
“Very close” answers a question about accuracy. “Equal” answers a question about identity. Those are not the same question.
How Close Is 22/7?
Compare the two numbers:
π ≈ 3.141592653589793
22/7 ≈ 3.142857142857143
The difference is only about:
0.0012644893
That is a relative error of about 0.04025%.[3]
Here is a physical way to feel that number. For a circle with diameter 1 meter, using 22/7 instead of π would make the calculated circumference too long by about:
1.26 millimeters
That is why 22/7 is useful for rough mental calculation. It is simple, and it is quite close.
But Archimedes Did Not Say π = 22/7
This point matters historically.
In Measurement of a Circle, Archimedes bounded the circle ratio between two fractions:
223/71 < π < 22/7
In decimal form:
3.140845... < π < 3.142857...
The true value had to lie inside that interval. MacTutor emphasizes the same historical point: Archimedes made no claim that 22/7 was the exact value.[1]
22/7 was the upper fence. The answer was below it.
Why Is the Denominator 7 So Good?
Suppose we insist on using a fraction with a small denominator.
For each denominator, choose the nearest numerator to π. As the denominator grows, we sometimes find a new best approximation.
| Fraction | Decimal value | Absolute error |
|---|---|---|
| 3/1 | 3.000000 | 0.141593 |
| 13/4 | 3.250000 | 0.108407 |
| 16/5 | 3.200000 | 0.058407 |
| 19/6 | 3.166667 | 0.025074 |
| 22/7 | 3.142857 | 0.001264 |
The jump is striking.
Going from denominator 6 to denominator 7 makes the error dramatically smaller. And no denominator from 8 through 20 beats 22/7.
Figure 1. 22/7 stands out among small fractions and also appears as the second convergent of π's continued fraction.
A Modern Explanation: Continued Fractions
A continued fraction rewrites a number in a nested form.
For π, the simple continued fraction begins:
π = [3; 7, 15, 1, 292, ...]
The first few convergents are:
3, 22/7, 333/106, 355/113, ...
These convergents are especially efficient rational approximations to π.[2]
Stop the continued fraction after the first two entries:
3 + 1/7 = 22/7
The next entry is 15. Because that next correction is relatively small, stopping at 22/7 already lands surprisingly close to π.
This is a modern explanation of why 22/7 is such a good simple fraction.
It is not a claim that Archimedes used continued fractions to obtain his bound. His historical method was geometric.
Python — Let the Fractions Compete
We can ask Python to search small denominators.
For each denominator q, it chooses the nearest numerator.
It prints a fraction only when that fraction beats every earlier one.
import math
best_error = float("inf")
for q in range(1, 21):
p = round(math.pi * q)
value = p / q
error = abs(value - math.pi)
if error < best_error:
print(p, "/", q, "=", value, "error =", error)
best_error = error
You should see:
3/1 → 13/4 → 16/5 → 19/6 → 22/7
Try this.
Change range(1, 21) to range(1, 120).
Which fractions eventually beat 22/7?
Watch for 355/113.
Why Can 22/7 Never Be Exactly π?
22/7 is a ratio of two integers. That makes it a rational number.
π is not rational. It cannot be written exactly as one integer divided by another.
This was proved much later than Archimedes. Johann Heinrich Lambert gave the first rigorous proof of the irrationality of π in the eighteenth century.[4]
So no fraction — not 22/7, not 355/113, not any other ratio of integers — can equal π exactly.
Some fractions can only get extraordinarily close.
Accuracy and Equality
This is the main lesson.
Approximation asks:
How small is the error?
Equality asks:
Is the error exactly zero?
22/7 does very well on the first question. It fails the second.
A number can be close enough for a calculation and still be mathematically different.
Words to Keep
rational number
A number that can be written as a ratio of two integers.
irrational number
A number that cannot be written exactly as a ratio of two integers.
approximation
A value close to the target value, with some nonzero error.
continued fraction
A nested fraction representation that can produce very efficient rational approximations.
One Sentence to Keep
22/7 is a remarkably good simple approximation to π, but Archimedes used it as an upper bound, and π is not equal to any fraction.
What Should We Ask Next?
Archimedes used straight-sided polygons to learn about a curved circle.
That raises a broader question:
How can straight lines help us measure curves?
That is where we will go next.
Previous: Why Is Pi the Same for Every Circle?
Related: How Did Archimedes Calculate Pi Without a Calculator?
Sources & Further Reading
- MacTutor History of Mathematics, “A History of Pi” — gives Archimedes' bounds 223/71 < π < 22/7 and stresses that 22/7 was not claimed as the exact value.
- Eric W. Weisstein, “Pi Continued Fraction” — gives π = [3; 7, 15, 1, 292, ...] and the convergents 3, 22/7, 333/106, 355/113, ....
- OEIS A068028, decimal expansion of 22/7 — records 22/7 as an approximation to π with about 0.04025% relative error and as the second continued-fraction convergent.
- MacTutor, “Johann Heinrich Lambert” — historical account of Lambert's proof that π is irrational.
- Thomas L. Heath (ed.), The Works of Archimedes — historical edition containing Measurement of a Circle.
Historical note: continued fractions are used here as a modern explanation of the quality of 22/7. They are not presented as Archimedes' historical method for obtaining the bound.