Density Calculator
Solve for density, mass or volume, with unit choices and a materials table.
Results update as you type.
About this calculator
Density measures how much mass is packed into a given volume: ρ = m / V. Rearranged, the mass of an object is m = ρ × V and the volume it occupies is V = m / ρ. This calculator lets you solve for any one of the three, entering the other two in whatever units you have — grams, kilograms, pounds and ounces for mass, and cm³/mL, litres or m³ for volume — and returns the density in both g/cm³ and the SI unit kg/m³ (1 g/cm³ = 1,000 kg/m³).
As a worked example, a 100 g object occupying 50 cm³ has a density of 100 / 50 = 2 g/cm³ (2,000 kg/m³) — a bit less dense than aluminium. Because pure water is very close to 1 g/cm³, the calculator also tells you whether a material floats: anything below about 1 g/cm³ floats, anything above sinks, and something right at 1 g/cm³ is neutrally buoyant. A built-in table lists common densities for comparison — ice 0.92, oak 0.75, water 1.00, aluminium 2.70, iron 7.87, lead 11.34 and gold 19.32 g/cm³.
Density is used to identify materials, check the purity of metals and gemstones, work out whether an object will float or sink, convert between the mass and volume of fuels and liquids, and calculate the load a structure or vessel must carry. Because it is an intensive property — independent of the amount of material — a small sample gives the same density as a large one, which is what makes it such a reliable fingerprint for a substance.
Frequently asked questions
What is the density formula?
Density equals mass divided by volume, ρ = m / V. Rearranged, mass = ρ × V and volume = m / ρ.
What units does this use?
By default, grams and cubic centimetres (1 cm³ = 1 mL) give density in g/cm³. Pure water is about 1 g/cm³, so denser-than-water materials read above 1 and float below.
Will a material float or sink in water?
Compare its density to water’s ≈ 1 g/cm³. Below that it floats (ice at 0.92, oak at 0.75), at it is neutrally buoyant, and above it sinks (aluminium 2.70, iron 7.87). The calculator states which case applies.
How do I convert g/cm³ to kg/m³?
Multiply by 1,000: 1 g/cm³ equals 1,000 kg/m³. The tool shows both, so a 2 g/cm³ material is also displayed as 2,000 kg/m³.
How do I find mass or volume instead of density?
Switch "solve for" to mass or volume. Mass is ρ × V and volume is m / ρ, so a material of 2 g/cm³ filling 50 cm³ has a mass of 100 g.
Does density change with temperature?
Slightly, yes. Most materials expand when heated, so their density falls a little as temperature rises. Water is unusual — it is densest at about 4 °C — which is why ice floats and lakes freeze from the top down.
API — use this calculator from code
Call this calculator as a free JSON endpoint — no key required. Send the field values below as query parameters or JSON. Read the full API docs →
Endpoint
GET https://calculator.free/api/v1/density/
curl
curl "https://calculator.free/api/v1/density/?solve=density&mass=100&volume=50&density=2"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/density/?" + new URLSearchParams({
"solve": "density",
"mass": "100",
"volume": "50",
"density": "2"
}));
const data = await r.json();
console.log(data.results);
Results are estimates for general guidance only, not financial, medical or tax advice.