Aristotle had worked out the true value to a good degree of accuracy nearly 2000 years previously.
There is some doubt about the length of the measures Aristotle was using (1 stadion = 600 Greek feet), but it is believed that his calculations resulted in 39,952,644 m, which is very close to the modern measurement of 40,070 m.
Before Aristotle quite accurate measurements had already been made by the Pythagoreans and the Chaldeans.
About 100 years after Aristotle Eratosthenes of Cyrene used another method to calculate the circumference, based on the difference of the length of shadows in Syene (modern Aswan) and Alexandria and the distance between the two cities.
Historians believe that Eratosthenes’ conclusion was between 0.5% and 17% off the mark (again confusion about the used measures) but many scholars think it likely that his estimate was only about 1% too small.
By about 300AD, the idea of a flat earth was revived, due to the early christian rejection of the "pagan absurdity" of a spherical earth. This view was held sporadically until about 1300 AD.
By 1300, the works of Ptolemy and others arrived in Europe by way of islamic Spain, and fully restored the spherical earth to respectability.
Contrary to popular myth, very few educated people after about 300 BC doubted that the Earth was a sphere. While a few early christian thinkers did try to reject the idea, there is nothing in christian beliefs that dictates a flat earth, in fact it says virtually nothing at all on the matter.