Density is mass divided by volume
Density (ρ, the Greek letter rho) tells you how much mass is packed into a given volume. The formula is density = mass ÷ volume. A metal lump with a mass of 67.5 g and a volume of 25 cm³ has a density of 67.5 ÷ 25 = 2.7 g/cm³. That matches aluminum (2.70 g/cm³), so the lump is probably aluminum.
The calculator above solves whichever of mass, volume and density you pick under "Solve for" from the other two. If you type a number into the box being solved, the box you edited longest ago becomes the new one to solve for. Each box has its own unit selector, so mixed units such as kg and mL can be entered as they are. Below the result, the beaker drawing shows whether the object floats in the liquid you choose and how much of it is submerged, and the ladder lists the materials whose density is closest.
| Situation | Input | Result | Closest material |
|---|---|---|---|
| Unknown metal lump | 67.5 g, 25 cm³ | 2.700 g/cm³ | Aluminum 2.70 (0% off) |
| Metal piece measured by water level | 89.3 g, water 40 → 50 mL | 8.930 g/cm³ | Copper 8.933 (−0.034%) |
| Box-shaped block measured by size | 71.3 g, 5 × 2 × 1 cm | 7.130 g/cm³ | Zinc 7.134 (−0.056%) |
| Mass of 1 m³ of iron | 7.874 g/cm³ × 1 m³ | 7,874 kg | Iron |
| Volume of 1 kg of ice | 1 kg ÷ 0.91672 g/cm³ | ≈ 1.091 L | Ice at 0 °C |
| Liquid weighed in its container | 176.1 − 50 g, 100 mL | 1.261 g/cm³ | Glycerin 1.2613 (−0.024%) |
When you need to calculate density
A material's density stays nearly constant whatever the size of the sample, so it is useful whenever you know both the weight and the volume of something. Typical cases include:
- Guessing what something is made of: In a science lab you measure the mass and volume of a metal piece or a stone, work out its density, and compare it with the materials table. The smaller the percentage difference shown on the ladder, the more likely the match.
- Estimating weight from volume, or volume from weight: For steel plate or concrete whose dimensions you know but whose weight you don't, or for a liquid sold by weight when you want to know how many liters it is, you multiply or divide by the density.
- Finding out whether something floats or sinks: If the average density of an object is lower than that of the liquid, it floats, and that fraction of it is submerged. The same idea explains ice and icebergs, and why oil floats on water.
- Judging how concentrated a liquid is: In sugar water or salt water, the more that is dissolved, the higher the density. Comparing the density of equal volumes shows the difference in concentration.
How to use the calculator
- Under "Solve for", pick density, mass or volume. Density is selected at first.
- Enter numbers in the other two boxes and choose a unit at the right of each box. For density you can also pick a material under "Pick a material density" below the box.
- If you don't know the volume directly, choose "Water level difference", "Box dimensions", "Cylinder dimensions" or "Sphere diameter" under the volume box and fill in the boxes that appear. For a liquid that has to be weighed in a container, choose "Full − empty container" under the mass box.
- In the result strip, check the value, the formula and the values in other units. A rounded value is marked with "≈", and you can choose 3, 4 or 6 significant figures.
- Use the buttons above the beaker to change the liquid, and tap a material on the ladder to insert its density into the density box. "Copy link" copies an address that contains your current input.
Formulas linking mass, volume and density
Density, mass and volume are tied together by one formula, so any two of them determine the third.
- Density: ρ = m ÷ V (for example, 89.3 g ÷ 10 cm³ = 8.93 g/cm³)
- Mass: m = ρ × V (for example, 7.874 g/cm³ × 1,000,000 cm³ = 7,874,000 g = 7,874 kg)
- Volume: V = m ÷ ρ (for example, 1,000 g ÷ 0.91672 g/cm³ ≈ 1,090.8 cm³ ≈ 1.091 L)
If the units are mixed, first convert the mass to grams and the volume to cm³, calculate, and then convert to the density unit you want. 1 mL is exactly 1 cm³, 1 L is 1,000 cm³ and 1 m³ is 1,000,000 cm³. So g/cm³, g/mL and kg/L have the same number, while kg/m³ and g/L give 1,000 times that number. The US customary units use the definitions of the National Institute of Standards and Technology (NIST): 1 lb = 453.592 37 g, 1 oz = 1/16 lb, 1 in = 2.54 cm, 1 US gal = 231 in³ = 128 US fl oz.
| Unit | 1 g/cm³ | Note |
|---|---|---|
| g/mL, kg/L | 1 | 1 mL = 1 cm³ |
| kg/m³, g/L | 1,000 | The SI unit of density is kg/m³ |
| lb/ft³ | ≈ 62.428 | 1 lb/ft³ ≈ 0.0160185 g/cm³ |
| lb/in³ | ≈ 0.0361273 | Common in metal data sheets |
| lb/gal (US) | ≈ 8.3454 | Common in US liquid data |
How to measure mass and volume
Mass: weigh it, and subtract the container for liquids
Solids go straight onto the scale. For a liquid, weigh the empty container first, weigh it again after adding the liquid, and use the difference as the mass of the liquid. The "Full − empty container" option in the calculator does exactly this. For example, with a 50 g empty container holding 100 mL of glycerin that reads 176.1 g, the mass is 126.1 g and the density is 1.261 g/cm³. If your scale has a tare function (subtracting the container's weight), you can type the displayed value straight into the mass box.
Volume: use dimensions for regular shapes, water level otherwise
- Box: length × width × height. A 5 cm × 2 cm × 1 cm block is 10 cm³.
- Cylinder: π × (diameter ÷ 2)² × height. A rod 2 cm across and 5 cm long is about 15.71 cm³.
- Sphere: π × diameter³ ÷ 6. A ball 3 cm across is about 14.14 cm³.
- Irregular objects: Fill a graduated cylinder with water and read the level, then lower the object in until it is fully submerged and read it again. The rise is the volume (1 mL = 1 cm³). This does not work for objects that dissolve in water or soak it up.
A small object may have a volume smaller than the spacing of the cylinder's markings, which makes the error large. In that case, put a cup of water on a scale and tare it, then hang the object from a thread so that it is fully under water without touching the bottom or the wall. The extra reading on the scale is the mass of the water the object displaced, and dividing that number of grams by the density of water (0.998207 g/cm³ at 20 °C) gives the volume in cm³. Enter that volume directly in the volume box of the calculator.
Density table by material
These are the values used by the calculator's "Pick a material density" menu and by the ladder. The element values are those listed in the periodic table of PubChem, run by the US National Institutes of Health, which gives no reference temperature. The same material varies slightly with temperature, crystal structure and purity, so it is safest to compare only to about the second decimal place.
| Material | Density | Basis and source |
|---|---|---|
| Hydrogen | 0.00008988 | Gas, PubChem periodic table |
| Helium | 0.0001785 | Gas, PubChem periodic table |
| Air at 20 °C | 0.001204 | Dry air, 1 atm, calculated with the ideal gas law |
| Ethanol | 0.7893 | 20 °C, PubChem (CRC Handbook) |
| Olive oil | 0.911 | Midpoint 0.913 of the relative density 0.910–0.916 × water at 20 °C (0.998207), Codex standard |
| Water at 20 °C | 0.998207 | 1 atm, Tanaka et al. 2001 |
| Water at 4 °C | 0.999975 | Densest value, at 3.98 °C, Tanaka et al. 2001 |
| Seawater | 1.025 | Reference value used for conversions in NOAA data (varies with salinity and temperature) |
| Glycerin | 1.2613 | 20 °C, PubChem (CRC Handbook) |
| Mercury | 13.5336 | Liquid metal, PubChem periodic table |
| Ice at 0 °C | 0.91672 | Melting point at 1 atm, IAPWS 2009 |
| Sugar (sucrose) | 1.5805 | Crystal, 17 °C, PubChem (CRC Handbook) |
| Salt (sodium chloride) | 2.17 | Crystal, 25 °C, PubChem (CRC Handbook) |
| Graphite (carbon) | 2.267 | PubChem periodic table |
| Lithium | 0.534 | Lightest metal, PubChem periodic table |
| Sodium | 0.97 | PubChem periodic table |
| Magnesium | 1.74 | PubChem periodic table |
| Aluminum | 2.70 | PubChem periodic table |
| Titanium | 4.5 | PubChem periodic table |
| Zinc | 7.134 | PubChem periodic table |
| Tin | 7.287 | PubChem periodic table |
| Iron | 7.874 | Pure iron, PubChem periodic table |
| Nickel | 8.912 | PubChem periodic table |
| Copper | 8.933 | PubChem periodic table |
| Silver | 10.501 | PubChem periodic table |
| Lead | 11.342 | PubChem periodic table |
| Gold | 19.282 | Pure gold, PubChem periodic table |
| Tungsten | 19.3 | PubChem periodic table |
| Platinum | 21.46 | PubChem periodic table |
| Osmium | 22.57 | Heaviest in this table, PubChem periodic table |
Air density was calculated at 1 atm (101,325 Pa) and 20 °C with the ideal gas law ρ = p × M ÷ (R × T). The molar mass M of dry air is 28.9644 g/mol from the 1976 U.S. Standard Atmosphere, and the gas constant R is 8.314 462 618 J/(mol·K). The result is about 1.204 kg/m³. The iron value is for pure iron, so it can differ a little from steel, which contains carbon.
Float or sink: finding the submerged fraction
An object placed in a liquid is pushed up by a force equal to the weight of the liquid it displaces (Archimedes' principle). So if the average density of the object is lower than that of the liquid, it floats, and a floating object comes to rest with a fraction of its volume submerged equal to object density ÷ liquid density. If the object is denser, it sinks, and in the liquid it feels like only (1 − liquid density ÷ object density) of its weight in air.
| Object | Water at 20 °C | Seawater (1.025) | Mercury |
|---|---|---|---|
| Ice (0.91672) | Floats, 91.8% submerged | Floats, 89.4% submerged | Floats, 6.77% submerged |
| Olive oil (0.911) | Floats, 91.3% submerged | Floats, 88.9% submerged | Floats, 6.73% submerged |
| Aluminum (2.70) | Sinks, weighs 63% | Sinks, weighs 62% | Floats, 20% submerged |
| Iron (7.874) | Sinks, weighs 87.3% | Sinks, weighs 87% | Floats, 58.2% submerged |
| Lead (11.342) | Sinks, weighs 91.2% | Sinks, weighs 91% | Floats, 83.8% submerged |
| Gold (19.282) | Sinks, weighs 94.8% | Sinks, weighs 94.7% | Sinks, weighs 29.8% |
Olive oil is a liquid rather than an object, but the thickness of the layer that floats on water without mixing follows the same ratio, so it is included. Mercury is heavy enough to float iron and lead, but gold is 1.42 times as dense as mercury and sinks. Ships and life jackets float even though their material is denser than water, because they contain air, and the average density of the whole is lower than that of water.
The density of water changes with temperature
When you compare against water, you need to know the temperature of the water. By the formula that Tanaka et al. (2001) recommended for metrology, pure water with no dissolved air is densest at about 3.98 °C at 1 atm and becomes lighter when it is colder or warmer. So 1 g/cm³ is an approximation: between 0 and 30 °C it holds only to two decimal places (about 0.18% off at 20 °C). The specific gravity in this calculator takes the densest water (0.999975 g/cm³) as 1.
| Water temperature | kg/m³ | g/cm³ |
|---|---|---|
| 0 °C | 999.843 | 0.999843 |
| 4 °C | 999.975 | 0.999975 |
| 10 °C | 999.703 | 0.999703 |
| 15 °C | 999.103 | 0.999103 |
| 20 °C | 998.207 | 0.998207 |
| 25 °C | 997.047 | 0.997047 |
| 30 °C | 995.649 | 0.995649 |
| 35 °C | 994.033 | 0.994033 |
| 40 °C | 992.215 | 0.992215 |
Common mistakes
- Dividing without matching units: Writing 2 kg ÷ 500 mL as 2 ÷ 500 = 0.004 is wrong. The answer is 2,000 g ÷ 500 cm³ = 4 g/cm³.
- Mixing kg/m³ and g/cm³ in a comparison: Do not compare water at 998 kg/m³ with aluminum at 2.7 g/cm³ by the numbers alone. In the same unit they are 0.998 and 2.7.
- Treating weight as mass when weighing under water: A reading taken with the object hanging in water is lighter by the buoyant force, so it is not the mass.
- Air bubbles and water absorption: When you measure by water level, air bubbles on the surface make the volume look larger, and objects that soak up water, such as wood or a sponge, make it look smaller.
- Writing more digits than you measured: For a density worked out from 67.5 g (3 significant figures) and 25 cm³ (2 figures), the convention is to report 2.7 g/cm³, matching the measurement with fewer digits. You can choose the number of digits with the significant-figures buttons in the calculator.
Limits and cautions
- The result is the average density of the whole object. A hollow object, a porous one or one made of several glued materials gives a different value from the density of any single material.
- Several materials share almost the same density, so density alone cannot identify a material. Gold (19.282) and tungsten (19.3) are the classic example.
- The materials table and the liquid densities are representative values. Real values change with temperature, pressure, purity and alloy ratio, and gases change a great deal with temperature and pressure.
- The beaker drawing is based only on the density ratio. It ignores surface tension, the shape and tilt of the object, and the mixing of liquids. Seawater is assumed to be 1.025 g/cm³.
- The values you enter are calculated only inside this browser and are never sent to a server.
Basis: the unit factors are the exact definitions in NIST Handbook 44 (2026) Appendix C, and the water density formula is Tanaka et al. (2001). Material densities from PubChem, IAPWS, Codex and NOAA were checked on October 20, 2026.
Sources
- 01PubChem, Periodic Table of ElementsUS National Institutes of Health (NIH). Element densities (the Density column of the periodic table CSV)
- 02PubChem, Ethanol (CID 702)0.7893 g/cm³ at 20 °C (CRC Handbook, HSDB). Glycerol CID 753, sodium chloride CID 5234 and sucrose CID 5988 were checked in the same format
- 03Tanaka M. et al., Recommended table for the density of water between 0 °C and 40 °C based on recent experimental reports, Metrologia 38 (2001) 301–309Water density formula and constants (a5 = 999.974 950 kg/m³)
- 04IAPWS R10-06(2009), Equation of State 2006 for H₂O Ice IhTable 6: ice density at the melting point at 1 atm, 916.721 kg/m³
- 05Codex Alimentarius, Standard for Olive Oils and Olive Pomace Oils (CXS 33-1981)Relative density (20 °C/20 °C water) 0.910–0.916
- 06NOAA NCEI, World Ocean Database 2018 notesSeawater density of 1025 kg/m³ used for conversions
- 07NIST Handbook 44 (2026) Appendix C, General Tables of Units of Measurement1 lb = 453.592 37 g, 1 oz = 28.349 523 125 g, 1 in = 2.54 cm, 1 gal = 231 in³ = 128 fl oz (exact)
- 08U.S. Standard Atmosphere, 1976 (NASA-TM-X-74335)Molar mass of dry air, 28.9644 g/mol
- 09NIST CODATA, molar gas constantR = 8.314 462 618 J/(mol·K), exact value
Frequently asked questions
How do you calculate density?
Density is mass divided by volume (ρ = m ÷ V). With a mass of 67.5 g and a volume of 25 cm³, it is 67.5 ÷ 25 = 2.7 g/cm³. If the units are mixed, such as kg for mass and mL for volume, first convert to g and cm³ and then divide. The calculator above does this for you when you choose a unit for each box.
How do I convert g/cm³ to kg/m³?
Multiply by 1,000. 1 g/cm³ is 1,000 kg/m³, and the number is the same in g/mL and kg/L. For example, the density of water at 20 °C, 0.998207 g/cm³, is 998.207 kg/m³. In US customary units, 1 g/cm³ is about 62.428 lb/ft³.
Can I find mass or volume from density?
Yes. Mass is density × volume, and volume is mass ÷ density. 1 m³ of iron (7.874 g/cm³) has a mass of 7,874 kg, and 1 kg of ice (0 °C, 0.91672 g/cm³) has a volume of about 1.091 L. In the calculator, change "Solve for" to mass or volume and pick a material.
How do I measure the volume of an irregular object?
Fill a graduated cylinder with water, lower the object in until it is fully submerged, and the rise in the water level is the volume (1 mL = 1 cm³). If the level goes from 40 mL to 50 mL, the volume is 10 cm³, and with a mass of 89.3 g the density is 8.93 g/cm³, almost the same as copper (8.933). Air bubbles clinging to the object make the volume look larger, so shake them off before reading.
Does something float if its density is below 1?
An object floats if its overall average density is lower than that of the liquid. Water at 20 °C is 0.998207 g/cm³, so anything lighter floats, and the submerged fraction is object density ÷ liquid density. Ice (0.91672) is about 91.8% submerged in water and about 89.4% in seawater (assumed 1.025). For a hollow object such as a ship, what counts is the average density including the empty space, not the material.
What is the difference between specific gravity and density?
Specific gravity is the ratio to the density of a reference substance, and it has no unit. This calculator uses water at about 4 °C (0.999975 g/cm³), where it is densest, as the reference. So it is almost the same number as the density in g/cm³, with a difference of about 0.003%. Some fields use water at 20 °C as the reference, so check the basis of your source.
Is the density of water exactly 1 g/cm³?
No. Pure water with no dissolved air is densest at about 3.98 °C, at 0.999975 g/cm³, and is 0.998207 g/cm³ at 20 °C and 0.997047 g/cm³ at 25 °C (Tanaka et al. 2001, 1 atm). 1 g/cm³ is an approximation that holds only to two decimal places between 0 and 30 °C; at 20 °C it is about 0.18% off.
Can density alone tell if gold is real?
It is a clue, but not proof. Pure gold is 19.282 g/cm³, and tungsten is almost the same at 19.3 g/cm³, so a fake filled with tungsten is hard to catch by density. Gold mixed with other metals, such as 14K or 18K, comes out lower than pure gold. Leave a definite verdict to a professional assay.