How this mass density calculator works
This three-way solver finds density, mass, or volume from the other two. Choose what to solve for (default Density), enter the two known values each greater than 0, pick their units, and pick the unit for the result. The headline is the solved value with up to four decimal places. Internally the widget converts to kilograms, cubic metres, and kg/m³, then converts back, so mixed units work.
Empty or typed 0 on either known value is no result. In Density mode, a volume that converts to 0 m³ or less is also no result. In Volume mode, a density that converts to 0 kg/m³ or less is also no result. Defaults are kg, m³, and kg/m³. Advanced options is GPA-style: Show common conversions is unused while the section is closed, even if it stays checked.
How to use the mass density calculator
- Choose what to solve for: Density (default), Mass, or Volume. The form shows the other two inputs.
- Enter both known values greater than 0, each with its own unit. Empty or typed 0 is no result.
- Pick the result unit. Density defaults to kg/m³, mass to kg, and volume to cubic metres.
- Open Advanced options only if you want the result in extra common units. Closing the section hides those rows even if the checkbox stays checked.
Advanced options, and closing them
This section is GPA-style. Closed, conversion rows are unused even if Show common conversions stays checked. Open and checked, extra rows appear for units other than the current result unit: density shows kg/m³, g/cm³, and lb/ft³; mass shows kg, g, lb, and oz; volume shows litres, millilitres, m³, and gallons. The unit already on the headline is omitted.
Density formulas
Density ρ = m ÷ V. Mass m = ρ × V. Volume V = m ÷ ρ. Values are converted to kilograms, cubic metres, and kg/m³ before the arithmetic, then converted to the result unit you chose.
Worked examples
Example: 10 kg in 2 m³, solve for density
ρ = 10 ÷ 2 = 5 kg/m³. With Advanced options open and Show common conversions checked, extra rows include g/cm³ and lb/ft³ (kg/m³ is omitted because it is already the headline).
Example: 1000 kg/m³ and 0.002 m³, solve for mass
m = 1000 × 0.002 = 2 kg. Empty or typed 0 density or volume is no result.
Example: 8 kg at 4 kg/m³, solve for volume
V = 8 ÷ 4 = 2 m³. A density that converts to 0 kg/m³ or less produces no result in Volume mode, just as a volume that converts to 0 m³ or less produces no result in Density mode.
Things to keep in mind
Both known values must be greater than 0. This is mass density, not weight. Mixing units is safe because the arithmetic always runs in kilograms, cubic metres, and kg/m³. Closing Advanced options hides extras without clearing your inputs.
Mass density calculator FAQ
Which fields are required?
The two known values for the chosen mode must each be greater than 0. Empty or typed 0 is no result. Mode defaults to Density; units default to kg, m³, and kg/m³. Advanced options are optional.
What happens when I close Advanced options?
The extra conversion rows are unused even if Show common conversions stays checked — the same GPA contract as other calculators on this site. The headline still shows the solved value.
Why is there no result for some volumes or densities?
In Density mode, a volume that converts to 0 m³ or less is invalid. In Volume mode, a density that converts to 0 kg/m³ or less is invalid. Mass mode still needs both density and volume greater than 0.
How do mixed units work?
Inputs convert to kilograms, cubic metres, and kg/m³, the formula runs, then the result converts to the unit you picked. You can enter grams and millilitres and still get kg/m³.
Which conversion rows appear?
Only while Advanced options is open and Show common conversions is checked. Density: kg/m³, g/cm³, lb/ft³. Mass: kg, g, lb, oz. Volume: litres, millilitres, m³, gallons. The current result unit is left out.
Does this density calculator store my numbers?
Completed results can be saved in this browser’s local history so you can reopen them later. They stay on your device and are not sent to our servers or to analytics.