On the Sizes and Distances [of the Sun and Moon] (Περὶ μεγεθῶν καὶ ἀποστημάτων [ἡλίου καὶ σελήνης]) is the only extant work written by Aristarchus of Samos, an ancient Greek astronomer who lived circa 310 BC  230 BC. In this work, he calculates the sizes of the Sun and Moon, as well as their distances from the Earth in Earth radii.
Contents 
His method relied on several observations:
This construction uses the following variables:
Symbol  Meaning 

s  Radius of the Sun 
S  Distance to the Sun 
l  Radius of the Moon 
L  Distance to the Moon 
t  Radius of the Earth 
D  Distance to the vertex of Earth's shadow cone 
n  d/l, a directly observable quantity during a lunar eclipse 
φ  Directly observed. 
x  S/L, which is derived from φ 
Aristarchus began with the premise that, when the moon was exactly halflit, it forms a right triangle with the Sun and Earth. By observing one of the other angles in this right triangle, the ratio of the distances to the Sun and Moon could be deduced using a form of trigonometry.
From the diagram and trigonometry, we can calculate that
The diagram is greatly exaggerated, because in reality, S = 390L, and φ is extremely close to a right angle (only 10′ shy). Aristarchus determined φ to be a thirtieth of a quadrant (in modern terms, three degrees) less than a right angle: in current terminology, 87°. Trigonometric functions had not yet been invented, but using geometrical analysis in the style of Euclid, Aristarchus determined that
In other words: that the distance to the Sun was somewhere between 18 and 20 times greater than the distance to the Moon. This value (or values approximately close to it) was accepted by astronomers for the next two thousand years, until the invention of the telescope permitted a more precise estimate of solar parallax.
He also reasoned that as angular size of the Sun and the Moon were the same, but the distance to the Sun was between 18 and 20 times further than the Moon, the Sun must therefore be 1820 times larger.
Aristarchus then used another construction based on a lunar eclipse:
By similarity of the triangles, and
Since the apparent sizes of the Sun and Moon are the same, it follows that . Now
We can rewrite several variables in terms of x:
Combining this with the previous equation gives:
These give the radii of the sun and moon entirely in terms of observable quantities. Along with a value for the apparent size of the sun and moon (in degrees), these formulae give the distances to the Sun and Moon in terrestrial units:
It is unlikely that Aristarchus used these exact formulae, since he would have lacked a precise value for π. However a simple approximation π = 3 will incur in a relative error smaller than 5%, well below experimental errors in measurements at the time.
These formulae are likely a good approximation to those of Aristarchus.
His values, then, are computed as:
n  n/a  2  2.587 

θ  n/a  1  0.259 
s / t  (1 + x) / (1 + n)  6.67  109 
x(1 + n) / (1 + x)  2.85  3.67  
L / t  θ)  20  60.32 
S / t  (L / t)(S / L)  380  23,500 
The error in this calculation comes primarily from the poor values for x and θ. The poor value for θ is especially surprising, since Archimedes writes that Aristarchus was the first to determine that the Sun and Moon had an apparent diameter of half a degree. This would give a value of θ = 0.25, and a corresponding distance to the moon of 80 earth radii, a much better estimate.
A similar procedure was later used by Hipparchus, who estimated the mean distance to the moon as 67 earth radii, and Ptolemy, who took 59 earth radii for this value.

