Planet Density Calculator Formula

Understand the math behind the planet density calculator. Each variable explained with a worked example.

Formulas Used

Mean Density

density = 3 * mass / (4 * pi * pow(radius, 3))

Density (g/cm3)

density_gcc = 3 * mass / (4 * pi * pow(radius, 3)) / 1000

Variables

VariableDescriptionDefault
massPlanet Mass(kg)5.972e+24
radiusPlanet Radius(m)6371000

How It Works

Mean Bulk Density of a Planet

The average density is found by dividing the total mass by the total volume.

Formula

rho = M / V = 3M / (4 pi R cubed)

Density helps distinguish rocky planets (about 5 g/cm3) from gas giants (about 1 g/cm3). Earth's mean density is about 5.51 g/cm3.

Worked Example

Earth: M = 5.972e24 kg, R = 6.371e6 m.

mass = 5.972e+24radius = 6371000
  1. 01rho = 3M / (4 pi R cubed)
  2. 02R cubed = (6.371e6)^3 = 2.586e20
  3. 034 pi R cubed = 3.254e21
  4. 04rho = 3 * 5.972e24 / 3.254e21
  5. 05rho = 5 504 kg/m3 = 5.50 g/cm3

Ready to run the numbers?

Open Planet Density Calculator