Quick Answer: A block with a mass of 270 g and a volume of 100 cm³ has a density of 2.7 g/cm³ (2,700 kg/m³), because density is mass divided by volume. It is denser than water, so it sinks.
What does this calculator do?
This density calculator solves the density equation, ρ = m/V, in any direction. Give it a mass and a volume and it returns the density; give it a density and a volume and it returns the mass; give it a mass and a density and it returns the volume.
Every answer is also shown in kilograms per cubic metre, grams per cubic centimetre and pounds per cubic foot, with the specific gravity and whether the material would float in fresh water.
Units are where density problems usually go wrong, so the calculator takes mass in grams, kilograms, milligrams, pounds or ounces, volume in cubic centimetres, millilitres, litres, cubic metres, cubic inches, cubic feet or US gallons, and density in g/cm³, kg/m³, g/mL, kg/L, lb/ft³ or lb/gal. It converts everything to kilograms and cubic metres first, using exact definitions (the pound is 0.45359237 kg and the foot 0.3048 m), and converts back for the answer.
For comparisons with water it uses pure, air-free water from the CIPM formula of Tanaka and colleagues: 999.97495 kg/m³ at its densest, near 3.98 °C, for specific gravity, and 998.2067 kg/m³ at 20 °C for the float or sink card.
Using the Density Calculator
- Choose what to solve for: density, mass or volume.
- Enter the two known values and choose their units.
- The unit menu of the quantity you are solving for sets the unit of the answer. Solving for density in lb/ft³, for example, gives the answer in lb/ft³.
- Read the result at the top, and the cards for the density in three units, the specific gravity, the float or sink check, and the mass and volume in kilograms and litres.
How is this calculated?
- Convert to SI. Mass is converted to kilograms and volume to cubic metres; a density you enter is converted to kilograms per cubic metre.
- Solve the density equation. One of three arrangements, depending on the mode:
ρ = m/V; m = ρV; V = m/ρ
- Specific gravity. The density divided by the density of pure water at 3.98 °C, its maximum, so the result has no units:
SG = ρ/(ρ_(water, 3.98 °C)); ρ_(water, 3.98 °C) = 999.97495 kg/m³
- Float or sink. The density is compared with pure water at 20 °C, 998.2067 kg/m³. Less dense floats; denser sinks.
- Convert back and round. The answer is converted to the unit you chose, the density is also given in kg/m³, g/cm³ and lb/ft³, and results are rounded half up to six significant figures (specific gravity to five). A zero volume when solving for density, or a zero density when solving for volume, is refused.
Worked Example
The default inputs are a 270 g block with a volume of 100 cm³:
- Mass: 270 g = 0.27 kg. Volume: 100 cm³ = 0.0001 m³.
- Density: 0.27 ÷ 0.0001 = 2,700 kg/m³, or 2.7 g/cm³, or 168.555 lb/ft³.
- Specific gravity: 2,700 ÷ 999.97495 = 2.7001.
- It sinks in fresh water at 20 °C.
Working out a mass, one litre of an oil with a density of 0.92 g/mL weighs 920 g, and floats on water.
Working out a volume, 1 kg of a material at 7.85 g/cm³ takes up 127.389 cm³.
In customary units, a 30 lb log with a volume of 1 ft³ has a density of 30 lb/ft³, which is 480.554 kg/m³, and floats.
How to Find Density
Weigh the object to get its mass, measure its volume, and divide. For a regular shape, calculate the volume from its dimensions. For an irregular one, lower it into a measuring container of water and read how far the level rises: the rise is its volume. That second method is Archimedes' displacement and works for anything that does not absorb water.
Density Units Compared
1 g/cm³ is the same as 1 g/mL and 1 kg/L, and is 1,000 kg/m³. In customary units it is 62.428 lb/ft³. The reference table on this page runs the calculator on 1 cm³ samples of different masses, so you can read across between units: 7.85 g/cm³ is 7,850 kg/m³ and 490.059 lb/ft³.
What does this calculator not account for?
- Temperature and pressure. Densities change with temperature, liquids and gases especially. The calculator uses the numbers you enter and does not correct them.
- Porous and hollow objects. Measured density of a sponge, a brick or a hollow part is the bulk density of the object, not of the material it is made from.
- Seawater and other liquids. The float or sink card compares with fresh water only. Seawater is denser, so some objects that sink in a lake float in the sea.
- Water that is not pure. The water figures are for pure, air-free water from the CIPM formula. Tap water differs slightly.
- Material identification. Two materials can share a density. A density close to a known value is a hint, not a proof of what something is made of.
What mistakes do people make with this?
- Mixing g/cm³ and kg/m³. They differ by a factor of 1,000. Water is about 1 g/cm³ or about 1,000 kg/m³, never 1 kg/m³.
- Using cubic centimetres as square centimetres. Volume is in cubic units; measure all three dimensions.
- Weight instead of mass. A spring scale reading in newtons must be divided by g to get kilograms first.
- US and UK gallons. The calculator uses the US gallon, 231 cubic inches. An imperial gallon is about 20% larger.
- Rounding volumes early. A small error in a small volume makes a large error in density.
Frequently Asked Questions
What is the formula for density?
How do you calculate mass from density and volume?
How do I find volume from mass and density?
What is specific gravity?
Why is water's density not exactly 1 g/cm³?
Will it float?
Sources
- Tanaka, Girard, Davis, Peuto and Bignell, Recommended table for the density of water between 0 °C and 40 °C based on recent experimental reports, Metrologia 38 (2001) 301 (CIPM formula). doi.org/10.1088/0026-1394/38/4/3
- NIST Special Publication 811, Guide for the Use of the International System of Units, Appendix B: conversion factors for pound per cubic foot, pound per gallon and volume units. nist.gov/pml/special-publication-811
- NIST Handbook 44, Appendix C, General Tables of Units of Measurement: the US gallon of 231 cubic inches. nist.gov/pml/owm/nist-handbook-44-current-edition

