What the Density Calculator does
This calculator finds density, mass or volume from the other two, in any mix of units - grams and cubic centimetres, kilograms and litres, pounds and cubic feet. Choose what you want to solve for, enter the two values you know, and it gives the answer in every common unit together with the specific gravity, whether the object would float in water and the common materials closest to it.
Unit conversions use the exact legal definitions, so results are as precise as your measurements. A built-in shape helper works out the volume of a box, cylinder or sphere from its dimensions.
How to use it
- Choose Density, Mass or Volume as the unknown.
- Enter the two known values and pick their units. For density in a school problem, grams and cubic centimetres are usual; for fuel, kilograms per litre; for building materials, kilograms per cubic metre or pounds per cubic foot.
- When solving for mass or volume you can pick a material, such as water, petrol or aluminium, to fill in a typical density.
- If you know the object's shape rather than its volume, open "Volume of a shape", enter its dimensions in centimetres and press "Use this volume".
- Read the answer in the big panel and in every unit in the table, then the specific gravity and the nearest materials.
Reading the results
Density is mass divided by volume. 1 g/cm³ is the same as 1 g/mL, 1 kg/L and 1,000 kg/m³; water at 4 °C is 0.99997 g/cm³, which is why its density is usually rounded to 1.
Specific gravity is the density divided by that of water at 4 °C, so it has no units: aluminium is about 2.7, petrol about 0.75. Anything with a specific gravity below about 1 floats in fresh water - but a hollow object floats if its overall density (including the air inside) is less than water's, even when its material is much denser, which is how steel ships float.
The nearest-materials list is a sanity check, not an identification. Many materials share similar densities, and alloys, woods, plastics and fuels vary by grade and temperature.
Worked example: identifying a metal block, and weighing a tank of petrol
A block weighs 540 g and displaces 200 mL of water (200 cm³). Its density is 540 / 200 = 2.7 g/cm³ = 2,700 kg/m³, with a specific gravity of 2.7 - exactly the value for aluminium, and it sinks in water.
Petrol to EN 228 has a density between 0.720 and 0.775 kg/L at 15 °C; at the middle value of 0.7475 kg/L, 40 litres weigh 40 x 0.7475 = 29.9 kg, anywhere from 28.8 to 31.0 kg across the allowed range.
Formulas and scoring rules
- Density
rho = m / V- Mass and volume
m = rho x V; V = m / rho- Specific gravity
SG = rho / rho_water(4 C), rho_water(4 C) = 999.975 kg/m3Water density from the NIST Chemistry WebBook at standard atmospheric pressure; at 20 C it is 998.207 kg/m3.- Unit factors
1 g/cm3 = 1000 kg/m3; 1 lb/ft3 = 16.018 kg/m3; 1 lb/US gal = 119.83 kg/m3From 1 lb = 0.45359237 kg, 1 in = 0.0254 m and 1 US gallon = 3.785411784 L exactly.- Shape volumes
box = l x w x h; cylinder = pi x d^2 / 4 x h; sphere = pi x d^3 / 6
Limitations: what the result does not prove
- Density depends on temperature and, for gases, strongly on pressure. The comparison values are at the temperatures stated beside them; the air value is for sea level at 15 °C.
- Results are as accurate as your measurements. Measuring volume by displacement only works for objects that do not absorb water or trap air.
- Fuel, wood, concrete and alloy densities vary by grade; use the value on the product's data sheet when it matters, for example for shipping weights or fuel loads.
- It does not convert between weight and volume for powders or granular foods, where packing changes the result - use a cups-to-grams converter for cooking.
Privacy: where your data goes
Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics. Session recording and tag-manager scripts are switched off on this page.
Standards and sources
- NIST SP 811 - Guide for the Use of the International System of Units - checked 19 Sep 2026
- NIST Chemistry WebBook - Thermophysical properties of fluid systems
- Royal Society of Chemistry - Periodic Table (element densities)
Frequently asked questions
What is the formula for density?
Density = mass / volume, written rho = m / V. Rearranged, mass = density x volume and volume = mass / density. Choose the one you need above and enter the other two values in any units.
How do you convert g/cm3 to kg/m3?
Multiply by 1,000: 2.7 g/cm³ is 2,700 kg/m³. A cubic metre holds a million cubic centimetres and a kilogram is a thousand grams, so the factor is 1,000,000 / 1,000. The table shows the answer in every unit at once.
What is the density of petrol?
European petrol to EN 228 must be between 720 and 775 kg/m³ at 15 °C, so about 0.72 to 0.78 kg per litre. Diesel to EN 590 is 820 to 845 kg/m³. Both are lighter than water, which is why fuel floats on it.
What is specific gravity?
The density of a substance divided by the density of water, usually at 4 °C. It has no units, so it is the same number whatever unit system you use: 1.0 for water, about 2.7 for aluminium and 19.3 for gold.
How do I find the density of an irregular object?
Weigh it, then lower it into a measuring jug of water and read how much the level rises - that rise is its volume in millilitres (cm³). Divide the mass by that volume. This is Archimedes' displacement method.
Will an object float or sink in water?
If its overall density is less than water's (about 1 g/cm³) it floats, otherwise it sinks. Seawater is a little denser, about 1.02 to 1.03 g/cm³, so things float slightly higher in the sea.
How much does a litre of water weigh?
Very close to 1 kilogram: 998.2 g at 20 °C and 999.97 g at 4 °C, where water is densest. Choose Mass, enter 1 L and pick water as the material to see it in grams, pounds and ounces.
Last reviewed by the A2Z.Tools team against the sources listed above.