How this density calculator works
Density, mass and volume are a triangle: know any two and the third follows. Fill in any two of the three boxes, leave the one you want blank, and the calculator solves for it, showing every step of the rearranged formula with your own numbers in place. Enter a density on its own, or pick a material from the list and let it fill the box for you, and you get the unit conversions, the specific gravity and the float or sink verdict without needing a mass or a volume at all.
Units get taken seriously here, because units are where density problems actually go wrong. Whatever you type in, the answer always shows g/cm3 and kg/m3 together, with the conversion between them walked through as a step, since that factor of exactly 1,000 is the single most common way a correct calculation turns into a wrong answer. And when you are deciding how many digits deserve to survive into a lab report, our significant figures calculator is the referee for that.
The formula
m = ρ × V
V = m ÷ ρ
ρ (the Greek letter rho) is density, m is mass, and V is volume. It is one definition in three arrangements: divide to get density, multiply back to get mass, divide the other way to get volume. In base units, mass in grams over volume in cubic centimeters gives density in g/cm3, and multiplying that by exactly 1,000 gives kg/m3.
Worked example
A pocket-sized block of aluminum: 27 g, 10 cm3. Density is mass over volume: 27 / 10 = 2.700 g/cm3, which is 2,700 kg/m3 (times exactly 1,000) and about 168.6 lb/ft3. Specific gravity: 2.700 / 0.999972 = 2.700, with no unit at all. Room temperature water is 0.9970 g/cm3, so aluminum sinks, and it is not close.
The schoolbook landmark works the same way: 1 kg of water in 1 liter is 1,000 g / 1,000 cm3 = 1.000 g/cm3. That tidy 1 is no accident. The gram was originally defined as the mass of one cubic centimeter of water, so water sits at 1 by construction; modern measurement nudged it to 0.999972 g/cm3 at 4 C, the temperature where water is densest.
What density actually is
Density is how tightly matter is packed: how much stuff, divided by how much room the stuff takes up. Lead and styrofoam are not made of heavier and lighter atoms so much as closer and farther ones (and in foam, mostly trapped air). A material has the same density in a pebble as in a boulder, which is what makes it useful: it identifies the material regardless of how much of it you have, which is exactly the trick Archimedes needed.
It also settles the old riddle properly. A kilogram of feathers and a kilogram of steel weigh exactly the same, by definition: a kilogram is a kilogram. The difference is volume. The steel disappears into a coffee mug while the feathers need a sack you could sleep in, because steel is packed a few thousand times more tightly. Density is the number that says so: weight tells you how much you have, density tells you what it is like.
The unit trap: a factor of exactly 1,000
Here is the mistake this page is built to catch. The two everyday density units differ by exactly 1,000: a kilogram is 1,000 g and a cubic meter is 1,000,000 cm3, and dividing one factor by the other leaves a clean thousand behind. So aluminum is 2.70 g/cm3 and 2,700 kg/m3, the same fact in two outfits. Quote a density in the wrong unit and your answer is off by three orders of magnitude, which is why every result here prints both, with the conversion shown as a step.
Two smaller courtesies while we are at it. A cubic centimeter and a milliliter are the same volume, exactly, so a graduated cylinder reading in mL is already reading in cm3. And the US customary units are handled from their exact definitions rather than rounded chart factors: the inch has been exactly 2.54 cm and the pound exactly 453.59237 g since 1959, which makes cold fresh water about 62.4 lb/ft3, the figure US engineering has run on for a century. For plain mass conversions on their own, our kg to lbs converter has you covered.
Why ice floats, and why that matters
Water expands by about 9% when it freezes, because ice locks its molecules into an open hexagonal lattice with more empty space than the liquid has. That drops it to 0.9167 g/cm3, comfortably under liquid water, so ice floats with about 92% of itself submerged in fresh water, and about 89% in denser seawater, which is the arithmetic behind the tip of the iceberg. Nearly every other substance does the opposite and sinks in its own liquid; water is the great exception.
The consequences are bigger than cold drinks. Because water is densest at 4 C, a chilling lake sends its coldest surface water sinking until the whole lake reaches 4 C, and only then can the surface cool further and freeze. The ice then forms a floating lid that insulates the water below, so lakes freeze from the top down and almost never solid. Fish spend the winter in liquid 4 C water under the ice. If ice sank, lakes would freeze from the bottom up and stay frozen, and life as we know it would have had a much harder time of it.
Archimedes, the crown and the bath
The story, as Vitruvius told it two centuries after the fact: King Hiero suspected his goldsmith had cut the crown's gold with silver, and Archimedes, lowering himself into a full bath, watched the water rise and realized the overflow measured the volume of whatever went in. The famous run through Syracuse follows. The details may have grown in the telling, and the honest footnote is that measuring a crown's overflow precisely enough is genuinely hard, which is why later writers, Galileo among them, suspected he really used a balance in water. But the insight underneath is exactly right and is the whole reason density can catch a fraud: equal masses of gold and silver take up different volumes. Silver runs about 10.5 g/cm3 to gold's 19.283, so a pound of silver claims nearly twice the room, and a crown with silver hidden in it displaces more water than the same weight of honest gold.
Displacement is still the standard trick for anything lumpy: weigh it, dunk it, read the rise. For a regular solid you do not even need the bath, just a ruler and the right formula, which is what our cylinder volume calculator and sphere volume calculator are for: measure the volume first, then bring it back here with the mass.
Temperature is part of the number
Mass does not care about temperature, but volume does, so density moves whenever the thermometer does. Water is 0.999972 g/cm3 at 4 C and 0.99704 g/cm3 at 25 C: a small drift for water, and a much bigger one for gasoline, which expands enough that fuel is often sold temperature corrected. This is why a reference table that does not name its temperatures is only mostly telling the truth, and why the table below names them.
Gases take this to the extreme: squeeze or heat a gas and its density changes dramatically, which is why sea level air gets a temperature label too. If you need a gas density, our gas law calculator computes it from pressure, temperature and molar mass, and our molar mass calculator supplies the molar mass from the chemical formula.
Reference table: common densities
Values for water, ice and the elements are CRC Handbook figures at the stated temperatures. Wood, foam, gasoline, milk and concrete genuinely vary from sample to sample, so they get honest ranges rather than a confident fourth decimal. The float column compares against room temperature fresh water.
| Material | g/cm3 | kg/m3 | In water |
|---|---|---|---|
| Air (sea level, 15 C) | 0.001225 | 1.225 | Floats (it is the sky) |
| Styrofoam (EPS foam) | 0.011 to 0.032 | 11 to 32 | Floats |
| Pine wood | 0.35 to 0.60 | 350 to 600 | Floats |
| Oak wood | 0.60 to 0.90 | 600 to 900 | Floats |
| Gasoline | 0.71 to 0.77 | 710 to 770 | Floats (why fuel fires spread on water) |
| Olive oil | 0.911 | 911 | Floats (the salad dressing proof) |
| Ice (0 C) | 0.9167 | 916.7 | Floats (about 92% submerged) |
| Water (25 C) | 0.99704 | 997.04 | This is the water |
| Water (4 C, its densest) | 0.999972 | 999.972 | Sinks below warmer water |
| Whole milk | 1.028 to 1.034 | 1,028 to 1,034 | Sinks |
| Seawater | 1.025 | 1,025 | Sinks (slides under fresh water) |
| Concrete | 2.2 to 2.5 | 2,200 to 2,500 | Sinks |
| Aluminum | 2.70 | 2,700 | Sinks |
| Iron | 7.874 | 7,874 | Sinks |
| Mild steel | 7.85 | 7,850 | Sinks (unless shaped into a hull) |
| Copper | 8.96 | 8,960 | Sinks |
| Lead | 11.34 | 11,340 | Sinks |
| Mercury | 13.534 | 13,534 | Sinks (steel floats on mercury) |
| Gold | 19.283 | 19,283 | Sinks (which is how panning works) |
| Osmium | 22.59 | 22,590 | Sinks (nothing natural sinks harder) |
One row is a magic trick worth pausing on: mild steel at 7.85 g/cm3 floats on mercury at 13.534, bobbing like a cork, because float or sink is never about being metal or heavy, only about the ratio of two densities. It is the same reason a hundred thousand tons of steel ship floats on water: shape the steel into a hull and the thing displacing the water is mostly air, so the average density of the whole vessel drops below 0.997.