How Eratosthenes Measured Earth’s Circumference With a Stick 2,200 Years Ago

Eratosthenes measured Earth’s circumference in 240 BC — and he got it right to within about 2%.

I want you to sit with that number for a second. Two percent. That’s not “close for ancient times.” That’s just close. The actual circumference of the Earth is 40,075 kilometers. Eratosthenes came up with roughly 40,000 kilometers, give or take depending on which version of his unit of measurement you use. He did this without satellites, without GPS, without any instrument more sophisticated than a stick planted in the ground.

I’ve been writing code for a long time. I’ve debugged systems that seemed impossibly complex, worked through problems that took weeks to crack. And when I first really understood what Eratosthenes did — not just the surface version, but the actual geometry of it — I sat back and felt something I don’t feel very often when reading about ancient history.

Genuine envy.

Because what he pulled off wasn’t just clever. It was elegant. The kind of elegant that makes you slightly annoyed you didn’t think of it yourself.

This is the story of how a librarian in Egypt used two shadows, some walking, and basic geometry to figure out the size of the planet he was standing on.

Eratosthenes measured Earth's circumference with a stick and shadow 240 BC

The Man Who Ran the World’s Greatest Library

Before we get to the experiment, let’s talk about who Eratosthenes actually was — because he tends to get reduced to a single clever trick, and that undersells him considerably.

Eratosthenes was born around 276 BC in Cyrene, a Greek colony in what is now Libya. He was, by any measure, one of the most broadly educated people of his time. He wrote about mathematics, geography, astronomy, history, and poetry. He invented a method for identifying prime numbers that mathematicians still teach today — the Sieve of Eratosthenes. He produced what was, for centuries, the most accurate map of the known world.

And at some point in his thirties, he was appointed head of the Library of Alexandria — arguably the most important intellectual institution in the ancient world. The library held hundreds of thousands of scrolls, gathered from across the Mediterranean and beyond. If knowledge existed in written form anywhere in the ancient world, Alexandria probably had a copy.

This matters for the story, because it was in that library that Eratosthenes found the piece of information that would set everything in motion.

He read — in some scroll, from some traveler’s account — that in the city of Syene, far to the south, something remarkable happened every year on the summer solstice. At exactly noon, the sun shone directly down into a deep well. All the way to the bottom. No shadows at all.

Most people, reading that, would have thought: interesting. And moved on.

Eratosthenes thought: wait a moment.


The Observation That Changed Everything

Here is what Eratosthenes understood that most people in his position would have missed.

He knew that in Alexandria, sticks cast shadows at noon on the summer solstice. He had seen it himself. But in Syene — around 800 kilometers due south — they didn’t. The sun was directly overhead there, casting no shadows whatsoever.

If the Earth were flat, this would be impossible. If the Earth were flat and the sun were far away, its rays would hit every point on the surface at exactly the same angle simultaneously. The shadows would be identical everywhere. The fact that they weren’t meant one thing: the surface of the Earth between Alexandria and Syene was curved.

As a programmer, this is the moment that gets me every time. Eratosthenes didn’t discover that the Earth was round — the Greeks had known that for a couple of centuries. What he saw was something more subtle: that the difference in shadow angles between two locations was a direct measurement of how curved the Earth’s surface was between them. And if you knew the distance between those two locations, you could calculate the total circumference from there.

It’s the kind of reasoning I’d love to see in a code review. Elegant, minimal, and completely rigorous. He turned a piece of trivia about a well into a geometric key that unlocked the size of the planet.


The Calculation: Simple Enough to Do on a Napkin

Here is how Eratosthenes measured Earth’s circumference, step by step, and I want to walk through it properly because the geometry is genuinely beautiful.

On the summer solstice at noon, he planted a vertical stick in the ground in Alexandria and measured the angle of its shadow. The shadow made an angle of approximately 7.2 degrees with the vertical — about one-fiftieth of a full circle (360 degrees divided by 7.2 equals exactly 50).

Now here’s the key insight. If the sun is far enough away that its rays arrive essentially parallel at both locations — which Eratosthenes correctly assumed — then the angle of the shadow in Alexandria is equal to the angle between Alexandria and Syene as measured from the center of the Earth.

In other words: Alexandria and Syene are separated by 7.2 degrees of arc on the Earth’s surface. That’s one-fiftieth of the full 360 degrees.

Which means: the distance from Alexandria to Syene is one-fiftieth of the Earth’s total circumference.

He knew the distance between the two cities was approximately 5,000 stadia — measured by royal surveyors who had walked the route counting their steps. So: 5,000 stadia multiplied by 50 equals 250,000 stadia, which translates to roughly 40,000 kilometers.

That’s it. That’s the whole calculation. A shadow angle, a walking distance, and one proportion.

I’ve explained this to my kids at dinner and watched the moment it clicks. It’s one of those ideas that seems almost too simple to be true — and then you realize it works precisely because it’s so simple. No complex machinery. No elaborate assumptions. Just geometry applied directly to the world.


What He Got Right, and What He Got Wrong

Now, I want to be honest here, because the story is sometimes told in a way that smooths over some genuine complications.

Eratosthenes made several assumptions that weren’t perfectly correct. He assumed Alexandria and Syene were on exactly the same meridian — they’re not, Syene is slightly to the east. He assumed Syene was exactly on the Tropic of Cancer — it’s close, but not exact. And the question of how long his unit of measurement, the stadium, actually was is still debated by scholars today.

Depending on which version of the stadium you use, his answer comes out anywhere between about 39,700 and 46,600 kilometers. The actual circumference is 40,075 kilometers.

So was he lucky? Partly. Some of his errors happened to cancel each other out. But the method was completely sound. He wasn’t guessing — he was applying rigorous geometric reasoning to the best measurements available to him. The fact that his tools were imprecise doesn’t diminish the logic. It just means he was working at the limits of what was measurable in 240 BC.

As someone who works with imperfect data regularly, I find this deeply relatable. You don’t always have perfect inputs. The question is whether your method is correct — and his was.

The Thing That Gets Lost in the Retelling

There’s something about Eratosthenes’s story that I think gets lost every time it’s simplified into a fun science fact.

He didn’t just measure the Earth. He measured the Earth with tools that already existed, using a method that anyone with basic geometry could have understood, based on an observation that was sitting in a library scroll waiting to be noticed.

The well in Syene had been doing its summer solstice trick for centuries before Eratosthenes read about it. Countless people had heard the story. Presumably some of them thought it was interesting. But nobody connected it to the geometry of shadows and the size of the Earth until Eratosthenes did.

That’s the part that stays with me. Not the calculation — the seeing. The moment of recognizing that a piece of information about a well in a distant city was actually a measurement waiting to be completed.

I think about that when I’m sitting with a dataset that isn’t telling me anything obvious. Sometimes the data isn’t the problem. Sometimes the question you’re asking just isn’t the right one yet.


Why Eratosthenes Measured Earth’s Circumference Still Matters

The circumference Eratosthenes calculated didn’t just sit in a library. It was used. For centuries, navigators and geographers relied on his figures when trying to understand the scale of the world. His work informed the maps that travelers used to cross continents and oceans.

And here’s a piece of history that most people don’t know: when Christopher Columbus was planning his westward voyage to Asia in the late 15th century, he actually disputed Eratosthenes’s figure. Columbus believed — incorrectly — that the Earth was significantly smaller than Eratosthenes had calculated. That’s part of why he thought he could reach Asia by sailing west. He was wrong, and Eratosthenes was right.

The reason Columbus didn’t sail off the edge of the world was not because his math was good. It was because a continent happened to be in the way.

Eratosthenes had better numbers 1,700 years earlier.


A Thought to Leave You With

There’s a version of intellectual history that presents knowledge as a series of sudden leaps — great moments of insight that arrive from nowhere and change everything. Eratosthenes is often presented that way. The lone genius with the stick.

But what actually happened was messier and more interesting. He was standing on centuries of Greek geometric thinking. He had access to the accumulated geographical knowledge of the ancient world. He had a library full of travelers’ accounts. He had royal surveyors whose job was measuring distances.

What he contributed was the connection. The recognition that all of these separate pieces of information, brought together and seen in the right way, added up to something nobody had calculated before.

That’s not less impressive than the lone genius version. It’s more impressive. Because it tells us that the knowledge was there all along, waiting for someone to ask the right question.

The next time you feel like you don’t have enough information to solve a problem, remember Eratosthenes. He had a secondhand story about a well, a stick, and a sunny day. He asked the right question. And he measured the world.


More Stories Like This

Enjoying the journey through ancient science? Here’s where we’ve been and where we’re going:

← Previous: Ancient Babylonian Eclipse Prediction: How They Got It Right 2,600 Years Ago

→ Next: The Eureka Moment: What Archimedes Really Discovered in His Bath — and Why It Still Matters