Pi is mysterious. Sure, you “know” it’s about 3.14159 because you read it in some book. But what if you had no textbooks, no computers, and no calculus (egads!) — just your brain and a piece of paper. Could you find pi?

Archimedes found pi to 99.9% accuracy 2000 years ago — without decimal points or even the number zero! Even better, he devised techniques that became the foundations of calculus. I wish I learned his discovery of pi in school — it helps us understand what makes calculus tick.

## How do we find pi?

Pi is the circumference of a circle with diameter 1. How do we get that number?

- Say pi = 3 and call it a day.
- Draw a circle with a steady hand, wrap it with string, and measure with your finest ruler.
- Use door #3

What’s behind door #3? Math!

## How did Archimedes do it?

Archimedes didn’t know the circumference of a circle. But he didn’t fret, and started with what he *did* know: the perimeter of a square. (He actually used hexagons, but squares are easier to work with and draw, so let’s go with that, ok?).

We don’t know a circle’s circumference, but for kicks let’s draw it between two squares:

Neat — it’s like a racetrack with inner and outer edges. Whatever the circumference is, it’s *somewhere* between the perimeters of the squares: more than the inside, less than the outside.

And since squares are, well, *square*, we find their perimeters easily:

- Outside square (easy): side = 1, therefore perimeter = 4
- Inside square (not so easy): The diagonal is 1 (top-to-bottom). Using the Pythagorean theorem, side
^{2}+ side^{2}= 1, therefore side = sqrt(1/2) or side = .7. The perimeter is then .7 * 4 = 2.8.

We may not know where pi is, but that critter is scurrying between 2.8 and 4. Let’s say it’s halfway between, or **pi = 3.4**.

## Squares drool, octagons rule

We estimated pi = 3.4, but honestly we’d be better off with the ruler and string. What makes our guess so bad?

**Squares are clunky**. They don’t match the circle well, and the gaps make for a loose, error-filled calculation. But, increasing the sides (using the mythical octagon, perhaps) might give us a tighter fit and a better guess (image credit):

Cool! As we yank up the sides, we get closer to the shape of a circle.

So, what’s the perimeter of an octagon? I’m not sure if I learned that formula. While we’re at it, we could use a 16-side-a-gon and a 32-do-decker for better guesses. What are their perimeters again?

Crickey, those are tough questions. Luckily, Archimedes used creative trigonometry to devise formulas for the perimeter of shape when you double the number of sides:

**Inside perimeter:** One segment of the inside (such as the side of a square) is sin(x/2), where x is the angle spanning a side. For example, one side of the inside square is sin(90/2) = sin(45) ~ .7. The full perimeter is then 4 * .7 = 2.8, as we had before.

**Outside perimeter:** One segment of the outside is tan(x/2), where x is the angle spanning one side. So, one segment of the outside perimeter is tan(45) = 1, for a total perimeter of 4.

Neat — we have a simple formula! Adding more sides makes the angle smaller:

- Squares have an inside perimeter of 4 * sin(90/2).
- Octogons have eight 45-degree angles, for an inside perimeter of 8 * sin(45/2).

Try it out — a square (sides=4) has 91% accuracy, and with an octagon (sides=8) we jump to 98%!

But there’s a problem: Archimedes didn’t have a calculator with a “sin” button! Instead, he used trig identities to rewrite sin and tan in terms of their previous values:

New outside perimeter [harmonic mean]

New inside perimeter [geometric mean]

These formulas just use arithmetic — no trig required. Since we started with known numbers like sqrt(2) and 1, we can repeatedly apply this formula to increase the number of sides and get a better guess for pi.

By the way, those special means show up in strange places, don’t they? I don’t have a nice *intuitive* grasp of the trig identities involved, so we’ll save that battle for another day.

## Cranking the formula

Starting with 4 sides (a square), we make our way to a better pi (download the spreadsheet):

Every round, we double the sides (4, 8, 16, 32, 64) and shrink the range where pi could be hiding. Let’s assume pi is halfway between the inside and outside boundaries.

After 3 steps (32 sides) we already have **99.9%** accuracy. After 7 steps (512 sides) we have the lauded “five nines”. And after 17 steps, or half a million sides, **our guess for pi reaches Excel’s accuracy limit**. Not a bad technique, Archimedes!

Unfortunately, decimals hadn’t been invented in 250 BC, let alone spreadsheets. So Archimedes had to slave away with these formulas using *fractions*. He began with hexagons (6 sides) and continued 12, 24, 48, 96 until he’d had enough (ever try to take a square root using fractions alone?). His final estimate for pi, using a shape with 96 sides, was:

The midpoint puts pi at 3.14185, which is over 99.9% accurate. Not too shabby!

If you enjoy fractions, the mysteriously symmetrical 355/113 is an **extremely accurate (99.99999%)** estimate of pi and was the best humanity had for nearly a millennium.

Some people use 22/7 for pi, but now you can chuckle “Good grief, 22/7 is merely the upper bound found by Archimedes 2000 years ago!” while adjusting your monocle. There’s even better formulas out there too.

## Where’s the Calculus?

Archimedes wasn’t “doing calculus” but he laid the groundwork for its development: start with a crude model (square mimicking a circle) and refine it.

Calculus revolves around these themes:

**We don’t know the answer, but we’ve got a guess.**We had a guess for pi: somewhere between 2.8 and 4. Calculus has many concepts such as Taylor Series to build a guess with varying degrees of accuracy.**Let’s make our guess better**. Archimedes discovered that adding sides made a better estimate. There are numerical methods to refine a formula again and again. For example, computers can start with a rough guess for the square root and make it better (faster than finding the closest answer from the outset).**You can run but not hide**. We didn’t know exactly where pi was, but trapped it between two boundaries. As we tightened up the outside limits (pun intended), we knew pi was hiding somewhere inside. This is formally known as the Squeeze Theorem.**Pi is an unreachable ideal.**Finding pi is a process that never ends. When we see π it really means "You want perfection? That's nice -- everyone wants something. Just start cranking away and stop when pi is good enough.".

I’ll say it again: **Good enough is good enough**. A shape with 96 sides was accurate enough for anything Archimedes needed to build.

The idea that “close counts” is weird — shouldn’t math be *precise*? Math is a model to describe the world. Our equations don’t need to be razor-sharp if the universe and our instruments are fuzzy.

## Life Lessons

Even math can have life lessons hidden inside. **Sometimes the best is the enemy of the good**. Perfectionism (“I need the exact value of pi!”) can impede finding good, usable results.

Whether making estimates or writing software, perhaps you can **start with a rough version and improve it over time**, without fretting about the perfect model (it worked for Archimedes!). Most of the accuracy may come from the initial stages, and future refinements may be a lot of work for little gain (the Pareto Principle in action).

Ironically, the “crude” techniques seen here led to calculus, which in turn led to better formulas for pi.

## Math Lessons

Calculus often lacks an intuitive grounding — we can count apples to test arithmetic, but it’s hard to think about abstract equations that are repeatedly refined.

Archimedes’ discovery of pi is a vivid, concrete example for our toolbox. Just like geometry refines our intuition about lines and angles, calculus defines the rules about equations that get better over time. Examples like this help use intuition as a starting point, instead of learning new ideas in a vacuum.

Later, we’ll discuss what it means for numbers to be “close enough”. Just remember that 96 sides was good enough for Archimedes, and half a million sides is good enough for Excel. We’ve all got our limits.

## Other Posts In This Series

- A Gentle Introduction To Learning Calculus
- How To Understand Derivatives: The Product, Power & Chain Rules
- How To Understand Derivatives: The Quotient Rule, Exponents, and Logarithms
- An Intuitive Introduction To Limits
- Why Do We Need Limits and Infinitesimals?
- Learning Calculus: Overcoming Our Artificial Need for Precision
- Prehistoric Calculus: Discovering Pi
- A Calculus Analogy: Integrals as Multiplication
- Calculus: Building Intuition for the Derivative
- Understanding Calculus With A Bank Account Metaphor
- A Friendly Chat About Whether 0.999... = 1

## Leave a Reply

111 Comments on "Prehistoric Calculus: Discovering Pi"

Great post. I really liked the formatting too, and the calculator at the end. Worthwhile talk about how you might estimate pi in other ways, such as estimating the number co-prime numbers, or the Buffon Needle problem.

Just some ideas.

Again, great post.

Matt

I like the article, and will definitely use the ideas in my classes, but first there is a minor problem to solve. You have the inside perimeter as the geometric mean of the previous estimates, and the outside perimeter as the harmonic mean. The problem is, the harmonic mean is always /smaller/ than the geometric mean. Maybe they just switch, but I don’t see how yet.

The page to which you link contains the same mistake. I have no idea where that guy got the trig identities he cites, but I’ll keep working on it.

Update: Okay, I now see I was reading the formulae incorrectly (one refers to newIn rather than Inside), but the formulae themselves are wrong as well (on your page; the page you link to gets them right). They should be

newOut = harmonicMean(Inside, Outside)

and

newIn = geometric(Inside, newOut)

which is what you use in the spreadsheet.

In my email to you about writing a guest article, I had one that this article just destroys. I talked (a lot) about Archimedes’ discovery that 223/71

The comment form just ate my last comment; I have no idea why that is.

I continued on from there:

223/71

Okay, I figured it out. It misinterpreted what I typed as html.

In my email to you about writing a guest article, I had one that this article just destroys. I talked (a lot) about Archimedes’ discovery that 223/71 is less than pi which is less than 22/7, though I focused more on the concept than the mathematics behind it.

Although, your square root comment made me think: I have a better explanation for Newton’s method than you had in the Quake Square Root article, so maybe I should write about that…

@Matt: Thanks, glad you enjoyed it! Those are great suggestions, I think it’d be great for a follow-up. I didn’t want to distract from the calculus roots too much in this post, but the needle approach is a fun way to look at probability.

@Chad: Sorry about the confusion there! Yes, I made a major flub and miswrote the equations (just corrected it), the spreadsheet should have the correct ones.

@Zac: No worries — I should probably install a live preview plugin so people will know when their comment is getting eaten / mistaken for HTML. Sure, if you have ideas for the square root method feel free to write them down — once the contribution wiki is up I’m sure it’ll be a nice addition :).

hey nice one there for a quick look , although we know the value of pi after all those yrs of forced insertion of the value into our heads, but this gives a better insight to the derivation in a way,

appreciate the effort!

Thanks Brijesh! Yep, we know pi because we’ve seen it before, but it’s nice to see how we came to that result.

[…] […]

Descubriendo el valor de Pi…Prehistoric Calculus: Discovering Pi es una anotación del siempre recomendable sitio sobre matemáticas Better Explained donde se narra cómo a lo largo de los tiempos diversos matemáticos fueron aproximando el valor de π de forma cada vez más y más …

Please explain this:

>Whatever the circumference is, it’s somewhere between the perimeters of the squares: more than the inside, less than the outside.

Why is it obvious that the outside square and futhermore 512-sided-thingy has bigger perimeter?

[…] Prehistoric Calculus: Discovering Pi | BetterExplained Warning math ahead, but if you stick with it, you’ll find out how Archimedes found pi to 99.9% accuracy 2000 years ago. (tags: history mathematics pi) […]

Reading a little more into pi and the ways of calculuating it seem to always lead me to Taylor Series. It would be nice to really understand what’s going on there.

Pi is a fun number. For some reason, I decided to memorize it to 50 decimal places. The fact that it’s impossible to calculate exactly just makes it even more fun to try and find more.

Well,I’m from Lima,Perú.And I never going to understand the way americans do math.For us “PI”is=3.1416.And if I’m not wrong 22/7 is not a correct anwser.not even that 223/71.Also I found and america you guys solve math problems outside down.My favorite subject is MATH,and II want tobe a math teacher.

I wish I dont make mad noone with my comments.

this guy says pi is 3.154700 http://www.dinbali.com

Dude the chinese made a much better version than Archimedes sooner. They made ones with roughly 30-100 sides according to my research.

@tekumse: That’s an interesting question, sometimes it’s good to break down these assumptions. The formal name for the inside shape is “inscribed” and the formal name for the outside shape is “circumscribed”.

The area of the inscribed shape is less than or equal to the area of the circle, since all points are inside the boundary.

The area of the circumscribed shape is greater than or equal to the area of the circle, since all points are outside the boundary. Therefore, the area of the inscribed polygon is less than or equal to the area of the circumscribed shape.

For similar shapes, the greater area corresponds to a greater side length (see the Pythagorean theorem for more details). Since we are using similar shapes (squares, octagons, 16-gons, etc.) the circumscribed shape will have a larger side length (and perimeter) than the inscribed one. Hope this helps.

@Zac: Yep, the Taylor series will be fun. I want to think about it more to see if I can find some insights that link it to everyday analogies :). And 50 digits of pi is pretty precise, enough to estimate the size of the universe to 1 atom’s precision, I think.

@Miguel: Thanks for the comment, glad you like math. I think most students know 22/7 (or 3.1416) is just an estimate for pi, not an exact value.

@Anonymous: Don’t believe everything you read!

@Cheeseburger: That’s interesting, Archimedes made this technique famous but others may have used it as well.

Descubriendo el valor de Pi [eng]…"Prehistoric Calculus: Discovering Pi" es una anotación del sitio sobre matemáticas Better Explained donde se narra cómo a lo largo de los tiempos diversos matemáticos fueron aproximando el valor de π de forma cada vez más y más exacta. Relac…

I have a question at the very first assumption in the two squares case:

How did you make the assumption (assuming precalculus and calculator days and all that) that

2.8

Hi Ashwin, the comment form may have eaten your comment.

1/sqrt(2) comes from the Pythagorean theorem — it’s actually sqrt(2)/2 (which is the same thing), and sqrt(2) can be approximated using various algorithms: it’s more than 1, less than 2. It’s more than 5/4 (5/4 squared = 25/16 which is less than 2), and less than 6/4 (6/4 squared is 36/16 which is more than 2).

Not sure if that was the question but feel free to ask again, sorry about the form.

in your spreadsheet pi = 355/133 , u can knock this down to 22/7

Hi phyu, 22/7 is an approximation for pi, but it isn’t as accurate as 355/113. Check out the “Cranking the Formula” section for more details.

@ phyu

355/113 actually simplifies to 22/~7.0028169014084507042253521126761

the higher up in the fractions you go the farther from 7 the bottom number becomes, which falls right in line with the numeration given in Kalid’s chart.

Also @ Kalid very nice job in the compilation, always nice to see some interesting math facts!

such a great article! i was really happy that you included that little bit of life lesson at the end there. i have a tattoo of pi to remind myself that life doesn’t always make perfect sense :]