# Density Calculator

URL: https://hifreetools.com/science/density-calculator

> Calculate density, mass, or volume from the relation ρ = m / V. Enter any two values and this tool solves the third instantly, showing the answer in both kg/m³ and g/cm³.

## Quick answer

Density is mass divided by volume: ρ = m / V. With mass in kilograms and volume in cubic meters, density is expressed in kilograms per cubic meter (kg/m³); divide by 1000 to convert to grams per cubic centimeter (g/cm³). For example, 1000 kg in 1 m³ gives a density of 1000 kg/m³, which equals 1 g/cm³ — the density of liquid water.

## Formula

- ρ = m ÷ V
- m = ρ × V
- V = m ÷ ρ

## Inputs

- Mass (kg) (0 to 1000000000000000); default 1000
- Volume (m³) (0 to 1000000000000000); default 1
- Density (kg/m³) (0 to 1000000000000000); default 1000

## Worked examples (computed by the page's own function)

- Mass (kg) = 1000, Volume (m³) = 1 → Density (kg/m³) = 1000, Density (g/cm³) = 1  (ρ = 1000 kg ÷ 1 m³ = 1000 kg/m³)
- Mass (kg) = 7874, Volume (m³) = 1 → Density (kg/m³) = 7874, Density (g/cm³) = 7.874  (ρ = 7874 kg ÷ 1 m³ = 7874 kg/m³)
- Density (kg/m³) = 2500, Mass (kg) = 50 → Volume (m³) = 0.02, Volume (L) = 20  (V = 50 kg ÷ 2500 kg/m³ = 0.02 m³)

## Verification

Checked against 11 reference cases (expected values computed independently). Reviewed 2026-10-27. Latest change 2026-10-27: Moved to the schema renderer with a sourced ledger; zero or negative mass, volume or density now shows a field error.

## FAQ

**What is the formula for density?**
Density equals mass divided by volume: ρ = m / V. To find mass, multiply density by volume (m = ρ × V); to find volume, divide mass by density (V = m / ρ).

**What units does this density calculator use?**
It uses SI base units: mass in kilograms (kg) and volume in cubic meters (m³), giving density in kilograms per cubic meter (kg/m³). When you solve for density it also shows the result in grams per cubic centimeter (g/cm³), which is kg/m³ divided by 1000.

**How do I convert kg/m³ to g/cm³?**
Divide the kg/m³ value by 1000. For example, 7870 kg/m³ (iron) ÷ 1000 = 7.87 g/cm³. The conversion factor is exactly 1000 because 1 g/cm³ equals 1000 kg/m³.

**What is the density of water?**
Pure liquid water is about 1000 kg/m³, or 1 g/cm³, at 4 °C — the temperature where it is densest. It drops slightly with temperature (about 997 kg/m³ at 25 °C) and is the default reference point for floating and sinking.

**Can I calculate mass or volume instead of density?**
Yes. Use the "Solve for" selector to choose Mass or Volume. Enter the other two values and the tool rearranges ρ = m / V automatically — mass becomes ρ × V and volume becomes m / ρ.

**Why does the calculator refuse to compute when volume is zero?**
Density is mass per unit volume, so dividing by a volume of zero is mathematically undefined. The calculator guards against this and leaves the result blank until you enter a non-zero volume (and likewise a non-zero density when solving for volume).


## Sources

- [BIPM — The International System of Units (SI Brochure), derived units](https://www.bipm.org/en/publications/si-brochure)
- [Wikipedia — Density](https://en.wikipedia.org/wiki/Density)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Density Calculator", https://hifreetools.com/science/density-calculator
