Boneyard Tools

Density Calculator

Enter any two of mass, volume and density and this calculator solves for the third using density = mass / volume. Pick the mass unit (kg, g, mg or lb) and volume unit (m3, cm3, L or mL) that match your measurements. Every result is also shown in SI kilograms per cubic metre so you can compare materials on one scale.

How to calculate density

  1. Set the 'Solve for' menu to Density, Mass or Volume so the unknown field disappears.
  2. Choose your mass unit and volume unit from the two dropdowns.
  3. Type the two values you already know into the remaining fields.
  4. Read the highlighted answer in your chosen units, with the equivalent kg/m3 shown beneath the density card.
  5. Click Copy to grab all three values as plain text.

Examples

Density from mass and volume

Solve for Density, mass = 100 g, volume = 50 cm3
density = 2 g/cm3 (2000 kg/m3)

Mass from density and volume

Solve for Mass, density = 2 g/cm3, volume = 50 cm3
mass = 100 g

Volume from mass and density

Solve for Volume, mass = 200 g, density = 2 g/cm3
volume = 100 cm3

Frequently asked questions

What is the density formula?

Density equals mass divided by volume (d = m / V). Rearranged, mass = density x volume and volume = mass / density. The calculator applies whichever form matches the value you asked it to solve for.

What units does the calculator use?

You pick the mass unit (kg, g, mg or lb) and the volume unit (m3, cm3, L or mL). Density is displayed in that exact pair, for example g/cm3, and also converted to SI kg/m3 for reference.

How does the mixed unit conversion work?

Internally every value is converted to SI base units (kilograms and cubic metres), the missing quantity is solved, then the answer is converted back to the units you selected. That lets you combine grams with cubic centimetres or pounds with litres without doing the maths by hand.

How do g/cm3 and kg/m3 relate?

They differ by a factor of 1000, so 1 g/cm3 equals 1000 kg/m3. Water is close to 1 g/cm3, which is 1000 kg/m3 or 1 kilogram per litre. The tool shows both figures side by side.

What is the density of water?

Pure water near 4 C is about 1 g/cm3, equal to 1000 kg/m3 or 1 kg per litre. Enter 1 kg and 1 L and solve for density to reproduce that value.

Why can't volume be zero?

Density divides mass by volume, so a volume of zero would be a division by zero. When you solve for density or mass with a volume of zero the calculator reports that volume must be greater than zero.

Does temperature change the answer?

This is a pure arithmetic tool, so it uses the numbers you enter and does not adjust for temperature or pressure. Real densities shift as materials expand or contract, so measure mass and volume at the same conditions for an accurate result.

How precise is the result?

Answers are rounded to nine decimal places, which is far finer than most laboratory measurements. If a value looks slightly off in the last digits, that is floating point rounding rather than a formula error.

Is my data sent anywhere?

No. The calculation runs entirely in your browser with JavaScript, so the mass and volume figures you type never leave your device.

Learn more

Related tools