Math & Scientific
Calculate Density: Worked Mass and Volume Examples
Calculate density from a solid, displaced water or a liquid sample, with explicit gram, millilitre and cubic-metre conversions and measurement checks.
Match the mass to the volume
Density is mass divided by the volume occupied by that same sample: ρ = m/V. The division describes how much material is packed into each volume unit. It does not mean that a larger object automatically has a larger density. Two pieces cut from a uniform block can have different masses and volumes while giving the same ratio. Before dividing, decide whether the measurement describes the solid material, a whole hollow object or loosely packed particles with spaces between them. Those are different volume definitions and can produce different useful densities.
Work a solid-block example
A rectangular sample has mass 135 g and dimensions 5 cm by 2 cm by 5 cm. Its volume is 5 × 2 × 5 = 50 cm³. Density is therefore 135/50 = 2.7 g/cm³. To use the local Density Calculator, convert mass to 0.135 kg and volume to 0.000050 m³, then enter those two numbers. The output is 2700 kg/m³ and 2.7 g/cm³. The second output verifies the result obtained directly from grams and cubic centimetres; it is not a separate measurement of the specimen.
Convert the volume as a cube
One centimetre equals 0.01 metre, so one cubic centimetre equals (0.01)³ = 0.000001 cubic metre. A common error is to divide a cubic-centimetre volume by 100 instead of by one million. Mass has only a factor of 1000 between grams and kilograms. Together those conversions explain why a numerical density in g/cm³ must be multiplied by 1000 to express it in kg/m³. One millilitre occupies one cubic centimetre, so the same density number also applies in g/mL when the measured volume was recorded in millilitres.
Use a displacement reading for an irregular solid
Suppose a cylinder reads 40 mL before immersion and 58 mL after a fully submerged sample is added. The sample volume is the increase, 18 mL, rather than the final reading of 58 mL. For a mass of 48.6 g, density is 48.6/18 = 2.7 g/mL. Enter mass 0.0486 kg and volume 0.000018 m³ to reproduce 2700 kg/m³ locally. This simple procedure assumes no dissolution, no trapped bubbles and no liquid absorbed into pores. A sample resting above the liquid or carrying air does not displace its intended full material volume.
Subtract the container mass for a liquid
An empty container has mass 80 g. With 200 mL of liquid it has mass 240 g. The liquid alone has mass 240 − 80 = 160 g, so its density is 160/200 = 0.8 g/mL, equivalent to 800 kg/m³. The calculator inputs are 0.160 kg and 0.000200 m³. Entering the combined container mass would instead produce 1200 kg/m³, a plausible-looking but wrong answer. Record the liquid temperature with the measurement because changes in volume can change density even when the amount of liquid stays the same.
Check precision and scope
If the first block's volume were only known to lie between 49 and 51 cm³, its density at fixed mass would lie between 135/51 ≈ 2.647 and 135/49 ≈ 2.755 g/cm³. Extra digits in a calculator cannot remove that measurement uncertainty. The local form accepts positive mass and volume in its stated units, returns both density units and rejects unsupported numerical extremes. It does not choose a reference temperature, determine composition or identify a material uniquely from a density value. Keep the original observations, units and measurement method beside the reported answer.
Distinguish material density from bulk density
Imagine solid particles with total mass 270 g occupying 100 cm³ of actual material, while the loosely filled measuring vessel occupies 180 cm³ including gaps. Material density is 270/100 = 2.7 g/cm³, but bulk density is 270/180 = 1.5 g/cm³. Neither division is inherently wrong: they answer different questions. Label the result with its volume convention, and do not compare bulk packing measurements directly with a reference for the solid substance.