DIY Cost Tools
Density Calculator
Science Calculator
Density Calculator
Calculate density from mass and volume, with results in grams per milliliter, kilograms per cubic meter, and specific volume.
Calculate density
How to use the density calculator
Enter a measured mass and volume, then select their units. The calculator converts both values to SI base relationships and reports density in grams per milliliter and kilograms per cubic meter, plus specific volume.
Density formula
Density = mass / volume; specific volume = volume / mass = 1 / density
Grams are converted to kilograms and milliliters, liters, or cubic centimeters are converted to cubic meters. One milliliter equals one cubic centimeter, and 1 g/mL equals 1,000 kg/m³.
Worked example
A sample with a mass of 250 grams and a volume of 200 milliliters has a density of 250 / 200 = 1.25 g/mL. The equivalent SI value is 1,250 kg/m³, and the specific volume is 0.0008 m³/kg.
Accuracy and assumptions
- Mass and volume are measured for the same sample.
- Inputs are treated as exact numeric values until display rounding.
- Temperature and pressure are not adjusted.
- Bulk materials with air spaces can have different bulk and particle densities.
- The result is only as accurate as the original measurements.
Frequently asked questions
Is 1 mL the same volume as 1 cm³?
Yes. A milliliter is the special name for one cubic centimeter.
Why can density change with temperature?
Many materials expand or contract as temperature changes. Their mass may stay nearly constant while volume changes, which changes density.
What is specific volume?
Specific volume is volume per unit mass and is the reciprocal of density when the units are consistent.
Related calculators
Sources and review
SI units and derived relationships were checked against NIST references for derived quantities including density and volume units. Calculator logic and examples were reviewed by the DIY Cost Tools editorial team on September 28, 2026.