Density Calculator
Density is how much mass is packed into a given volume, and one equation ties the three quantities together: if you know any two of mass, volume, and density, the third is a single step away. This calculator solves for whichever one is missing, converts between metric and imperial units as it goes, and reports specific gravity so you can tell at a glance whether the material sinks or floats in water.
It is pre-filled with a 540 gram block occupying 200 cm³, the classic aluminum check: the answer should come out at aluminum’s known density, and it does.
Presets are typical room-temperature values. Density shifts with temperature, purity, porosity, and trapped air, so treat a result as a property of the sample you measured, not a certified material value.
Quick Answer
Key takeaways
- One equation, three questions: ρ = m / V, m = ρ × V, and V = m / ρ. Pick the mode that matches your unknown and the calculator handles the rest.
- Units are converted to kilograms and cubic meters before any math happens, so mixing grams with cubic feet or pounds with milliliters is safe.
- Specific gravity is density measured against water at 1,000 kg/m³: above 1 the material sinks, below 1 it floats. The aluminum example reads 2.7000.
- Volume is the fragile input. A 5% error in a volume measurement becomes a 5% error in density, while mass from a decent scale is usually accurate.
- Quick Answer
- Using the three modes
- The density formula and the unit conversions behind it
- Worked example: the 540 gram aluminum block
- Typical material densities, and how far apart they sit
- Specific gravity and the sink or float test
- Not the other densities: three name collisions
- What competing calculators miss
- Frequently Asked Questions
- Add This Calculator to Your Website
Using the three modes
Choose the mode first, because it decides which two inputs the calculator asks for and which answer unit list it offers.
Density mode answers “what is this material?” Enter mass and volume. A result that lands on a preset value, the way 540 g over 200 cm³ lands on aluminum, is a quick identity check on an unknown sample.
Mass mode answers “how heavy will this be?” Enter density and volume. This is the shipping and structural question: how much a tank of liquid, a cast part, or a slab will weigh before you make it. For a round part, the cylinder mass calculator works the same density idea from the cylinder’s dimensions.
Volume mode answers “how much space will this take?” Enter mass and density. If the shape is a simple box, the box volume calculator gets the volume from its length, width, and height instead.
Load a preset when you know the material. In Mass and Volume modes the preset buttons fill the density in for water, aluminum, steel, gold, or lead. In Density mode a preset cannot be an input, so the calculator shows the value as a reference note instead.
The density formula and the unit conversions behind it
Density is mass per unit volume. Everything else on this page is that definition rearranged, plus careful unit conversion.
The conversion step is where hand calculations usually go wrong. This calculator converts every input to kilograms and cubic meters first, using fixed factors (1 g = 0.001 kg, 1 cm³ = 0.000001 m³, 1 lb = 0.453592 kg, 1 ft³ = 0.0283168 m³, 1 gal = 0.00378541 m³), does the division in SI units, then converts the answer into the unit you picked. The SI definitions behind those units are maintained by the Bureau International des Poids et Mesures in its SI Brochure, and the National Institute of Standards and Technology publishes the matching SI unit guidance for US users. Because the conversion happens before the math, 540 g over 200 cm³ and 0.54 kg over 0.0002 m³ are the same problem and give the same answer.
One identity worth memorizing: 1 g/cm³ = 1,000 kg/m³, and 1 g/cm³ is also 1 g/mL and 1 kg/L. Three of this calculator’s density units are the same quantity wearing different labels, which is why water reads 1.00 in all three.
Worked example: the 540 gram aluminum block
The calculator is pre-filled with this case, and all three modes close on the same three numbers, which is the strongest check that the triangle is consistent.
| Mode | Inputs | Answer |
|---|---|---|
| Density | Mass 540 g, volume 200 cm³ | 2,700 kg/m³ (2.7000 g/cm³) |
| Mass | Density 2.7 g/cm³ (aluminum preset), volume 200 cm³ | 540.0000 g |
| Volume | Mass 540 g, density 2.7 g/cm³ (aluminum preset) | 200.0000 cm³ |
| Summary line, all modes | Same triangle | Mass 0.5400 kg, volume 0.0002000 m³, density 2,700 kg/m³ |
| Specific gravity | 2,700 / 1,000 | 2.7000, sinks in water |
By hand: 540 g is 0.54 kg and 200 cm³ is 0.0002 m³, so ρ = 0.54 / 0.0002 = 2,700 kg/m³. The match with aluminum’s reference density is the point of the example: a measured density that lands on a known material is evidence about what the sample is, while a result halfway between two materials usually means an alloy, a hollow part, or a volume measurement that needs redoing.
Typical material densities, and how far apart they sit
The five preset materials span most of the range a student or engineer meets day to day, from water at 1,000 kg/m³ to gold at 19,320 kg/m³. The United States Geological Survey gives the same reference value for water in its water density explainer, including how that value moves with temperature.
| Material | kg/m³ | g/cm³ | Specific gravity | In water |
|---|---|---|---|---|
| Ice | 917 | 0.917 | 0.917 | Floats |
| Water (preset) | 1,000 | 1.00 | 1.0000 | Reference |
| Aluminum (preset) | 2,700 | 2.70 | 2.7000 | Sinks |
| Steel (preset) | 7,870 | 7.87 | 7.8700 | Sinks |
| Lead (preset) | 11,340 | 11.34 | 11.3400 | Sinks |
| Gold (preset) | 19,320 | 19.32 | 19.3200 | Sinks |
| Air at sea level | 1.225 | 0.001225 | 0.001225 | Rises in water |
The bars are scaled to gold, the densest preset, and they make the practical point faster than the table does: swapping aluminum for steel in the same part nearly triples its mass, and gold is more than seven times as dense as aluminum. That spread is why density is a useful first test on an unidentified metal and why a gold-colored sample at 8 or 9 g/cm³ is brass or another alloy, not gold.
Specific gravity and the sink or float test
Specific gravity is the fastest reading this calculator gives: it divides the result by water’s 1,000 kg/m³ and states the verdict in words. Above 1 sinks, below 1 floats, exactly 1 matches water.
Try the float side with the pre-filled calculator: change the mass to 500 g and the volume to 1,000 cm³ and the density comes out at 0.5000 g/cm³ with a specific gravity of 0.5000, reported as floats on water. That is the range of light woods and many foams. The test is about the material itself, not the object: a steel ship floats because its hull encloses air, so the average density of the whole vessel, steel plus air, is below 1. A solid steel sample at 7.8700 sinks every time.
Not the other densities: three name collisions
Three other terms borrow the word and mean something unrelated, and search results mix them freely. This page covers only the physical quantity, mass per unit volume of a material.
A density bonus in land use planning is a zoning incentive: build affordable housing and the city allows extra residential units beyond the base limit. Its inputs are unit counts and a bonus percentage, not grams and cubic centimeters. Population density counts people per square kilometer of land, a geography statistic. Defect density in software engineering counts defects per thousand lines of code, a quality metric. If your numbers describe land, housing, or code, one of those is your topic; if you weighed a sample and measured its size, you are in the right place.
What competing calculators miss
The density tools ranking for this term mostly solve ρ = m / V competently, and several carry longer material lists. Three gaps kept showing up in that set.
Miss 1: one direction only, or the reverse modes split across pages. Several ranking sites send mass and volume questions to separate calculators on separate pages, so checking a result backwards means re-entering converted numbers elsewhere. Here all three modes share one screen and one consistent triangle: the worked example above closes in all three directions on the same numbers.
Miss 2: density with no sink or float reading. A bare kg/m³ figure leaves the most common follow-up question, will it float, to a second calculation against water. This calculator reports specific gravity and states the verdict in the same result, on every mode.
Miss 3: presets that cannot be used as inputs. Reference tables on competing pages are reading material. The presets here load straight into Mass and Volume modes, so finding the mass of 200 cm³ of steel is two clicks, and in Density mode the preset still appears as a reference note for comparison.
One honest limit in the other direction: some competitors list dozens of materials. This tool ships five presets, covering the metals and water that dominate homework and workshop use, and any other material works by typing its density in directly.
Note on accuracy: density changes with temperature (warm liquids expand and get less dense), moisture content, porosity, and trapped air, so a calculated value describes the sample you measured, not a certified material property. For engineering or safety decisions, use measured data for your specific material and conditions.
Frequently Asked Questions
Density equals mass divided by volume: ρ = m / V. If you know any two of the three values, the third follows: mass = density × volume, and volume = mass / density. The calculator above solves all three forms and converts the units for you.
The SI unit is kilograms per cubic meter (kg/m³). In labs, grams per cubic centimeter (g/cm³) is common; 1 g/cm³ equals 1,000 kg/m³. The calculator converts between kg/m³, g/cm³, g/mL, lb/ft³, and kg/L automatically, and accepts mass in kg, g, mg, lb, oz, or tonnes and volume in m³, cm³, mm³, L, mL, ft³, in³, or gallons.
Specific gravity is a material’s density divided by the density of water (1,000 kg/m³). Because it is a ratio, it has no units. Materials with specific gravity above 1 sink in water; below 1 they float. The aluminum block in the worked example has a specific gravity of 2.7000, so it sinks.
Multiply them: m = ρ × V. For example, 200 cm³ of aluminum at 2.7 g/cm³ has a mass of 540 g. Select Mass mode in the calculator, load the aluminum preset, enter the volume, and it does the unit conversions for you.
Divide mass by density: V = m / ρ. A 540 g block of aluminum at 2.7 g/cm³ occupies 200.0000 cm³. Select Volume mode, enter the mass, load the material preset for the density, and pick the answer unit you want.
Yes. Most liquids and gases expand when heated, so their density drops. Solids change far less. The presets in this calculator are typical room-temperature values; for precise work, measure at your actual operating temperature.
Small measurement errors in volume cause large density errors, and real materials vary with purity, porosity, and trapped air. Double-check your volume measurement first, then check whether your sample is an alloy or a porous version of the reference material.
No. This page is only about physical density: mass per unit volume of a material. Population density counts people per unit of land area, a density bonus in zoning is permission to build extra housing units, and defect density in software counts defects per thousand lines of code. None of those involve weighing a sample.
Add This Calculator to Your Website
References
- Bureau International des Poids et Mesures, “The International System of Units (SI Brochure)” – the defining document for the kilogram, the metre, and the derived units this calculator converts between. BIPM: The International System of Units, SI Brochure. Accessed October 2026.
- National Institute of Standards and Technology, “SI Units” – NIST guidance on the SI units of mass and volume used throughout this page. NIST: SI Units, Office of Weights and Measures. Accessed October 2026.
- National Institute of Standards and Technology, Special Publication 811, “Guide for the Use of the International System of Units (SI)” – the conversion-factor reference for US customary to SI conversions such as pounds to kilograms and gallons to cubic meters. NIST SP 811: Guide for the Use of the SI. Accessed October 2026.
- U.S. Geological Survey, Water Science School, “Water Density” – the reference density of water (about 1,000 kg/m³) and how it changes with temperature, the basis for specific gravity. USGS: Water Density, Water Science School. Accessed October 2026.
- Royal Society of Chemistry, “Periodic Table: Aluminium” – reference properties for aluminum, including the 2.70 g/cm³ density used in the worked example. RSC Periodic Table: Aluminium. Accessed October 2026.
- Royal Society of Chemistry, “Periodic Table: Gold” – reference properties for gold, including the 19.32 g/cm³ density used in the preset table. RSC Periodic Table: Gold. Accessed October 2026.
