A worked example
A mass of 10 kg taking up 2 liters of volume has a density of exactly 5 kg/L.
Frequently asked questions
Why does water have a density of almost exactly 1 kg/L?
It's actually the historical basis for the metric system — the kilogram and liter were originally defined so that 1 liter of water at a specific temperature weighs almost exactly 1 kilogram, which is why it works out so cleanly.
Why does an object float or sink based on density?
An object floats in a fluid if its density is lower than the fluid's density, and sinks if it's higher — which is why ice (slightly less dense than liquid water) floats, and a rock (much denser) sinks.
What units should I use?
Any consistent pair works, but kg and liters are convenient since they give density directly in kg/L, numerically identical to g/mL or g/cm³ — common units for density in science contexts.