Suppose a body of mass m_{o} is placed on the surface of earth. If r_{E} is the radius of the earth, then the distance between the centers of earth and the object is approximately r_{E}. According to Newton’s law of universal gravitation, the force with which earth attracts the object is

However, the earth attracts the body with a force equal to the weight W of the object = m_{o}g. Therefore,

Cancel m_{o} on both sides,

Simplify for the mass of the earth, m_{E}.

Now we already know that, G = 6.67 × 10^{-11} N m^{2} kg^{-2}, r_{E}= 6.4 × 10^{6} m and 9.8 ms^{-2}. Put these values in the above equation,