Density Calculator
Calculate density, mass, or volume using the density formula.
Related calculators
About
Density Calculator
Give any two of density, volume and mass, and this calculator returns the third. Pick the tab for the one you are solving for, enter the other two in whichever units you have them in, and the answer comes back with the working shown. A mass of 8,900 kilograms in 1 cubic meter is a density of 8,900 kg/m³, which is roughly copper.
What density is
The density of a material, usually written with the Greek letter rho, is its mass per unit volume:
where rho is the density, m is the mass and V is the volume. Rearranged, the same relationship gives the other two: volume is mass divided by density, and mass is volume times density. Those three forms are the three tabs on the calculator, and they are the same equation each time.
Density answers a question that mass alone cannot: how much material is packed into the space it occupies. A kilogram of gold and a kilogram of water weigh the same, but the gold takes up about 51.81 cubic centimeters against 1,000 for the water. That is the whole idea in one comparison, and it is why gold is 19.3 times denser than water.
Getting the units right
The arithmetic is simple. The units are where it goes wrong. There are many different ways to express density, and using the wrong one, or converting into it carelessly, produces a wrong answer that still looks reasonable. It is worth writing out every value you are working with including its units, and doing the dimensional analysis, so you can check the final result really does come out as mass over volume.
This calculator converts everything to kilograms and cubic meters first, does the division, then converts the answer into whatever unit you picked. That means you can mix systems freely: pounds and cubic feet in, grams per liter out, and nothing gets lost in between. The panel also lists the answer in every other unit of the same quantity, which is usually quicker than running a second conversion.
| Unit | In kg/m³ |
|---|---|
| kilogram/cubic meter [kg/m³] | SI unit |
| kilogram/cubic centimeter [kg/cm³] | 1,000,000 |
| gram/cubic meter [g/m³] | 0.001 |
| gram/cubic centimeter [g/cm³] | 1,000 |
| kilogram/liter [kg/L] | 1,000 |
| gram/liter [g/L] | 1 |
| pound/cubic inch [lb/in³] | 27,680 |
| pound/cubic foot [lb/ft³] | 16.02 |
| pound/cubic yard [lb/yd³] | 0.5933 |
| pound/gallon [US] | 119.83 |
| pound/gallon [UK] | 99.78 |
| ounce/cubic inch [oz/in³] | 1,730 |
| ounce/cubic foot [oz/ft³] | 1.001 |
| ounce/gallon [US] | 7.489 |
| ounce/gallon [UK] | 6.236 |
| ton (short)/cubic yard | 1,186.6 |
| ton (long)/cubic yard | 1,328.9 |
| psi/1000 feet | 2.3067 |
One row deserves a note. Pounds per gallon differs between the US and the UK by about 20 percent, because the gallons themselves differ: 3.785 liters against 4.546. A figure quoted in lb/gal without a country attached is ambiguous, and on a tank of fuel that ambiguity is worth real money.
Density changes with temperature and pressure
Density is not a fixed property of a substance. It depends on the conditions, which is why published figures come with a temperature and a pressure attached.
For solids and liquids the change is small. They resist compression, so squeezing them harder barely moves the volume, and heating them expands the volume slightly and so lowers the density a little. For gases the change is large. An increase in pressure decreases the volume, and so always increases the density. An increase in temperature tends to increase the volume and so lower the density.
Water is the well-known exception to the rule that warming a substance always thins it. Water is at its densest at about 4 °C, and it becomes less dense on the way down to freezing. That is why ice floats: ice at 0 °C is about 917 kg/m³ against 1,000 for liquid water, roughly 8.3 percent lighter, so about a tenth of an iceberg sits above the surface. If water behaved like most substances, lakes would freeze from the bottom up.
Density of common materials
The spread is enormous, which is worth seeing laid out. Air at sea level is roughly 833 times lighter than water, and osmium is more than twenty thousand times heavier than air.
| Material | Density in kg/m³ |
|---|---|
| Earth's atmosphere at sea level | 1.2 |
| Water at standard temperature and pressure | 1,000 |
| Ice at 0 °C | 917 |
| The Earth, mean | 5,515.3 |
| Iron | 7,874 |
| Copper | 8,950 |
| Lead | 11,340 |
| Tungsten | 19,250 |
| Gold | 19,300 |
| Platinum | 21,450 |
| Osmium, the densest natural element | 22,590 |
| Atomic nuclei | 2.3 × 1017 |
| Black hole | above 1 × 1018 |
Two entries there are not everyday materials but they set the scale. Atomic nuclei sit around 2.3 × 10¹⁷ kg/m³, because almost all of an atom's mass is packed into a nucleus that occupies a vanishing fraction of its volume. Black hole densities go higher still. Between those and the atmosphere at 1.2 kg/m³, the range covers seventeen orders of magnitude.
Specific gravity, and why it has no units
Specific gravity, or relative density, is a material's density divided by the density of a reference, which for solids and liquids is water at 1,000 kg/m³. Gold has a specific gravity of 19.3. Because it is a ratio of two densities the units cancel, so the number is the same whatever system you started in, which is exactly why it is used.
It also gives the quickest test of whether something will float. A specific gravity below 1 floats in water, above 1 sinks. Ice at 0.917 floats; iron at 7.874 does not. The same reasoning explains why a steel ship floats while a steel bar does not: the ship's hull encloses a large volume of air, so the average density of the whole vessel is well under 1 even though the steel itself is nearly eight times denser than water.
Measuring density in practice
Mass is easy: put it on a balance. Volume is the harder half, and how you get it depends on the shape.
For a regular solid, measure it and calculate. A steel cube 10 cm on a side is 0.001 cubic meters, which at 7,850 kg/m³ is 7.85 kg. For an irregular solid, use displacement: submerge it in a measuring cylinder of water and read the rise in level, which is the object's volume directly. This is the method Archimedes is said to have used on a suspect crown, and the reason it works is that it needs no assumption about shape at all.
For liquids, a hydrometer floats higher in a denser liquid and reads specific gravity straight off a scale. Brewers use one to track fermentation, since sugar turning into alcohol lowers the density of the liquid in a predictable way. Garages use the same instrument on battery electrolyte and coolant.
Where density gets used
Shipping and freight care about it constantly. A container has both a weight limit and a volume limit, and which one you hit first depends on the density of the cargo. Dense cargo like tiles hits the weight limit with the container half empty; light cargo like packaging fills the space long before the weight matters. Freight is often priced on whichever is greater, under the name dimensional weight.
In construction it decides what a structure has to carry, and in metallurgy it is a first check on whether an alloy is what it claims to be, since an off density means the composition is off. Fuel is bought by volume and burned by mass, so density is the bridge between the two, and it moves enough with temperature that fuel deliveries are corrected to a standard temperature before anyone is invoiced.
Reading the results on this page
The panel gives the answer in the unit you selected and lists it in the other units of the same quantity underneath. The Steps card shows the equation, then the same equation with your numbers substituted, then the result, so the arithmetic can be followed rather than taken on trust. A volume of zero returns a message rather than infinity, since dividing a mass by no volume has no meaning.
Common questions
Frequently asked questions
Divide the mass by the volume. A mass of 8,900 kilograms occupying 1 cubic meter gives a density of 8,900 kg/m³. Rearranged, volume is mass divided by density, and mass is volume times density, which are the other two tabs on the calculator.
The kilogram per cubic meter, kg/m³. Grams per cubic centimeter is also common in laboratories, and 1 g/cm³ is exactly 1,000 kg/m³, which is also the density of water, so the two scales line up conveniently.
About 1,000 kg/m³, or 1 g/cm³, at standard temperature and pressure. Water is densest at roughly 4 °C and becomes lighter as it cools further, which is why ice at 917 kg/m³ floats rather than sinking.
Yes. Heating usually expands a substance and so lowers its density, and pressure compresses it and raises it. The effect is small for solids and liquids and large for gases. Water is the notable exception between 0 and 4 °C.
A material's density divided by the density of water, so gold at 19,300 kg/m³ has a specific gravity of 19.3. The units cancel, which makes the figure the same in every measurement system. Below 1 floats in water, above 1 sinks.
Submerge it in a measuring cylinder of water and read how far the level rises. That rise is the object's volume, whatever its shape. Weigh it separately and divide, and you have the density with no geometry involved.
Because a US gallon is 3.785 liters and a UK gallon is 4.546. The same density reads as 119.83 kg/m³ per lb/gal on the US scale and 99.78 on the UK one, a gap of about 20 percent, so the country has to be stated.
Osmium is the densest naturally occurring element at about 22,590 kg/m³, just ahead of iridium. Beyond ordinary matter the scale runs much further: atomic nuclei reach 2.3 × 10¹⁷ kg/m³ and black holes go higher still.