ToolNimba

⚖️ Density Calculator: Solve for Density, Mass or Volume

Shihab Mia By Shihab Mia · Updated 2026-07-11

Enter any two of density, mass and volume and the calculator solves for the third using density = mass / volume. Pick your units and read the density in both g/cm³ and kg/m³.

Density

2.5 g/cm³

2,500 kg/m³

Using density = mass / volume = 20 g / 8 cm³

Common material densities (g/cm³)

Material Density (g/cm³) Density (kg/m³)

Values are typical at room temperature. Click a row to load its density.

This density calculator solves the density formula rho = mass / volume for whatever value you are missing. Enter any two of density, mass and volume, choose your units for mass (g, kg, lb) and volume (cm3, mL, L, m3), and it instantly returns the answer in both g/cm3 (the same as g/mL) and kg/m3. It handles decimals, converts units for you, and shows the exact working so you can check every step.

What is the Density Calculator?

Density measures how much mass is packed into a given amount of space. It is defined by one short equation, rho = mass / volume, where rho (the Greek letter said "row") is the density, mass is how much matter an object contains, and volume is how much space it takes up. Rearranging that single relationship gives you three tools in one: density = mass / volume, mass = density times volume, and volume = mass / density. Because all three come from the same formula, if you know any two of the quantities you can always find the third, which is exactly what this calculator does.

The units you use matter just as much as the arithmetic. In everyday science and chemistry, density is usually quoted in grams per cubic centimetre (g/cm3), which is numerically identical to grams per millilitre (g/mL) because one millilitre is defined as one cubic centimetre. In the full SI system the unit is kilograms per cubic metre (kg/m3), and the two scales differ by exactly a factor of 1000: water is 1.0 g/cm3 or 1000 kg/m3. This tool reports both so you never have to convert by hand, and it accepts pounds and litres too, quietly converting everything to a common base before dividing.

Water is the reference that makes density intuitive. Pure water at room temperature has a density very close to 1.0 g/cm3, so any material with a density below 1.0 will float on water and anything above it will sink. Cork (about 0.24) and ice (0.92) float, while aluminium (2.7), iron (7.87) and gold (19.3) sink quickly. This floating rule is really a statement about relative density, or specific gravity, which is just an object density divided by the density of water. Because water is 1.0 g/cm3, the specific gravity of a material is numerically the same as its density in g/cm3, which is why the reference table below doubles as a float-or-sink guide.

One caution worth remembering is that density is not perfectly fixed. It changes with temperature and, for gases especially, with pressure. Heating a substance usually makes it expand, so the same mass occupies more volume and the density falls; this is why warm air rises and why the density of water peaks at about 4 degrees Celsius rather than at freezing. For solids and liquids the shift is small enough to ignore in most classroom and workshop calculations, but for gases it is large, which is why air is quoted at a specific temperature and pressure. When precision matters, always note the conditions your density value was measured at.

When to use it

  • Solving physics and chemistry homework that asks for density, mass or volume from the other two.
  • Working out whether a material will float or sink by comparing its density to water at 1.0 g/cm3.
  • Estimating the weight of a block of metal, plastic or wood from its volume and known density.
  • Checking the purity of a metal such as gold by comparing its measured density to the reference value.
  • Converting a density between g/cm3 and kg/m3 for lab reports or engineering specifications.
  • Sizing a container or shipment by turning a target mass into the volume it will occupy.

How to use the Density Calculator

  1. Choose what you want to solve for: density, mass or volume.
  2. Enter the two values you already know and pick the matching units from each dropdown.
  3. Read the answer at the top of the results, shown in both g/cm3 and kg/m3 where relevant.
  4. Check the working line underneath to see the exact numbers that were divided or multiplied.
  5. Click any material in the reference table to load its density and try a mass or volume calculation.

Formula & method

density (rho) = mass / volume.   Rearranged: mass = density × volume, and volume = mass / density.   1 g/cm3 = 1 g/mL = 1000 kg/m3.
Density = Mass ÷ Volumeρ = m / V   (1 g/cm³ = 1 g/mL = 1000 kg/m³)mass = 20 ghow much matter÷volume = 8 cm³space it fills2.5 g/cm³2500 kg/m³Float or sink? Compare to water at 1.0 g/cm³1.0 waterfloat ← | → sinkCork 0.24Ice 0.92Aluminium 2.7Iron 7.87Lead 11.34Gold 19.3Below 1.0 g/cm³ floats on water; above 1.0 g/cm³ sinks.

Worked examples

A metal block has a mass of 20 g and a volume of 8 cm3. Find its density.

  1. Write the formula: density = mass / volume
  2. Substitute the values: density = 20 g / 8 cm3
  3. Divide: 20 / 8 = 2.5
  4. Convert to SI if needed: 2.5 g/cm3 = 2,500 kg/m3

Result: Density = 2.5 g/cm3 (2,500 kg/m3)

How much does 50 cm3 of aluminium weigh? Aluminium density is 2.7 g/cm3.

  1. Rearrange for mass: mass = density * volume
  2. Substitute the values: mass = 2.7 g/cm3 * 50 cm3
  3. Multiply: 2.7 * 50 = 135
  4. The volume unit cancels, leaving grams

Result: Mass = 135 g (0.135 kg)

Common material densities at room temperature

MaterialDensity (g/cm3)Density (kg/m3)Floats on water?
Air (sea level)0.00121.2Yes
Cork0.24240Yes
Ice0.92920Yes
Water1.01000Reference
Aluminium2.72700No
Iron7.877870No
Copper8.968960No
Lead11.3411340No
Gold19.319300No

Unit conversions used by this calculator

QuantityUnitIn base units
Mass1 kg1000 g
Mass1 lb453.592 g
Volume1 mL1 cm3
Volume1 L1000 cm3
Volume1 m31,000,000 cm3
Density1 g/cm31000 kg/m3

Common mistakes to avoid

  • Mixing units without converting. Dividing grams by litres, or kilograms by cubic centimetres, gives a meaningless number. Convert mass and volume to a matching pair first, or let the calculator handle it by selecting the correct unit in each dropdown.
  • Confusing g/cm3 with kg/m3. These two units differ by a factor of 1000, not by a small rounding. Water is 1.0 g/cm3 but 1000 kg/m3. Always check which scale a value is quoted in before comparing two densities.
  • Swapping mass and volume in the formula. Density is mass divided by volume, not volume divided by mass. Flipping the two gives you the reciprocal (specific volume) instead, which will look far too small or far too large.
  • Forgetting that density changes with temperature. A density value is only exact at the temperature it was measured. This matters most for gases and for precise liquid work, so quote the conditions when accuracy counts rather than assuming one fixed number.

Glossary

Density (rho)
The mass contained in a unit of volume, found from mass divided by volume and usually written in g/cm3 or kg/m3.
Mass
The amount of matter in an object, measured in grams, kilograms or pounds. It stays the same regardless of location or shape.
Volume
The amount of space an object occupies, measured in cm3, mL, litres or m3.
Specific gravity
An object density divided by the density of water. Because water is 1.0 g/cm3, it equals the density in g/cm3.
g/cm3
Grams per cubic centimetre, the common density unit for solids and liquids. It is numerically the same as g/mL.
kg/m3
Kilograms per cubic metre, the SI density unit. It is 1000 times the value in g/cm3.

Frequently asked questions

What is the formula for density?

Density equals mass divided by volume, written rho = mass / volume. If you know any two of the three quantities you can find the third: mass = density times volume, and volume = mass / density. This calculator applies whichever version you need automatically.

How do I calculate density from mass and volume?

Divide the mass by the volume, making sure both are in matching units. For example, 20 g divided by 8 cm3 gives a density of 2.5 g/cm3. Select mass and volume in the tool above, choose your units, and it does the division and unit conversion for you.

Is g/cm3 the same as g/mL?

Yes. One millilitre is defined as exactly one cubic centimetre, so a density in g/mL is numerically identical to the same value in g/cm3. Water, for instance, is 1.0 g/cm3 and also 1.0 g/mL.

How do I convert g/cm3 to kg/m3?

Multiply the g/cm3 value by 1000. Water at 1.0 g/cm3 becomes 1000 kg/m3, and aluminium at 2.7 g/cm3 becomes 2700 kg/m3. The calculator shows both units side by side so you never have to convert by hand.

Will an object float or sink in water?

Compare its density to water at 1.0 g/cm3. Anything less dense than water floats, such as cork (0.24) and ice (0.92), while anything denser sinks, such as aluminium (2.7) and iron (7.87). This is why the reference table above marks each material as floating or not.

Why does the density of a substance change?

Density depends on temperature and, for gases, on pressure. Heating most materials makes them expand, so the same mass fills more volume and the density drops. The effect is small for solids and liquids but large for gases, which is why gas densities are quoted at a stated temperature and pressure.