Density Formula: How to Derive and Use It, with Worked Examples
Density is mass divided by volume. This guide derives the formula, rearranges it to find mass and volume, works examples in grams, kilograms, and litres, and explains why density, not weight, decides whether something floats.
Density answers a simple question: how much mass is packed into a given space? The formula is density equals mass divided by volume, and everything else in this guide is a rearrangement of that one relationship, or a careful choice of units. Density is what makes a small lead weight heavier than a large block of foam, what decides whether an object floats, and what lets a laboratory identify a substance from two measurements. The worked examples below use ordinary objects, show every unit conversion, and finish with the checks that catch the errors density problems are famous for.
- Density equals mass divided by volume. Rearranged, mass equals density times volume, and volume equals mass divided by density: one formula, three uses, and the triangle that remembers them.
- Units must match before dividing. Grams with cubic centimetres give grams per cubic centimetre; kilograms with cubic metres give kilograms per cubic metre, and 1 gram per cubic centimetre is exactly 1,000 kilograms per cubic metre.
- Density is a property of the material, not of the object. Cutting a block in half halves its mass and its volume together, and the density stays the same; temperature and pressure are the things that change it.
- Deriving the formula from mass and volume
- The triangle: finding mass and volume
- Units: grams, kilograms, litres, and the factor of 1,000
- Worked examples: a block, a liquid, and a crown
- Why density decides floating, not weight
- Water, temperature, and specific gravity
- Measuring density in practice
- Mistakes: volume from dimensions, and unit slips
Deriving the formula from mass and volume
Start with two measurements anyone can make: the mass of an object, found on a balance, and its volume, the space it occupies. Density is the ratio of the two. If two objects have the same volume and one has twice the mass, it is twice as dense. If two objects have the same mass and one occupies twice the volume, it is half as dense. The formula states exactly that: density, given the symbol rho, the Greek letter ρ, equals mass divided by volume, written ρ = m / V. The formula is a definition, not a law discovered by experiment; it defines what density means, and every density value in every table is a mass and a volume that were measured and divided.
The definition immediately explains why density is useful. Mass alone does not identify a material, because a large piece of a light material can outweigh a small piece of a heavy one. Volume alone does not identify it either. Their ratio cancels the size of the sample: a teaspoon of water and a swimming pool of water have the same density, because doubling the sample doubles both the mass and the volume, and the ratio stays put. That size-independence is what makes density a fingerprint of a material under given conditions, and it is why a density table can list one number for aluminium, one for iron, and one for gold, without saying how big the sample was. The fingerprint is not perfect — alloys, mixtures, and temperature blur it — but it is the first test in any identification, and often the decisive one.
The formula also explains the units. Mass is measured in grams or kilograms, volume in cubic centimetres, cubic metres, or litres, and density inherits the ratio of the two: grams per cubic centimetre (g/cm³), kilograms per cubic metre (kg/m³), or grams per millilitre (g/mL). The unit is part of the answer, not decoration on it: 1.0 g/cm³ and 1,000 kg/m³ are the same density written in different units, and a density quoted without its unit is meaningless, because the number alone cannot say which system it belongs to. Keep the unit attached to every number in a density calculation, and half the errors in the subject disappear.
The triangle: finding mass and volume
The same formula solves three problems, and the triangle is the memory aid. Draw a triangle divided into three parts, with density at the top and mass and volume side by side at the bottom. Cover the quantity you want, and the triangle shows the operation: cover density, and mass over volume remains, so divide. Cover mass, and density beside volume remains, so multiply. Cover volume, and mass over density remains, so divide mass by density. The three forms are ρ = m / V, m = ρ × V, and V = m / ρ. They are not three formulas to memorise; they are one relationship read three ways, and any one of them can be derived from the others by the ordinary rules of algebra.
Finding mass is the form used in shipping, engineering, and cooking at scale. A tank holds 2,000 litres of a liquid with density 0.8 g/mL. First convert: 2,000 litres is 2,000,000 millilitres, and 0.8 g/mL times 2,000,000 mL is 1,600,000 grams, which is 1,600 kilograms. The mass is 1.6 tonnes, and the only arithmetic is a multiplication, once the units agree. Finding volume is the form used when a container must be sized: 500 grams of a material with density 2.5 g/cm³ occupies 500 divided by 2.5, which is 200 cm³. The division is trivial; the discipline is checking that the mass unit matches the density unit before dividing, because dividing grams by a density in kilograms per cubic metre gives an answer in the wrong unit by a factor of 1,000.
The triangle also guards against the most seductive error in the subject, which is multiplying when the problem asks for division. If the knowns are mass and density and the unknown is volume, the answer must be smaller than the mass whenever the density exceeds 1 in the chosen units, and larger whenever it is below 1, and that size sense is a quick check before any calculator is involved. A 500-gram object with density 2.5 cannot occupy 1,250 cm³, because that would require multiplying, and multiplying mass by density gives grams squared per cubic centimetre, a unit that describes nothing. Units check the algebra when memory fails: the answer must come out in the unit the question asks for, and if it does not, the operation is wrong.
Units: grams, kilograms, litres, and the factor of 1,000
Two unit systems dominate density, and the conversion between them is a single factor. In the laboratory system, mass is in grams and volume in cubic centimetres, giving g/cm³. In the SI system, mass is in kilograms and volume in cubic metres, giving kg/m³. One gram per cubic centimetre equals 1,000 kilograms per cubic metre, because one gram is one-thousandth of a kilogram and one cubic centimetre is one-millionth of a cubic metre, and the ratio of those two factors is 1,000. Water, at 1.0 g/cm³, is 1,000 kg/m³. Aluminium, at 2.70 g/cm³, is 2,700 kg/m³. Iron, at 7.87 g/cm³, is 7,870 kg/m³. Multiply by 1,000 to go from the laboratory unit to the SI unit, divide by 1,000 to come back.
Litres and millilitres add a convenience, because 1 millilitre is exactly 1 cubic centimetre, and 1 litre is exactly 1,000 cubic centimetres, which is also 1 cubic decimetre. A density in g/mL is therefore numerically identical to the same density in g/cm³, and a liquid density quoted as 0.8 g/mL is 0.8 g/cm³ and 800 kg/m³, with no conversion needed beyond the factor of 1,000. Volume conversions are where errors enter: 1 cubic metre is 1,000,000 cubic centimetres, not 100, because volume scales with the cube of the length conversion, and 1 metre is 100 centimetres, so 100 cubed is 1,000,000. Forgetting the cube is the classic unit slip in density problems, and it produces answers wrong by a factor of 100 or 10,000, which no amount of careful division can rescue.
Keep mass and volume in matching units before dividing.
| Quantity | Laboratory unit | SI unit | Conversion |
|---|---|---|---|
| Mass | gram (g) | kilogram (kg) | 1 kg = 1,000 g |
| Volume | cubic centimetre (cm³) | cubic metre (m³) | 1 m³ = 1,000,000 cm³ |
| Volume | millilitre (mL) | litre (L) | 1 L = 1,000 mL = 1,000 cm³ |
| Density | g/cm³ (or g/mL) | kg/m³ | 1 g/cm³ = 1,000 kg/m³ |
Worked examples: a block, a liquid, and a crown
Example one: a rectangular block measures 5 cm by 4 cm by 2 cm and has a mass of 320 grams. Its volume is 5 times 4 times 2, which is 40 cm³. Its density is 320 divided by 40, which is 8.0 g/cm³. That is close to the density of steel and copper, and far from aluminium at 2.70, so the block is plausibly a dense metal, though density alone does not prove which one. The example shows the standard two-step pattern: volume from dimensions first, density from the division second, with the units checked at each step. If the dimensions had been given in millimetres, the volume would need converting before the division, because 50 mm by 40 mm by 20 mm is 40,000 mm³, which is 40 cm³, and dividing grams by cubic millimetres gives a density 1,000 times too small.
Example two: a liquid. A measuring cylinder holds 250 mL of oil, and the oil plus cylinder mass 230 grams more than the empty cylinder, so the oil mass is 230 grams. Its density is 230 divided by 250, which is 0.92 g/mL, or 920 kg/m³. The oil is less dense than water, so it floats on water, which matches everyday experience. Finding the mass of a larger quantity uses the rearranged form: 3 litres of the same oil, which is 3,000 mL, has a mass of 0.92 times 3,000, which is 2,760 grams, or 2.76 kilograms. The same two numbers, mass and volume, serve both directions, and the only new work is choosing the right rearrangement.
Example three is the oldest density problem in history: Archimedes and the crown. A crown has a mass of 1,200 grams and displaces 80 cm³ of water when submerged, so its volume is 80 cm³ and its density is 1,200 divided by 80, which is 15.0 g/cm³. Pure gold has a density of about 19.3 g/cm³, and silver about 10.5 g/cm³, so a density of 15.0 sits between them, consistent with a gold-silver mixture and inconsistent with pure gold. The story, whether or not it happened exactly as told, captures the method perfectly: density is measured without damaging the object, and the measurement answers a question about composition that no weighing alone could answer. Displacement is still the standard way to find the volume of an irregular object, and the Density Calculator volume section uses the same principle.
Why density decides floating, not weight
An object floats when its average density is less than the density of the fluid it sits in, and sinks when it is greater. Weight does not decide it: a steel ship floats because its average density, counting the air inside the hull, is less than the density of seawater, while a steel nail sinks because its density is the density of steel, about 7.8 g/cm³, with no air to dilute it. The rule is a comparison of two densities, and it is exact for objects at rest in a fluid: the buoyant force equals the weight of the displaced fluid, so the object rises if it weighs less than the fluid it displaces and falls if it weighs more, and weighing less than the displaced fluid is exactly the same statement as being less dense than the fluid, since the volumes are equal.
Average density is the subtlety. A ship, a hollow ball, and a life jacket all have average densities far below the density of their materials, because they contain air. A submarine changes its average density by taking water into ballast tanks, sinking when its average density exceeds seawater and rising when it falls below. An ice cube floats with about 92 percent of its volume submerged, because ice at 0.917 g/cm³ is 91.7 percent as dense as water, and the submerged fraction equals the density ratio. The fraction is a measurement in disguise: measure how much of a floating object sits below the surface, and you have measured the ratio of its density to the fluid density, which is why the floats-or-sinks test on the Density Calculator page is both a demonstration and a measurement.
Water, temperature, and specific gravity
Water is the reference for density in two ways. Its density is close to 1 g/cm³ at ordinary temperatures, which makes it the easiest substance to remember, and specific gravity is defined as the ratio of a substance density to the density of water, so it is a density with the units divided out. A substance with specific gravity 2.7 has a density of 2.7 g/cm³, or 2,700 kg/m³, and the ratio form is convenient because it is the same in any unit system. Specific gravity is sometimes written as a pure number and sometimes as a density; the two are interchangeable once the reference is stated, and the reference is water at 4 °C, where water is densest, at 1.000 g/cm³, or water at room temperature, where it is 0.998 g/cm³, a difference that matters only in precise laboratory work.
Temperature changes density because materials expand when heated, increasing volume while mass stays fixed. Water is the famous exception in one narrow range: it expands when cooled below 4 °C, so ice is less dense than liquid water and floats, which is why lakes freeze from the top down and aquatic life survives winter beneath the ice. For most materials the effect is small over ordinary temperature ranges — a few tenths of a percent per ten degrees — but for gases it is large, because gas volume is highly sensitive to temperature and pressure, and gas densities are always quoted with their conditions. The density of air at sea level is about 1.2 kg/m³ at 20 °C, and it falls as temperature rises, which is the beginning of the density altitude story told in the companion guide: hot, high air is thin air, and thin air lifts less.
Measuring density in practice
Measuring density means measuring mass and volume separately, and the method for each depends on the sample. Mass is measured on a balance, and the sample should be dry and at room temperature, because a wet sample carries extra mass that is not part of the material. Volume of a regular solid is calculated from its dimensions: length times width times height for a box, pi times radius squared times height for a cylinder, four-thirds pi times radius cubed for a sphere. Volume of an irregular solid is found by displacement: fill a measuring cylinder to a known level, submerge the object, and read the rise in level, which equals the object volume. The object must be fully submerged and must not absorb water, or the reading will be wrong; for porous materials, a different fluid or a sealed sample is needed.
Liquids are measured with a measuring cylinder or a volumetric flask for volume, and a balance for mass, with the container mass subtracted. The most precise liquid measurement uses a pycnometer, a small flask of known volume that is weighed empty and full, giving density directly from the mass difference. Gases are measured by weighing a known volume, with temperature and pressure recorded, because gas density without conditions is incomplete. In every case, the same two checks apply: are the units consistent, and is the result plausible against known values? A density of 80 g/cm³ is not a discovery; it is a unit error, because no ordinary material is that dense. The densest stable element, osmium, is about 22.6 g/cm³, and anything above that in a school or workshop measurement has gone wrong in the arithmetic.
Mistakes: volume from dimensions, and unit slips
The volume mistake is the most common: using the wrong formula for the shape, or the right formula with the diameter instead of the radius. A cylinder with diameter 4 cm has radius 2 cm, and its volume is pi times 4 times its height, not pi times 16 times its height; using the diameter quadruples the volume and quarters the density. The unit mistake is the runner-up: dividing grams by cubic metres, or kilograms by cubic centimetres, without converting, which shifts the answer by a factor of 1,000 or 1,000,000. The guard is to write the unit at every step and to convert before dividing, never after. The third mistake is conceptual: confusing density with weight, or with mass, and expecting a heavier object to be denser. Density is the ratio, and the ratio is what the formula computes; weight is a force that depends on gravity, and mass is an amount of matter that depends on size. Keep the three separate, and density problems become routine.
A final check is worth building into the habit: compare the answer with the density of water. If the object floats, its density must be below 1 g/cm³; if it sinks, above. If the calculation says a floating object has density 3 g/cm³, the calculation is wrong, whatever the arithmetic says. If the calculation says a metal has density 0.5 g/cm³, it is wrong too, unless the metal is hollow or foamed. Plausibility is not a substitute for arithmetic, but it is the fastest way to catch arithmetic that has gone wrong, and it costs nothing to apply. Work the formula, check the units, compare with water, and the answer will stand.
Frequently asked questions
What is the formula for density?
Density equals mass divided by volume, written as density equals m divided by V. Mass is measured on a balance and volume is found from dimensions or by displacement, and the two are divided with matching units. Rearranged, mass equals density times volume, and volume equals mass divided by density. The formula defines density as the mass packed into each unit of volume.
How do I find mass if I know density and volume?
Multiply density by volume: mass equals density times volume. For example, 2 litres of a liquid with density 0.8 grams per millilitre is 2,000 millilitres times 0.8, which is 1,600 grams, or 1.6 kilograms. Check the units first: the volume unit must match the density unit, so convert litres to millilitres or cubic centimetres before multiplying if the density is given per millilitre.
How do I find volume if I know mass and density?
Divide mass by density: volume equals mass divided by density. For example, 500 grams of a material with density 2.5 grams per cubic centimetre occupies 200 cubic centimetres. The answer comes out in the volume unit of the density, so grams divided by grams per cubic centimetre gives cubic centimetres. If the units do not match, convert before dividing.
What is the density of water?
Water has a density of 1.0 grams per cubic centimetre, or 1,000 kilograms per cubic metre, at ordinary temperatures, with its maximum density at 4 degrees Celsius. At room temperature it is about 0.998 grams per cubic centimetre, a difference that matters only in precise work. Seawater is denser, about 1.025 grams per cubic centimetre, because of its dissolved salts.
Why does ice float on water?
Ice floats because it is less dense than liquid water: ice is about 0.917 grams per cubic centimetre, while water is about 1.0. Water expands when it freezes, so the same mass occupies more volume as ice, and the density falls. An object floats when its density is below the fluid density, and ice floats with about 92 percent of its volume submerged, which is the ratio of the two densities.
What is specific gravity?
Specific gravity is the ratio of a substance density to the density of water, so it is density with the units divided out. A substance with specific gravity 2.7 has a density of 2.7 grams per cubic centimetre, or 2,700 kilograms per cubic metre. It is useful because the same number works in any unit system, and because values above 1 sink in water while values below 1 float, which makes it a quick floating test.
Try it on the calculator
Enter any two of mass, volume, and density in the calculator and it finds the third. Work the same numbers by hand on this page and the two answers must match.
Open the Density Calculator →- 1What Is Density Altitude? Formula, Chart, and Aviation Use
When air is hot or the pressure is low, its density falls and aircraft perform as if they were higher. The…
- 2Cylinder Volume Calculator
Round tanks and pipes, with surface area as well as volume.
- 3Volume Calculator
Boxes, spheres, cones and more shapes measured by dimension.
- 4Area Calculator
The flat companion: squares, circles and triangles by area.
