Density Calculator
Enter any two of mass, volume, or density, the third is calculated instantly.
How to Use
Enter any two of mass, volume, or density, and the third fills in automatically using the density formula. Note that 1 cm³ equals 1 mL, so this also works directly for liquids measured in milliliters. Edit any field at any time to recalculate; the two most recently entered values are treated as known, and a third new entry bumps out whichever of the previous two was entered first.
The Density Formula
Density is mass divided by volume: ρ = m / V. Rearranged, that also gives mass from density and volume (m = ρ × V) or volume from mass and density (V = m / ρ). Density is what's called an intensive property, meaning it doesn't depend on how much of a material you have; a gram of gold and a kilogram of gold have the same density, even though their masses and volumes are very different.
A Worked Example: Identifying a Metal by Density
Using this calculator's default placeholder values, 100g of a material occupying 10 cm³ gives a density of 100 ÷ 10 = 10 g/cm³. Now suppose you have an unknown gold-colored nugget with a mass of 50 grams and, using the water-displacement method, measure its volume at 2.59 cm³. Dividing gives 50 ÷ 2.59 ≈ 19.3 g/cm³, matching gold's known density almost exactly and strongly suggesting the nugget is genuine rather than a lower-density look-alike like pyrite (about 5.0 g/cm³) or brass (about 8.5 g/cm³).
Density and Buoyancy: Why Things Float or Sink
Whether an object floats or sinks in a fluid depends entirely on comparing its density to the fluid's density, a relationship described by Archimedes' principle. An object less dense than the fluid displaces a volume of fluid weighing more than the object itself before fully submerging, so it floats with part of its volume above the surface; an object denser than the fluid sinks. Ice, at 0.92 g/cm³, floats in water (1.00 g/cm³) with about 92% of its volume submerged and 8% above the surface, the ratio of the two densities, which is why icebergs show only a small fraction of their total bulk above the waterline.
Measuring Volume: Regular vs Irregular Objects
For objects with a simple geometric shape, a cube, sphere, or cylinder, volume can be calculated directly from measured dimensions using standard geometric formulas. Irregular objects, like a rock, a piece of jewelry, or an oddly shaped part, don't have a simple formula, so the water-displacement method is used instead: submerge the object completely in a graduated container of water and note how much the water level rises. That volume increase equals the object's volume, since the object physically displaces its own volume worth of water. This method works for any solid that doesn't dissolve in, react with, or absorb water.
Density vs Specific Gravity
Specific gravity is closely related to density but expressed as a ratio rather than a unit-bearing value: it's a material's density divided by the density of water. Because water's density in g/cm³ is conveniently 1.00, a material's specific gravity number and its density in g/cm³ are numerically identical, gold's specific gravity is 19.3, the same number as its density in g/cm³. Specific gravity becomes more useful when comparing materials measured in different unit systems, since the ratio itself has no units and stays the same regardless of whether the underlying measurements were in metric or imperial units.
Temperature's Effect on Density
Density values are conventionally reported at a standard temperature (commonly 20°C or 25°C) because nearly all materials change volume with temperature while their mass stays fixed. Heating a material generally causes it to expand, increasing volume and therefore lowering density, while cooling has the opposite effect. Water is a notable partial exception: it's actually densest at about 4°C, not at its freezing point, and becomes less dense both as it warms above 4°C and as it freezes into ice, which is part of why ice floats rather than sinking to the bottom of a lake in winter.
Common Material Densities (g/cm³)
| Water | 1.00 |
| Ice | 0.92 |
| Aluminum | 2.70 |
| Iron | 7.87 |
| Copper | 8.96 |
| Gold | 19.30 |
| Wood (Oak) | ~0.75 |
| Glass | ~2.50 |
This table is a useful starting reference, but real-world samples of these materials, especially wood and glass, vary somewhat depending on exact composition, so treat it as a general guide rather than an exact figure for any specific sample.
Density in Everyday Cooking and Baking
Density calculations quietly show up in the kitchen too. Recipes that specify ingredients by volume (cups, tablespoons) rather than weight rely on an implicit assumption about that ingredient's density, which is why a cup of flour and a cup of honey weigh very different amounts despite occupying the same volume. Bakers who weigh ingredients on a scale, rather than measuring by volume, get more consistent results precisely because they're bypassing density-related variation, a cup of flour can be scooped loosely or packed tight, changing its effective density and therefore its weight, while a gram is always a gram regardless of how it's measured.
Density vs Concentration: A Common Confusion
Density and concentration are easy to conflate since both describe "how much stuff is packed into a given space," but they answer different questions. Density describes the mass of an entire substance, pure or mixed, per unit volume. Concentration, like molarity, describes how much of one specific component (a solute) is present within a larger mixture (a solution), independent of the mixture's overall density. A saltwater solution has both a density (its total mass per volume, slightly higher than pure water) and a concentration (how much dissolved salt it contains), and the two values, while related, are calculated and used for different purposes; our Molarity Calculator handles the concentration side of that distinction.
Real-World Uses of Density Calculations
Density calculations show up across a surprising range of practical fields. Geologists and jewelers use density to help identify unknown minerals and to distinguish genuine gemstones from convincing imitations. Quality control in manufacturing uses density measurements to detect internal voids, contamination, or incorrect material substitutions in finished parts. Shipping and freight companies calculate density (as dimensional weight) to determine pricing, since low-density but bulky packages take up valuable cargo space disproportionate to their weight. Metallurgists and engineers rely on density figures when selecting materials for aerospace or automotive parts, where minimizing weight without sacrificing strength is a constant design trade-off.
Solids, Liquids, and Gases: Density Across States of Matter
Density varies enormously across the three common states of matter, driven by how tightly particles are packed. Solids and liquids have particles close together, giving densities typically in the range of roughly 0.5 to 20 g/cm³ for common materials, while gases have widely spaced particles and correspondingly much lower densities, air at room temperature is only about 0.0012 g/cm³, nearly a thousand times less dense than water. This is also why gases are far more compressible than solids or liquids: squeezing a gas reduces the space between its widely spaced particles, meaningfully increasing its density, while a solid or liquid's particles are already packed close together and resist further compression.
Common Mistakes When Calculating Density
Mixing units. Combining a mass in kilograms with a volume in cm³ without converting first produces a result off by a factor of 1,000. Always convert to a single consistent unit pair, this calculator's grams and cm³, before entering values.
Forgetting that water displacement only works for objects that don't absorb or dissolve. Porous materials like some woods or unglazed ceramics can absorb water during a displacement measurement, artificially reducing the apparent volume and inflating the calculated density.
Assuming a table value applies exactly to a real sample. Reference densities describe pure, standard-condition materials. Alloys, composites, and natural materials with impurities can deviate noticeably from textbook figures.
Trapping air bubbles during a water-displacement measurement. An air pocket clinging to an irregular object's surface or hidden in a cavity inflates the apparent volume reading, artificially lowering the calculated density. Gently tapping or rotating the object underwater before reading the water level helps dislodge trapped air.
Frequently Asked Questions
Why does an object float or sink based on density?
An object floats in a fluid when its density is lower than the fluid's, it displaces water weighing more than itself before fully submerging. That's why ice (0.92 g/cm³) floats on water (1.00 g/cm³), and a solid iron block (7.87 g/cm³) sinks.
How do I measure the volume of an irregular object?
Submerge it in a graduated container of water and measure how much the water level rises, that increase in volume equals the object's volume (the classic water-displacement method).
Can I use different units like kg and liters?
This calculator uses grams, cm³ (equivalent to mL), and g/cm³. Since 1 kg = 1000 g and 1 L = 1000 cm³, the ratio of mass to volume stays the same regardless of unit, convert your values to grams and cm³ first for direct entry here.
What's the difference between density and specific gravity?
Specific gravity is a material's density divided by the density of water (1.00 g/cm³), making it a dimensionless ratio. A material with a specific gravity of 2.7, like aluminum, has a density of 2.7 g/cm³, since dividing by water's density of 1 doesn't change the number.
Does temperature affect density?
Yes. Nearly all materials expand slightly as temperature rises, increasing volume while mass stays constant, which lowers density. The reference values in this calculator's table assume standard conditions, close to room temperature, and can shift measurably at temperature extremes.
How is density used to identify an unknown material?
Measure the object's mass on a scale and its volume (directly for regular shapes, or by water displacement for irregular ones), divide mass by volume, then compare the result against a table of known material densities to find the closest match.