The way it was first done with any accuracy was with the [Cavendish experiment](https://en.wikipedia.org/wiki/Cavendish_experiment) in 1798. This used several large lead balls and measured the force of gravity between them, i.e., how much one lead ball attracted the other.
This tells us how strong gravity is for a given mass at a given distance. And we also know how strong the earth’s gravity is and how far it is to the centre of the earth. So now we can use [Newton’s law of universal gravitation](https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation) to work backwards to find the earth’s mass.
Latest Answers