Density Calculator
Enter any two of density, mass and volume, and the calculator finds the third. Pick units from metric, US customary and imperial.
Formulas
- Density = mass ÷ volume
- Mass = density × volume
- Volume = mass ÷ density
Density is the mass per unit of volume. Wikipedia's article on density defines it as the ratio of a substance's mass to its volume (ρ = m/V), gives the SI unit as kilograms per cubic meter (kg/m³), and says that the density of a material varies with temperature and pressure (checked October 31, 2026).
Unit combinations
- Mass can be in t (metric ton), kg, g, mg, lb (pound) or oz (ounce). Volume can be in m³, L, dL, mL (cm³), US gallon, Imperial gallon, ft³ or in³.
- A density unit is a combination of a mass unit and a volume unit, such as kg/m³, g/cm³ (= g/mL), g/L, kg/L, t/m³ or lb/ft³. Each mass and volume unit uses the same definition as the Weight Converter and the Volume Converter, so relations such as 1 g/cm³ = 1 g/mL = 1 kg/L = 1,000 kg/m³ hold exactly.
- The US gallon (231 cubic inches, 3.785411784 L) and the Imperial gallon (4.54609 L) are different units, and they are labeled "US gal" and "Imperial gal" so they are not confused. A US gallon is not an Imperial gallon: the Imperial gallon is about 20% larger.
- lb and oz are the avoirdupois pound and ounce (not the troy ounce). Mass in pounds or ounces is a mass, not a force.
- The calculation uses exact fractions, and rounding happens once, for display. The result and the values in SI base units (kg/m³, kg, m³) are shown.
When a value is 0
- Mass = density × volume: if either is 0, the mass is 0.
- Density = mass ÷ volume: if the volume is 0 and the mass is 0 too, the density is undetermined (0 ÷ 0). If the volume is 0 and the mass is more than 0, the inputs contradict each other and an error is shown.
- Volume = mass ÷ density: if the density is 0 and the mass is 0 too, the volume is undetermined. If the density is 0 and the mass is more than 0, it is a contradiction.
- Negative values cannot be entered. You can enter up to 12 digits before the decimal point and 6 decimal places. If you fill in all three values, an error is shown.
Examples
- A liquid with a density of 1 g/cm³, 500 mL → mass 500 g (1 g/cm³ × 500 cm³)
- A mass of 2 kg and a volume of 2.5 L → density 0.8 kg/L (= 800 kg/m³ = 0.8 g/cm³)
- A mass of 10 kg and a density of 0.8 g/mL → volume 12.5 L
- 3 m³ of a substance with a density of 1,000 kg/m³ → mass 3,000 kg (3 t)
Notes
- Typical densities of substances such as water or iron change with temperature, pressure and purity, so this calculator does not list them. Enter a value that you have checked in a reference.
- To convert only the units of mass or volume, use the Weight Converter or the Volume Converter.
- A density in a combination such as g/cm³, kg/L or lb/ft³ is calculated from the definitions of the mass unit and the volume unit. This calculator does not claim that a given combination is an officially defined unit.
Sources
The definition of density and its SI unit were checked in the text of the Wikipedia article "Density" on October 31, 2026. The definitions of the mass and volume units are the ones used by the Weight Converter and the Volume Converter on this site, which come from NIST publications: NIST SP 811, Appendix B.8 and NIST Handbook 44, Appendix C.
Frequently asked questions
What is 1 g/cm³ in kg/m³?
1,000 kg/m³ (1 g = 0.001 kg, and 1 cm³ = 0.000001 m³).
What is the density of water?
This calculator does not list densities of substances. They change with temperature, so enter a value that you have checked in a reference.
Why does it say "Undetermined"?
When the mass is 0 and the volume (or the density) is 0 too, the calculation is 0 ÷ 0, and the answer is not a single value.
Why do I get an error when I fill in all three?
The calculator finds the missing quantity from the other two. Leave the one you want to find empty.