Suppose we wanted to estimate the mass of the Sun. Equate the force of gravity to the centripetal force.
{{jcomments on}jatex options:inline}\frac{GM_{Sun} m_{Earth}}{r^2}= \frac{m_{Earth} v^2}{r}{/jatex}
Rearranging gives
\[M_{Sun} = \frac{v^2r}{G}\]
The Earth orbits the Sun once a year or 365 days. In a year there are
\[365 \times \ 24 \times 60^2 = 31536000 s\]
The Earth orbits the Sun at a radius of
\[150 \times 10^9 m\]
The speed of the Earth around the Sun is
\[v= \frac{2 \pi r}{T} = \frac{2 \pi \times 150 \times 10^9}{31536000}=29.885 \times 10^3 m/s 29.995 m/s\]
The mass of the Sun is then
\[M=\frac{29885^2 \times 150 \times 10^9}{6.67 \times 10^{-11}} = 2.01 \times 10^30 kg\]
This is an estimate. The main errors arise because we have made the following approximation
Both the Sun and the Earth are spheres.
The orbit of the Earth is a circle.
The mass of the Earth is small compared with the Sun so can be ignored.