Menu

Density Calculator

Density, mass or volume from the other two, in kg/m³, g/cm³ or lb/ft³.

By Nethanel Bar, Co-founder & CEO

Last updated

Want to solve these without the calculator?

The Coddy physics course teaches the method: you solve each problem in steps on an interactive board, and it tells you which step went wrong.

The density formula, and what it says

Density tells you how much mass is packed into each unit of volume. The formula is ρ = m/V: the mass m divided by the volume V, with ρ (the Greek letter rho) for density. With the mass in kilograms and the volume in cubic metres the answer is in kg/m³; with grams and cubic centimetres it is in g/cm³. A 540 g block that takes up 200 cm³ has a density of 540 / 200 = 2.7 g/cm³.

Density belongs to the material, not to the object. A gold ring and a gold bar have the same density, 19.3 g/cm³, even though the bar is far heavier. That is why it predicts floating: an object sinks in water if it is denser than water, 1000 kg/m³, and floats if it is less dense. Ice, at about 917 kg/m³, floats with roughly nine tenths of it under the surface.

The calculator solves the formula for whichever of ρ, m and V you leave blank. Give a mass and a volume for the density, a density and a volume for the mass, or a density and a mass for the volume. Masses in g, mg, t, lb or oz, volumes in L, mL, cm³, ft³, in³ or US gallons and densities in g/cm³, g/mL, kg/L or lb/ft³ are converted to SI first, and the answer is shown in the other units as well.

What to notice

  • ρ = m/V. Rearranged, it gives the mass, m = ρV, and the volume, V = m/ρ.
  • 1 g/cm³ = 1 g/mL = 1 kg/L = 1000 kg/m³. Water is 1 in the first three units and 1000 in the last.
  • Density does not depend on how much of the material you have. Cut a block in half and both the mass and the volume halve, so their ratio stays the same.
  • An object floats in a liquid that is denser than it is and sinks in one that is less dense. Steel ships float because their hulls hold air, so the ship as a whole is less dense than water.
  • Density changes a little with temperature, and a lot for gases. Water is densest at 4 °C; air at room temperature and sea level is about 1.2 kg/m³.

How to calculate density

  1. Measure the mass

    Weigh the object on a scale. Grams are fine if you want the answer in g/cm³; for kg/m³ use kilograms, or let the calculator convert.

  2. Find the volume

    For a box shape, multiply length by width by height: a 5 cm by 4 cm by 3 cm block is 60 cm³. For an odd shape, lower it into water and measure how much the level rises: 1 mL of rise is 1 cm³.

  3. Divide the mass by the volume

    ρ = m / V. A 162 g block of 60 cm³ has a density of 162 / 60 = 2.7 g/cm³.

  4. Check the units

    Grams over cm³ gives g/cm³; kilograms over m³ gives kg/m³. Multiply g/cm³ by 1000 for kg/m³: 2.7 g/cm³ is 2700 kg/m³.

Densities of common materials

Typical textbook values at room temperature, rounded. Anything above water's 1000 kg/m³ sinks in fresh water; anything below it floats.

Materialkg/m³g/cm³lb/ft³
Air (20 °C, sea level)1.20.00120.075
Cork2400.2415.0
Petrol7500.7546.8
Ice9170.91757.2
Water (4 °C)10001.00062.4
Seawater10251.02564.0
Glass25002.5156
Aluminium27002.70169
Iron78707.87491
Copper89608.96559
Silver10,49010.49655
Lead11,34011.34708
Mercury (20 °C)13,54613.55846
Gold19,30019.31,205

Worked examples

Which metal is it?

plain
m = 540 g, V = 200 cm³

Convert to SI first: 540 g = 0.54 kg and 200 cm³ = 0.0002 m³. Then ρ = 0.54 / 0.0002 = 2700 kg/m³, which is 2.7 g/cm³. That matches aluminium in the table.

The mass of a cubic centimetre of gold

plain
ρ = 19.3 g/cm³, V = 1 cm³

Rearrange for m: m = ρ · V. In SI that is 19,300 kg/m³ · 0.000001 m³ = 0.0193 kg, which is 19.3 g. A cube of gold 1 cm on each side weighs almost 20 g.

The volume of 2 kg of water

plain
ρ = 1000 kg/m³, m = 2 kg

Rearrange for V: V = m / ρ = 2 / 1000 = 0.002 m³. The calculator also shows it as 2 L and 2000 mL: two litres of water have a mass of 2 kg.

How big is a kilogram of gold?

plain
ρ = 19.3 g/cm³, m = 1 kg

V = m / ρ = 1 / 19,300 = 0.0000518 m³, which is 51.8 cm³: smaller than a deck of cards. Set the volume's unit to cm³ before solving and the answer comes out in cm³.

The air in a room

plain
ρ = 1.2 kg/m³, V = 50 m³

A room 5 m by 4 m by 2.5 m holds 50 m³ of air. m = ρ · V = 1.2 · 50 = 60 kg, about the mass of an adult. Air is light per cubic metre, but a room holds a lot of it.

Common mistakes

  • Mixing units. Grams divided by cubic metres, or kilograms by cubic centimetres, gives a number in neither g/cm³ nor kg/m³. Use matching units, or let the calculator convert.
  • Thinking 1 g/cm³ is 1 kg/m³. It is 1000 kg/m³: a kilogram is 1000 g, but a cubic metre is 1,000,000 cm³.
  • Dividing the wrong way. Density is mass over volume, m/V. V/m gives the volume per unit of mass, the inverse.
  • Getting the volume units wrong. 1 m³ is 1000 L, and 1 L is 1000 cm³. A 2 L bottle is 0.002 m³, not 2 m³.
  • Measuring lengths in different units before multiplying them for the volume. Put all three in centimetres, or all in metres, first.
  • Confusing heavy with dense. A large log is heavier than a small iron nail, but wood is less dense than water and floats, while iron sinks.

Density FAQ

What is the formula for density?

ρ = m/V: density equals mass divided by volume. With the mass in kilograms and the volume in cubic metres, the density is in kg/m³; with grams and cm³ it is in g/cm³.

How do you calculate density?

Measure the mass, find the volume, then divide the mass by the volume. A 162 g block measuring 5 cm by 4 cm by 3 cm has a volume of 60 cm³, so its density is 162 / 60 = 2.7 g/cm³.

How do you find the mass from density and volume?

Multiply them: m = ρV. A 1 cm³ piece of gold, with a density of 19.3 g/cm³, has a mass of 19.3 g. Check that the volume is in the same unit the density uses.

How do you find the volume from density and mass?

Divide the mass by the density: V = m/ρ. 2 kg of water at 1000 kg/m³ fills 2 / 1000 = 0.002 m³, which is 2 litres.

How do you convert g/cm³ to kg/m³?

Multiply by 1000. 2.7 g/cm³ is 2700 kg/m³, and 1 g/cm³ (water) is 1000 kg/m³. To go back, divide by 1000. g/mL and kg/L are the same size as g/cm³.

What is the density of water?

About 1000 kg/m³, which is 1 g/cm³ or 1 g/mL. It is densest at 4 °C and slightly less at room temperature, about 998 kg/m³. Seawater is denser, about 1025 kg/m³, because of the dissolved salt.

Why do some things float and others sink?

An object floats if its density is less than the liquid's and sinks if it is greater. Cork at 240 kg/m³ floats on water at 1000 kg/m³; iron at 7870 kg/m³ sinks. Ice at 917 kg/m³ floats with about 92% of it under fresh water.

How do you find the volume of an irregular object?

Use water displacement. Lower the object into a measuring cylinder of water and read how much the level rises: a rise of 15 mL means the object's volume is 15 cm³. Then type the mass and that volume into the calculator.

More physics calculators

Coddy programming languages illustration

Learn physics with Coddy

Get started