In Egypt, a Greek scholar and philosopher, Eratosthenes (276 BCE 195 BCE), devised a method for a more explicit measurement of the earth's size. Reports from the ancient city of Swenett, later known as Syene, stated that on the day of the summer solstice, the midday sun shone to the bottom of a well. He observed in Alexandria, that the sun was not directly overhead. Instead, it cast a shadow with the vertical equal to 1/50th of a circle (7° 12'). To these observations, Hellenistic Astronomy and knowledge of the local geography had already established that; (1) on the day of the summer solstice, the midday sun was directly over the Tropic of Cancer; (2) Syene was on this tropic; (3) Alexandria and Syene lay on a direct north-south line; (4) The sun was a relatively long way away (which would later be known as the astronomical unit). He determined that distance between Alexandria and Syene was 5000 stadia, (possibly by having hired someone to walk and measure the distance, but more likely using reports of travelers of the distance) or at the usual Hellenic 185 m per stadion, about 925 km.
From these observations, measurements, and/or "known" facts, Eratosthenes concluded that since the angular deviation of the sun from the vertical direction at Alexandria was also the angle of the subtended arc (see illustration), the linear distance between Alexandria and Syene was 1/50 of the circumference of the Earth which thus must be 50×5000 = 250,000 stadia or probably 25,000 geographical miles. The circumference of the Earth is 24,902 mi (40,075.16 km). Over the poles it is more precisely 40,008 km or 24,860 mi. The actual unit of measure used by Eratosthenes was the stadion. No one knows for sure what his stadion equals in modern units, possibly it was the Hellenic 185 m stadion.
https://en.wikipedia.org/wiki/History_of_geodesy#Hellenic_world