To calculate density, you need exactly two measurements: mass and volume. Density equals mass divided by volume, and every method for finding density comes down to determining those two values. How you measure them, though, depends on whether you’re working with a solid, a liquid, or a gas, and whether the object has a regular or irregular shape.
The Two Core Measurements
Mass is measured by weighing the object, typically on a balance or scale. In a lab setting, you’d use a digital or analytical balance that reads in grams. Volume is where things get more interesting, because the approach changes depending on what you’re measuring and what shape it is. Once you have both values in compatible units, you divide mass by volume to get density. The most common units are grams per cubic centimeter (g/cm³) for solids and liquids, or kilograms per cubic meter (kg/m³) in engineering contexts.
Volume of Regular Solids: Linear Measurements
If an object has a simple geometric shape, you calculate its volume from direct linear measurements using a ruler, caliper, or micrometer. The specific measurements you need depend on the shape:
- Rectangular solid (box shape): length, width, and height. Volume = length × width × height.
- Cylinder: radius and height. Volume = π × radius² × height.
- Sphere: radius only. Volume = (4/3) × π × radius³.
The precision of your density result depends entirely on how carefully you take these measurements. A caliper that reads to the nearest 0.01 cm will give you a far more accurate density than a standard ruler. If you’re measuring a small object, even a fraction of a millimeter off on the radius can throw the final answer significantly, since radius gets squared or cubed in the formulas.
Volume of Irregular Solids: Water Displacement
For objects that don’t have a neat geometric shape (a rock, a piece of metal scrap, a figurine), you can’t measure length and width in any meaningful way. Instead, you use water displacement. Fill a graduated cylinder partway with water and record the starting water level. Then submerge the object completely and record the new water level. The difference between those two readings is the volume of the object.
This method works because a submerged object pushes aside exactly its own volume of water. Milliliters on a graduated cylinder are equivalent to cubic centimeters, so you can plug the result directly into the density formula alongside a mass measured in grams. The key observation here is reading the water level correctly: you need to read at the bottom of the meniscus, the curved surface water forms inside the cylinder. Your eyes should be level with the water line, not looking down or up at it. Even experienced operators can be off by a small amount, but with basic care and simple optical aids, that error can be kept to around 0.05 mm on the scale.
Liquid Density: Mass and a Known Volume
For liquids, the approach flips. You measure a known volume of the liquid using a graduated cylinder, pipette, or volumetric flask, then weigh it. More precisely, you weigh the empty container first, add the liquid, and weigh again. The difference gives you the mass of the liquid alone. Dividing that mass by the volume you measured gives density.
An alternative method uses a device called a hydrometer, which floats in the liquid. You observe how deeply it sinks. A denser liquid supports the hydrometer higher, while a less dense liquid lets it sink further. The scale printed on the hydrometer’s stem gives you a density reading directly from that single observation, no separate mass or volume calculation needed.
Gas Density: Pressure and Temperature Matter
Gases are compressible, which means their density changes depending on how tightly the gas molecules are squeezed together. For this reason, calculating gas density requires more observations than solids or liquids. You need to know the gas’s pressure, its temperature, and the type of gas (which tells you its molecular weight).
NASA’s equation of state describes this relationship: density equals pressure divided by the product of a gas constant and temperature. One critical detail is that the temperature must be in absolute units, meaning Kelvin rather than Celsius (or Rankine rather than Fahrenheit). A reading of 25°C, for example, would need to be converted to 298.15 K before plugging it into the equation. Forgetting this conversion is one of the most common errors in gas density calculations.
So for gases, your checklist of observations is: a pressure reading (from a barometer or pressure gauge), a temperature reading (from a thermometer, converted to absolute scale), and knowledge of what gas you’re dealing with.
Hydrostatic Weighing: Density Without Measuring Volume
There’s a clever method that skips volume measurement entirely. Hydrostatic weighing, based on Archimedes’ principle, requires only two weight measurements and a known reference liquid (usually water). You weigh the object in air to get its true weight, then weigh it while it’s submerged in water to get its apparent weight. The object feels lighter underwater because the water pushes up on it, and how much lighter it feels depends on its volume and the density of the water.
From those two observations (weight in air and apparent weight in water), plus the known density of water, you can calculate the object’s density directly. The National Physical Laboratory uses this as a fundamental method for high-precision density measurements, achieving uncertainties as small as 0.1%. This is the same principle behind body composition testing at gyms and sports clinics: a person is weighed on land, then weighed while submerged in a tank, and the difference reveals their average body density, which correlates with body fat percentage.
Why Temperature Is Always Part of the Picture
Temperature affects density for every state of matter, and precise work requires recording it alongside your mass and volume measurements. Liquids expand when heated, so the same mass of water occupies a slightly larger volume at 30°C than at 20°C. That changes its density. The same applies to solids, though the effect is smaller. Researchers at the National Institute of Standards and Technology apply thermal expansion corrections to their reference objects, adjusting volumes to a standard reference temperature of 20°C even when the lab environment differs by a fraction of a degree.
For everyday purposes, like a chemistry class, recording the room temperature is usually sufficient. But if you’re comparing your density result to a published reference value, make sure you know what temperature that reference was measured at. Water’s density is 1.000 g/cm³ at 4°C but drops to about 0.998 g/cm³ at 20°C. That small difference matters when water is your reference liquid in displacement or hydrostatic methods.
Quick Summary by Material Type
- Regular solid: mass (from a balance) + linear dimensions (length, width, height, or radius depending on shape)
- Irregular solid: mass (from a balance) + volume (from water displacement, recording initial and final water levels)
- Liquid: mass of a known volume (weighing the container empty and full) + volume (from a graduated cylinder or volumetric flask)
- Gas: pressure (from a gauge), temperature (in absolute units), and the identity of the gas
- Hydrostatic method (any solid): weight in air, apparent weight submerged in a liquid of known density
In every case, recording the temperature at the time of measurement ensures your result is accurate and comparable to reference values.

