How to Calculate the Circumference of Earth
Earth is an oblate spheroid
Smart and educated people of the ancient world knew the earth was round. They knew it was a sphere, while today we know it is a squashed sphere, an oblate spheroid. It is squashed because of the sun's strong gravitational attraction, which makes it bulge out slightly at the equator.
Eratosthenes, as head librarian of the great Library of Alexandria, had at his fingertips just about all the knowledge of the world at the time. He knew the earth was round, but he did not know its size. He had no idea what the earth's circumference was.
Imagine being the head librarian of the greatest library on the planet and a library patron asks you a simple question:
Library patron: "What is the circumference of the earth?"
Eratosthenes: "I dunno."
He did not know, but like any good mathematician and scientist, he intended to find out using his available resources.
Back in 240 B.C.E., a Greek named Eratosthenes calculated the circumference of the earth. Today we know how to measure circumference of many things, including earth, using many modern tools, but Eratosthenes did it with a well, the sun, and a stick.
Setting the cosmological stage
Our sun is very far away from earth, 149,600,000 km on average. Earth is so very small compared to the sun - roughly 109 earths could fit across the face (diameter) of the sun -that the sun's rays strike the earth nearly parallel to each other. Earth takes up only a small portion of the sun's circumference.
That means the sun's rays hitting Eratosthenes' home in Alexandria are parallel to the sun's rays hitting Syene, a town far to the south, which today we call Aswan.
Generations of careful Egyptian land surveyors knew Syene was 5,000 stadia -- ancient measurement units equivalent to 804 kilometers or 500 miles -- south of Alexandria. Eratosthenes knew that, too.
Parallel lines
In Syene was a deep, wide well. At local noon on every summer solstice (earth's longest day and shortest night), the sun's rays went straight down the well, which meant Syene was perfectly lined up with those parallel sun rays. No shadow appeared in the well.
Eratosthenes knew about the Syene well, and he also knew the sunshine in Alexandria, 804 km or 500 mi. to the north, was not perfectly lined up with the parallel rays of the sun at local noon on the summer solstice.
Anything sticking up out of the earth in Alexandria - like a stick - cast a shadow at the same moment a stick in Syene cast no shadow.
If Eratosthenes could accurately measure the angle of the shadow of a stick driven perpendicular into Alexandrian ground, he could use only two pieces of information to calculate the circumference of the earth:
The angle of the stick's shadow in Alexandria on the summer solstice
The distance from Alexandria to Syene
Circumference
Circumference is the distance around a circle or sphere. An arc is a portion or fraction of a circle's or sphere's circumference. One complete trip around earth (one rotation) is 360°, so any arc of the circle or sphere is a fractional slice of 360°.
People in 240 B.C.E. knew how to measure circumference. They knew the circumference of a sphere formula, 2πr. They knew about central angles and arcs.
The distance from Alexandria to Syene is one such arc, a measurable and known fraction of earth's total circumference.
Corresponding angles
Eratosthenes knew that the distance from Alexandria to Syene on a spherical earth was an arc of the circumference, which means the two towns created a central angle at earth's center, which we will call 𝜃.
That made the line from earth's inaccessible center, C, to Alexandria, A, a transversal of the sun's parallel rays.
A transversal is a line that cuts across other lines, and in the case of parallel lines, a transversal creates corresponding angles. Whatever angle it creates on one parallel line, it creates the same angle on the other.
That made the angle of a stick's shadow in Alexandria on the summer solstice a corresponding angle to the central angle 𝜃 at earth's inaccessible center.
If he could accurately measure the stick's shadow angle in Alexandria at local noon on the summer solstice, Eratosthenes have both pieces of information needed to calculate earth's circumference.
[reference diagram from https://ourplnt.com/how-eratosthenes-calculated-earth-circumference/eratosthenes-calculation-earth-circumference/ provided for clarity and inspiration]
Eratosthenes did the measurement and found the angle was 7.2°, which meant central angle 𝜃 was also 7.2°. That angle, 7.2°, is 1/50 of a complete circle:
7.2°/360° = 1/50
So, if 804 km or 500 mi. (or 5,000 stadia for Eratosthenes) was 1/50th, multiplication gives you the earth's circumference:
500 mi. x 50 = 25,000 mi.
804 km x 50 = 40,200 km
And for any of you ancient Greeks out there, 5,000 stadia x 50 = 250,000
stadia
The earth, as we said, is an oblate spheroid, so geodesists (scientists who measure the earth and its position in space) have measured and calculated the average of earth's circumference as 40,075 km or 24,901 mi.
Eratosthenes, some 2,200 years ago, was off by only 125 km or 101 mi. And he did it with just a little knowledge about geography and mathematics, a well, and a stick.