Density Calculator
Enter any two of mass, volume and density and this calculator solves for the third using density = mass / volume. Pick the mass unit (kg, g, mg or lb) and volume unit (m3, cm3, L or mL) that match your measurements. Every result is also shown in SI kilograms per cubic metre so you can compare materials on one scale.
How to calculate density
- Set the 'Solve for' menu to Density, Mass or Volume so the unknown field disappears.
- Choose your mass unit and volume unit from the two dropdowns.
- Type the two values you already know into the remaining fields.
- Read the highlighted answer in your chosen units, with the equivalent kg/m3 shown beneath the density card.
- Click Copy to grab all three values as plain text.
Examples
Density from mass and volume
Solve for Density, mass = 100 g, volume = 50 cm3
density = 2 g/cm3 (2000 kg/m3)
Mass from density and volume
Solve for Mass, density = 2 g/cm3, volume = 50 cm3
mass = 100 g
Volume from mass and density
Solve for Volume, mass = 200 g, density = 2 g/cm3
volume = 100 cm3
Frequently asked questions
What is the density formula?
Density equals mass divided by volume (d = m / V). Rearranged, mass = density x volume and volume = mass / density. The calculator applies whichever form matches the value you asked it to solve for.
What units does the calculator use?
You pick the mass unit (kg, g, mg or lb) and the volume unit (m3, cm3, L or mL). Density is displayed in that exact pair, for example g/cm3, and also converted to SI kg/m3 for reference.
How does the mixed unit conversion work?
Internally every value is converted to SI base units (kilograms and cubic metres), the missing quantity is solved, then the answer is converted back to the units you selected. That lets you combine grams with cubic centimetres or pounds with litres without doing the maths by hand.
How do g/cm3 and kg/m3 relate?
They differ by a factor of 1000, so 1 g/cm3 equals 1000 kg/m3. Water is close to 1 g/cm3, which is 1000 kg/m3 or 1 kilogram per litre. The tool shows both figures side by side.
What is the density of water?
Pure water near 4 C is about 1 g/cm3, equal to 1000 kg/m3 or 1 kg per litre. Enter 1 kg and 1 L and solve for density to reproduce that value.
Why can't volume be zero?
Density divides mass by volume, so a volume of zero would be a division by zero. When you solve for density or mass with a volume of zero the calculator reports that volume must be greater than zero.
Does temperature change the answer?
This is a pure arithmetic tool, so it uses the numbers you enter and does not adjust for temperature or pressure. Real densities shift as materials expand or contract, so measure mass and volume at the same conditions for an accurate result.
How precise is the result?
Answers are rounded to nine decimal places, which is far finer than most laboratory measurements. If a value looks slightly off in the last digits, that is floating point rounding rather than a formula error.
Is my data sent anywhere?
No. The calculation runs entirely in your browser with JavaScript, so the mass and volume figures you type never leave your device.
Learn more
- Density units explained: g/cm3, kg/m3 and lb/ft3
How the common density units relate, when to use each one, and how to convert between grams per cubic centimetre and kilograms per cubic metre.
Related tools
Speed Distance Time Calculator
Work out speed, distance or time from the other two with speed = distance / time. Supports m/s, km/h and mph, plus metres, kilometres and miles.
Kinetic Energy Calculator
Calculate kinetic energy, mass or velocity using KE = 1/2 m v^2. Enter any two values in SI units (kg, m/s, joules) to solve for the third.
Ohm's Law Calculator
Solve Ohm's law online. Enter any two of voltage, current, resistance or power and get the other two, with the V, I, R and P formulas shown.
555 Timer Calculator
Calculate 555 timer astable frequency, period, high and low times and duty cycle from R1, R2 and the timing capacitor. Free oscillator design helper.
Absolute Humidity Calculator
Calculate absolute humidity in grams of water vapor per cubic meter from air temperature and relative humidity. Fast, free and works in your browser.
Allele Frequency Calculator
Find allele frequencies from genotype counts. Enter the number of AA, Aa and aa individuals to get the A and a allele frequencies and allele totals.