Results are estimates. They do not replace the governing code, class or flag requirements, or a check by a competent person. Report a problem
Introduction
Density is the mass of a material per unit volume. You calculate it by dividing the mass by the volume: a 1 L bottle holding 0.998 kg of water shows a density of 998 kg/m³. Turned around, the same relation gives the mass of a known volume, or the volume a known mass fills. One cubic metre of carbon steel weighs 7 850 kg, the same volume of ethanol 789 kg.
This calculator solves for density, mass or volume from the other two. It has a library of reference densities for water, solvents, fuels, common gases, metals, structural timber, concrete and glass, and it gives the specific gravity as well. It is for engineers, technicians and students who need a quick mass or volume for a tank, a shipment or a part.
Liquids in the library are at 20 °C unless the label says otherwise. Warming lowers their density by about 0.02 % per kelvin for water and about 0.1 % per kelvin for solvents and fuels.
Gases are at 0 °C and 1 atm. Their density changes in proportion to the absolute pressure and inversely to the absolute temperature, so at 20 °C they are about 7 % lighter.
Fuels, timber and concrete vary from batch to batch. Petrol lies between 720 and 775 kg/m³ and diesel between 820 and 845 kg/m³ at 15 °C. Timber values are means at about 12 % moisture.
Alloys vary by a percent or two with composition. Use a measured or certified value for weighing, custody transfer or structural checks.
Worked example
A drum holds 200 L of ethanol at 20 °C. What is the mass of the ethanol?
Density of ethanol at 20 °C: 789.3 kg/m³.
Volume: 200 L = 0.2 m³.
Mass: 789.3 × 0.2 = 157.9 kg.
Specific gravity: 789.3 / 999.972 = 0.789.
The drum contents weigh about 158 kg, or 348 lb, plus the drum itself.
FAQ
How do you calculate density?
Divide the mass by the volume. A 2 kg block that displaces 0.74 L of water has a density of 2 / 0.00074 = 2 700 kg/m³, which is aluminium.
What is the density of water?
999.97 kg/m³ at 4 °C, where it is densest, and 998.2 kg/m³ at 20 °C. In US units that is 62.4 lb/ft³ or 8.33 lb per US gallon.
How do I convert g/cm³ to kg/m³?
Multiply by 1 000. Steel at 7.85 g/cm³ is 7 850 kg/m³, and 1 g/cm³ is also 1 kg/L.
How do I find the mass from density and volume?
Multiply them, with matching units. 3 m³ of concrete at 2 400 kg/m³ has a mass of 7 200 kg.
Why does the density of a gas depend on pressure?
Gas molecules are far apart, so compressing the gas packs more of them into the same volume. Doubling the absolute pressure doubles the density at the same temperature.
What is the difference between density and specific gravity?
Density has units, such as kg/m³. Specific gravity is the density divided by that of water, so it has no units: 0.789 for ethanol and 7.85 for steel.
Related calculators
Specific gravity — SG, API gravity and Baumé degrees from density.
Before every release the calculator must reproduce each case below. The note under each case says where the expected answer comes from: a standard, a textbook, a published table, or a hand calculation shown in full.
200 L of ethanol at 20 °C (0.7893 g/cm³) has a mass of 157.86 kg and a specific gravity of 0.789CRC Handbook, density of ethanol at 20 °C; m = ρ V by hand
Water at 4 °C is 62.43 lb/ft³ and at 20 °C 62.32 lb/ft³; carbon steel is 490 lb/ft³Standard US values (62.4 lb/ft³ for water, 490 lb/ft³ for steel, AISC Manual)
Normal gas densities agree with M / 22.414 L/mol within the real-gas correction (under 0.7 %)Ideal molar volume 22.414 L/mol at 0 °C and 1 atm (CODATA); IUPAC 2021 molar masses
Density from mass and volume: 7.85 kg in 1 L is 7 850 kg/m³; volume of 1 t of water at 20 °C is 1.0018 m³ρ = m / V and V = m / ρ by hand
Gases warn about their reference state; zero volume, negative mass and an unknown material are rejectedBehaviour check: warnings and rejected inputs
Worked example of the article: the calculator reproduces 157.9 kg, 0.789 to the digits printedThe worked example on this page, to the digits printed
Assumptions and sources
Assumptions and limits
Density is mass divided by volume, ρ = m / V; the calculator solves for whichever of the three is missing.
Library liquids are at 20 °C unless the label says otherwise, gases at 0 °C and 101.325 kPa; liquids lose about 0.02 % (water at 20 °C) to 0.1 % (solvents, fuels) of their density per kelvin of warming and gases change with pressure and temperature as in the ideal gas law.
Fuel, timber and concrete densities are typical values within a range: petrol 720–775 and diesel 820–845 kg/m³ at 15 °C, timber at about 12 % moisture, concrete with normal aggregates; use a measured value for anything that matters.
Specific gravity is the density divided by that of water at 4 °C (999.972 kg/m³).
Sources
CRC Handbook of Chemistry and Physics, 97th ed., sections 3 (organic liquids), 4 (elements) and 6 (density of gases and of water)
EN 1993-1-1:2005 §3.2.6 (steel 7 850 kg/m³); EN 10088-1:2014 (stainless steels); EN 338:2016 Tables 1 and 3 (timber mean densities)
EN 228:2012 and EN 590:2013 (density limits of petrol and diesel at 15 °C); EN 572-1:2012 (soda-lime glass 2 500 kg/m³)
Cite this calculator
Papandreou, C. (2026). Density calculator (mass, volume and density). Engineering Bible. https://engineeringbible.com/process/density/
Embed this calculator on your site
Copy this HTML into your page. The calculator stays free to use and links back here.