Density relates mass and volume for any material. This solves for whichever of the three you need, given the other two.
How it works
Density
ρ = m / V
m is mass, V is volume, ρ (rho) is density — mass per unit volume.
Why an object floats or sinks
An object floats in a fluid if its average density is lower than the fluid’s. A steel ship floats not because steel is somehow light — it is roughly eight times denser than water — but because the ship’s hull shape encloses enough air that the vessel’s average density, hull plus air plus cargo taken together, comes out below water’s. This calculator does not decide floating or sinking on its own; it gives you the density figure to compare, and a fluid’s own density (about 1 g/cm³ for fresh water) is what that gets compared against.
How to use this calculator
- Choose which quantity you want solved — density, mass or volume.
- Enter the other two.
- Read the solved value.
Frequently asked questions
Why does a steel ship float when a steel block sinks?
Because of shape, not material. The block’s density equals steel’s density directly. The ship’s shape encloses a large volume of air inside the hull, so the ship’s average density — its total mass divided by the volume it displaces, including that air — comes out well below water’s, even though the steel itself is far denser than water.
What’s a typical density for water, and why does it matter as a reference?
Fresh water is close to 1 gram per cubic centimetre (1000 kg/m³) — a convenient reference because anything less dense floats in water and anything denser sinks, all else being equal.
Why is volume zero an invalid input for solving density?
Dividing mass by zero volume is mathematically undefined, not an infinitely large density — nothing can occupy zero volume and still have mass, so this calculator declines the case rather than returning a meaningless number.
Does temperature affect density?
Yes, for most materials — most substances expand slightly as they warm, which spreads the same mass over a larger volume and so slightly lowers density. This calculator takes mass and volume as given, whatever conditions they were measured under.
Is density the same as weight?
No — density is mass per volume, independent of gravity. Weight is a force (see the force calculator) that depends on gravity. An object has the same density on the Moon as on Earth, even though its weight is very different.