Skip to content
CalcTide logo
Education & Math

Density Calculator

A substance with a mass of 100 grams and a volume of 20 cubic centimeters has a density of 5 g/cm³. This density calculator uses the formula density equals mass divided by volume to solve for any one of the three values. Enter any two values, mass, volume, or density, and the tool calculates the third. Density is one of the most practical science formulas because it connects the two ways people normally describe an amount, how much it weighs and how much space it takes. A brick feels heavy for its size because it is dense. A foam cushion feels light because it is not. This calculator gives you that same comparison with actual numbers. You can find density from a weight and a volume measured in any consistent unit system, such as grams and cubic centimeters, kilograms and liters, or pounds and gallons. The tool works by rearranging the same equation three ways. If mass and volume are known, it divides mass by volume to show density. If density and volume are known, it multiplies them to show mass. If mass and density are known, it divides mass by density to show volume. All three paths use the same underlying relationship, which is why the formula stays the same no matter which field you leave empty.

Education & MathBy

Quick answer

Density equals mass divided by volume. It tells you how much mass is packed into a given space.

Enter exactly two positive values and leave the third empty.

What this tells you

  • Density equals mass divided by volume. It tells you how much mass is packed into a given space.
  • Mass equals density times volume. Use this when you know how dense a substance is and how much of it you have.
  • Volume equals mass divided by density. Use this to find how much space a given mass of material will take up.
  • All values must be positive. The formula divides or multiplies directly with no squared or cubed terms.
  • Units must be consistent. If mass is in grams and volume is in cubic centimeters, density will be in grams per cubic centimeter.

How to Use

  1. 1Enter the two values you know, mass and volume, mass and density, or volume and density.
  2. 2Leave the unknown field empty. The calculator solves for that missing value.
  3. 3All three values must use consistent units, such as grams for mass and cubic centimeters for volume, or kilograms and liters.
  4. 4Read the result. The solved value uses the same unit system as the inputs.

How It Works

Formula

density = mass / volume

Density is the ratio of an object's mass to its volume. A higher density means more mass fits into the same space. The formula can be rearranged in three ways: density equals mass divided by volume, mass equals density times volume, and volume equals mass divided by density. The calculator uses the appropriate rearrangement based on which field you leave empty.

Calculation note: values are processed in the order shown above, using the current input units.

Worked Examples

Find density

Mass100
Volume20
ResultDensity = 5

Divide 100 by 20 to get a density of 5.

Find mass

Volume20
Density5
ResultMass = 100

Multiply density of 5 by volume of 20 to get a mass of 100.

Find volume

Mass100
Density5
ResultVolume = 20

Divide mass of 100 by density of 5 to get a volume of 20.

Densities of Common Substances

SubstanceDensity (g/cm³)
Water1.0
Aluminum2.7
Iron7.87
Gold19.3

Common mistakes

  • Mixing unit systems. If mass is in grams, volume must be in cubic centimeters or milliliters. Kilograms work with liters.
  • Forgetting which field to leave empty. The calculator solves for the one field that is blank, so make sure the two known values are filled in.
  • Using zero or negative values. Mass, volume, and density must all be positive numbers.

Embed this calculator on your site

Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.

<script src="https://calctide.com/embed.js" data-tool="density-calculator" async></script>

Preview the embed at /embed/density-calculator/.

Frequently Asked Questions

Divide mass by volume. If a material has a mass of 100 grams and a volume of 20 cubic centimeters, its density is 5 grams per cubic centimeter. This formula works for solids, liquids, and gases, though gases are usually measured at a specific temperature and pressure.
The formula mass equals density times volume is the rearrangement of the density equation. It tells you how much mass a given volume of a known-density material contains. For example, 10 cubic centimeters of aluminum at 2.7 g/cm³ has a mass of 27 grams.
Density uses mass units divided by volume units. Common pairs include grams per cubic centimeter (g/cm³), kilograms per liter (kg/L), and pounds per gallon. The numeric value changes with the unit system, so 1 g/cm³ equals 1 kg/L.
Divide mass by density. If you have 100 grams of a substance with a density of 5 g/cm³, the volume is 100 divided by 5, or 20 cubic centimeters. This rearrangement is useful for estimating how much space a given amount of material will fill.
No, the calculator assumes all values use a consistent unit system. Convert values to compatible units, such as grams and cubic centimeters, or kilograms and liters, before entering them. Mixing unit systems will give a wrong result.
A higher density means more mass is packed into the same volume. Gold is about 19 times denser than water, so a gold bar the size of a water bottle weighs about 19 times more. Density also explains why some objects float and others sink in water. Objects with a density below 1 g/cm³ float, and those above sink.
Most materials expand when heated and contract when cooled, which changes their volume without changing their mass. The same mass spread across a larger volume means lower density. This calculator uses a fixed density for the given inputs and does not adjust for temperature changes.
It estimates density calculator outputs using the visible inputs and formula assumptions on this page.

Explore More in Education & Math