How will you 'weigh the sun', that is estimate its mass? The mean orbital radius of the earth around the sun is $1.5 \times 10^{8} \mathrm{~km}$.
Orbital radius of the Earth around the Sun, $r=1.5 \times 10^{11} \mathrm{~m}$
Time taken by the Earth to complete one revolution around the Sun,
$T=1$ year $=365.25$ days
$=365.25 \times 24 \times 60 \times 60 \mathrm{~s}$
Universal gravitational constant, $\mathrm{G}=6.67 \times 10^{-11} \mathrm{Nm}^{2} \mathrm{~kg}^{-2}$
Thus, mass of the Sun can be calculated using the relation,
$M=\frac{4 \pi^{2} r^{3}}{G T^{2}}$
$=\frac{4 \times(3.14)^{2} \times\left(1.5 \times 10^{11}\right)^{3}}{6.67 \times 10^{-11} \times(365.25 \times 24 \times 60 \times 60)^{2}}$
$=\frac{133.24 \times 10}{6.64 \times 10^{4}}=2.0 \times 10^{30} \mathrm{~kg}$
$6.64 \times 10$
Hence, the mass of the Sun is $2 \times 10^{30} \mathrm{~kg}$.