In order to calculate the mass of your planet you again only need two things: the surface gravity and the size of the planet. The relationship between these quantities is give by
where g is the surface gravity, G is our friend the gravitational constant (6.67384×10-11 m3 kg-1 s-2), M is the mass of the planet, and r is the radius of the planet. The units here are SI (meters, kg, seconds). If you want to work in multiples of Earth masses, radii, and surface gravities you can drop the constant G.
Calculating the Mass
So the calculation is straight forward. To get the mass, you just take the surface gravity, multiply it by the radius squared and divide by the gravitational constant. i.e.
So for example, the surface gravity of Earth is 9.807 ms-2 and it has a radius of 6,371,000 m. Plugging this in gives us a mass of 5.9645×1024 kg which is really close to the actual value of 5.9726×1024 kg.
For fun, let’s do Venus as well. Venus’s surface gravity is 8.87 m s-2 and it has a radius of 6,052,000 m. Plugging that in gives us a mass of 4.8679×1024 kg which again is really close to the actual value of 4.8676×1024 kg. Or doing the calculation in terms of Earth ratios we have that Venus’s surface gravity is 0.905 times that of Earth and it’s radius is 0.950 times that of Earth. Using the equation without the G you get M = 0.905 x 0.950 x 0.950 = 0.817 Earth masses which (unsurprisingly) is the same 4.8679×1024 kg value we computed before.
And that’s all it takes.
Time for a Reality Check
That’s all well and good for planets we know about, but what about a random planet you’ve made up for your game (or found in a supplement).
Let’s say I want a big planet, say 50% bigger than the Earth but with a surface gravity of only 0.8g. So we do our calculation and we get that M = 0.8 x 1.5 x 1.5 = 1.8 Earth masses or about 1.075×1024 kg which sounds reasonable. It’s a larger planet and has more mass.
But let’s look at the density. The density of an object is just its mass divided by its volume. So we have the mass above and the volume of a sphere is just 4/3 × π r3 which gives us a volume of 3.66×1021 m3. Dividing the two gives us a density of 2940 kg/m3.
You may not realize it yet but that’s awfully low. At least for a terrestrial planet. In fact, it’s a really weird density for object we know about. Let’s look at some comparisons (remember that the density of water is 1000 kg/m3).