Maths

Density Calculator

Find density, mass or volume from the other two, in g/cm³ and kg/m³.

By Nitin Raturi · Last reviewed

Your material

How to use the Density Calculator

Find density, mass or volume from the other two.

  1. Choose what to find.
  2. Enter the two values you know, in grams and cm³.
  3. Read the answer, and density in kg/m³.

Good to know

  • 1 mL = 1 cm³, so liquid volumes can be entered directly.

Density = mass ÷ volume. Use grams and cm³ (1 cm³ = 1 mL).

Find

Find

Choose the quantity you want; enter the other two.

How to fill it in

  • Density from mass and volume.
  • Mass from density and volume.
  • Volume from density and mass.

Mass (g)

How much matter, in grams. 1 kg is 1,000 g.

How to fill it in

  • Enter a number above 0.

Example

90.7 g of lead in 8 cm³ is 11.3375 g/cm³.

Volume (cm³)

The space it takes up, in cubic centimetres. 1 cm³ is 1 mL; 1 litre is 1,000 cm³.

How to fill it in

  • Enter a number above 0.
  • For an odd shape, measure the water it displaces.

Example

1,000 cm³ of water at 1 g/cm³ weighs 1,000 g; iron displacing 4.0 mL with 31.48 g is 7.87 g/cm³.

Density

11.3375 g/cm³

90.7 g ÷ 8 cm³ = 11.3375 g/cm³, or 11,337.5 kg/m³.

Density
11.3375 g/cm³ (11,337.5 kg/m³)
Mass
90.7 g
Volume
8 cm³

Density = mass ÷ volume at the conditions measured; gases and liquids change density with temperature. Rounded to six decimals for display.

How this calculator works

  1. Step 1Densityρ = m ÷ VFrom mass and volume.
  2. Step 2Massm = ρ × VFrom density and volume.
  3. Step 3VolumeV = m ÷ ρFrom density and mass.

Density tells you how much mass is packed into each unit of volume. Knowing any two of density, mass and volume gives the third. The calculator works in grams and cubic centimetres, and also shows kilograms per cubic metre.

Worked example: a cube of lead

Density of a 2.00 cm lead cube with a mass of 90.7 g
Density
mass ÷ volume
  1. Volume2.00 × 2.00 × 2.00 cm8 cm³
  2. Density90.7 g ÷ 8 cm³11.3375 g/cm³

This is OpenStax Chemistry Example 1.1, which rounds the answer to 11.3 g/cm³.

Sinks or floats

  • Iron7.87 g/cm³Denser than water, so it sinks.
  • Wood0.65 g/cm³Less dense than water, so it floats.

Read the result

The headline is the quantity you chose; the table shows all three, with density in both g/cm³ and kg/m³.

A litre (1,000 cm³) of water at 1 g/cm³ weighs 1,000 g. 100 g of aluminium takes up 37.037037 cm³.

Assumptions and limits

  • Grams and cm³1 cm³ = 1 mL; 1 g/cm³ = 1,000 kg/m³.
  • TemperatureDensities of liquids and gases change with temperature.
  • Uniform materialMixed or hollow objects give an average density.

Density links mass and volume. Shape volumes and solution strength are the next steps.

To find the volume of a solid first, use the volume calculator. For concentration in moles per litre, try the molarity calculator, and to convert units, the unit converter.

Common mistakes

  • Mistake: Mixing kilograms with cm³.

    Instead: Convert to grams first: 1 kg = 1,000 g.

  • Mistake: Using litres as cm³.

    Instead: 1 litre is 1,000 cm³.

Checking the method

Every golden case is rechecked in SI units with exact fractions, and three OpenStax examples are reproduced.

An independent script converts to kilograms and cubic metres, divides exactly, and converts back.

Read how we test our calculators, or browse more maths calculators.

Frequently asked questions

What is the density formula?

Density = mass ÷ volume. 90.7 g of lead in 8 cm³ is 11.3375 g/cm³.

How do I find mass from density?

Multiply density by volume. 1,000 cm³ of water at 1 g/cm³ is 1,000 g.

How do I find volume from density?

Divide mass by density. 100 g of aluminium at 2.7 g/cm³ is 37.037037 cm³.

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

Multiply by 1,000. Iron at 7.87 g/cm³ is 7,870 kg/m³.

Is 1 mL the same as 1 cm³?

Yes. One millilitre is exactly one cubic centimetre, so liquid volumes can be entered directly.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 3 Nov 2026; next review due by . Found an error? Tell us.

Changelog

  • : Initial release.