Skip to content
CalcSpectrum

Density Calculator

Calculate density (mass per unit volume) in kg/m3 and g/cm3 from a mass and a volume.

Free to use · Instant results
Loading calculator…

How It's Calculated

Formula

\rho = \dfrac{\text{mass}}{\text{volume}}

This calculator computes density — mass per unit volume — from a mass and a volume you enter in your choice of common units. Mass is always mass, not gravitational weight: density does not depend on gravity, so no gravity input is used here. Internally, mass is converted to kilograms and volume to cubic meters using exact conversion factors (1 g = 0.001 kg, 1 cm3 = 0.000001 m3, 1 L = 0.001 m3), density is computed as kg/m3, and it is also reported as g/cm3 using the exact relation 1 g/cm3 = 1000 kg/m3.

Worked Examples

1 kg in 0.001 m3 (1 liter)

  1. Mass: 1 kg. Volume: 0.001 m3 (1 L = 0.001 m3).
  2. Density = 1 / 0.001 = 1000 kg/m3.
  3. 1000 kg/m3 / 1000 = 1 g/cm3.

Frequently Asked Questions

Is this mass or weight?

Mass. Density is mass divided by volume and does not depend on gravity, so this calculator has no gravity or location input. A separate Weight Calculator handles gravitational force.

Why does the calculator show both kg/m3 and g/cm3?

These are the two most common density units in science and engineering. They convert exactly: 1 g/cm3 equals 1000 kg/m3, so both are shown from the same underlying calculation.

What happens if I enter a volume of zero?

Volume must be a positive number — density is undefined for zero volume (division by zero), so a zero or negative volume is rejected.

Can mass be zero?

Yes. A mass of zero in a positive volume is mathematically valid and yields a density of zero.