A pile of gold bars, the densest material in the chart, illustrating how density packs a lot of mass into a small volume
Science · 7 min read

How to calculate density

Density is just mass divided by volume, but the units and the rearranging are what trip people up. Here is the formula, worked examples both ways, and a chart of common materials.

Do the mathsDensity Calculator

Find density from mass and volume with the formula density = mass divided by volume.

mass volume = density
Density packs mass into volume: heavier for its size means denser.

Density is one of the first real formulas you meet in science, and it turns up everywhere after that: why ice floats, why a steel ship does not sink, why oil sits on top of water, how you tell real gold from a fake. The calculation itself is simple, but two things catch people out: rearranging the formula to find mass or volume, and keeping the units straight. Get those right and you can find the density of anything.

In short: density is how much mass is packed into a given volume. The formula is density = mass / volume. Weigh the object to get its mass, measure its volume, then divide. A 300 gram block that takes up 100 cubic centimetres has a density of 3 g/cm³. A free density calculator works it out, and also finds mass or volume if you have the other two.

The density formula

Density is defined as mass divided by volume. In symbols it is written with the Greek letter rho:

ρ = m / V

where ρ is density, m is mass, and V is volume. That is the whole thing. A material with a high density, like lead, packs a lot of mass into a small space. A material with a low density, like cork, has very little mass for its size, which is why a big piece of cork still feels light.

The density triangle: rearranging the formula

Most density questions do not actually ask for density. They give you two of the three values and ask for the third, so you need all three versions of the formula:

The classic memory aid is the density triangle. Put m in the top of a triangle, with ρ and V in the two bottom corners. Cover the value you want and the triangle shows the sum: cover m and you see ρ × V, cover ρ and you see m over V, cover V and you see m over ρ. It is the same formula three ways, so you only ever have to remember one.

mρV

How to calculate density (worked example)

Say you have a metal block. You put it on a scale and it weighs 540 grams. You measure it and it is 10 cm long, 5 cm wide and 4 cm tall, so its volume is 10 × 5 × 4 = 200 cubic centimetres. Divide:

ρ = m / V = 540 / 200 = 2.7 g/cm³

That answer is a clue to what the metal is. A density of 2.7 g/cm³ is almost exactly aluminium, so the block is very likely aluminium. This is how density works as a fingerprint for materials, and it is why the chart further down is so useful.

If an object is an awkward shape you cannot measure with a ruler, find its volume by water displacement: lower it into a measuring cylinder of water and see how much the water level rises. A rise of 200 millilitres means a volume of 200 cm³, since 1 millilitre equals 1 cm³. This works for objects that sink and do not soak up water; for something that floats, push it right under with a thin rod, or tie it to a heavier sinker and subtract the sinker's volume afterwards.

How to find mass or volume instead

The same formula, rearranged, answers the other two questions.

Finding mass. A bar of aluminium (density 2.7 g/cm³) has a volume of 50 cm³. How heavy is it? Use m = ρ × V = 2.7 × 50 = 135 grams.

Finding volume. You have 50 grams of pure gold (density 19.3 g/cm³). How much space does it take up? Use V = m / ρ = 50 / 19.3 = 2.59 cm³. That is the point of gold being so dense: a valuable amount of it is tiny.

This is also how you spot fake gold. Weigh a bar, measure its volume by displacement, and divide. A bar that weighs 100 grams but takes up 10 cm³ has a density of just 10 g/cm³, nowhere near gold's 19.3, so it is not solid gold. Real density is very hard to fake.

Units, and the trap that catches everyone

Density is always a mass unit over a volume unit, so the two most common forms are grams per cubic centimetre (g/cm³) and kilograms per cubic metre (kg/m³). The trap is mixing them. They are not the same size of number:

1 g/cm³ = 1000 kg/m³

Water, for example, is 1 g/cm³, which is the same as 1000 kg/m³. If a question gives you mass in kilograms and size in centimetres, convert to one consistent system before you divide, or your answer will be out by a factor of 1000. The quickest habit: decide up front whether you are working in grams and cm, or kilograms and metres, and convert everything to match before you touch the formula.

Here is the trap in numbers. A block has a mass of 2 kg and a volume of 0.001 m³, so its density is 2 / 0.001 = 2000 kg/m³. Convert first to grams and cubic centimetres (2000 g and 1000 cm³) and you get 2000 / 1000 = 2 g/cm³. Same density, very different-looking number.

A few handy equivalents: g/cm³, g/mL and kg/L are all the same thing, so water is 1 g/cm³ = 1 g/mL = 1 kg/L = 1000 kg/m³. In imperial units water works out to about 62.4 pounds per cubic foot.

Density chart of common materials

Densities are usually quoted in g/cm³ at about 20°C. Anything less dense than the liquid it sits in floats, and anything denser sinks, which is the next section. Wood, cork and steel vary by species or alloy, so treat these as typical values.

MaterialDensity (g/cm³)Density (kg/m³)
Air0.00121.2
Cork0.24240
Pine wood0.42420
Ethanol0.79790
Olive oil0.92920
Ice0.92917
Water1.001000
Seawater1.031030
Aluminium2.702700
Steel7.857850
Iron7.877870
Copper8.968960
Silver10.4910490
Lead11.3411340
Mercury13.5313530
Gold19.3019300

Values at about 20°C and normal pressure, cross-checked against the NIST reference data and the CRC Handbook of Chemistry and Physics. Gas densities like air change a lot with temperature and pressure, and water is exactly 1.000 g/cm³ only near 4°C (it is about 0.998 at 20°C).

Will it float? Density and buoyancy

An object floats if it is less dense than the liquid it sits in, and sinks if it is more dense. Water is 1.0 g/cm³, so pine wood at 0.42 floats, while iron at 7.87 sinks like a stone. Ice (0.92) floats on water, which is why icebergs poke above the surface and why a drink with ice cubes has them bobbing at the top.

The same rule explains why oil sits on top of water: olive oil at about 0.92 g/cm³ is less dense, so it floats. And "float" always means relative to the liquid, not to water specifically. Lead (11.34) sinks in water but floats on mercury (13.53), because mercury is denser still. Temperature matters too, since density shifts a little as a liquid warms or cools, which a quick temperature converter makes easy to track.

So how does a steel ship, made of a metal eight times denser than water, stay up? Because what matters is the average density of the whole ship, hull plus the air inside it. A solid steel ball sinks, but shape that same steel into a hull around a large volume of air and the average density of the ship drops below 1.0, so it floats. Fill the hull with water and the average density climbs back above 1.0, which is exactly how a ship sinks.

Specific gravity, a related idea

You will sometimes see specific gravity instead of density. It is just the density of a material divided by the density of water (1.0 g/cm³ near 4°C), which makes it a plain number with no units. Gold has a density of 19.3 g/cm³ and a specific gravity of 19.3. Because it is unitless, specific gravity is handy for comparing materials or for quick float checks: anything with a specific gravity above 1 sinks in water, anything below 1 floats. It is really just a ratio, and if ratios or percentages feel shaky, our guide on how to work out a percentage is a quick refresher.

Common mistakes to avoid

These are the slips that cost marks and give silly answers.

MistakeFix
Mixing grams with metres, or kg with cmConvert everything to one system first (g and cm, or kg and m)
Dividing volume by massDensity is mass ÷ volume, not the other way round
Measuring an odd shape with a rulerUse water displacement for the volume instead
Forgetting 1 mL = 1 cm³Liquid volume in mL is the same number in cm³
Assuming density never changesIt shifts a little with temperature, so values are quoted at a set temperature

Density questions

What is the formula for density?
Density = mass / volume, written ρ = m / V. Rearranged, mass = density × volume and volume = mass / density.

What is the density of water?
Water is 1.0 g/cm³, which is the same as 1000 kg/m³. It is the reference point: materials below 1.0 float on water and materials above it sink.

How do I find the volume of an irregular object?
Lower it into a measuring cylinder of water and read how much the water rises. The rise in millilitres equals the volume in cubic centimetres, since 1 mL = 1 cm³.

Why does a heavy steel ship float?
Because a ship is mostly air inside a thin steel hull, so its average density is less than water even though steel itself is far denser. If the hull fills with water, the average density rises above water and the ship sinks.

What units is density measured in?
Usually grams per cubic centimetre (g/cm³) or kilograms per cubic metre (kg/m³). They differ by a factor of 1000: 1 g/cm³ = 1000 kg/m³.

What is specific gravity?
The density of a material divided by the density of water, which gives a plain number with no units. Anything with a specific gravity above 1 sinks in water, anything below 1 floats.

Calculators in this article

Density Calculator

Find density from mass and volume with the formula density = mass divided by volume.

Open

Molar Mass Calculator

Type a chemical formula, like H2SO4 or Ca(OH)2, to get its molar mass in grams per mole.

Open

Temperature Converter

Convert a temperature between Celsius, Fahrenheit and Kelvin.

Open

Scientific Calculator

A full scientific calculator with trig, logs, powers, roots and more. Type or tap.

Open