What This Tool Does
Choose Density, Mass, or Volume, then enter the other two known values. The calculator converts the inputs to consistent SI units and keeps the result section hidden until a successful calculation.
- In Density mode, results appear in kg/m³, g/cm³, and lb/ft³.
- In Mass mode, results appear in kg, g, and lb.
- In Volume mode, results appear in m³, L, and ft³.
The Governing Formula
Density ρ is defined as mass per unit volume:
ρ = m / V
Rearranged for the other two quantities:
m = ρ × VV = m / ρ
where m is mass, V is volume, and ρ is density. The calculator converts mass to kilograms, volume to cubic meters, and a known density to kg/m³ before applying the selected formula.
Inputs & Supported Units
- Solve for: density (from mass and volume), mass (from density and volume), or volume (from mass and density).
- Mass unit: kilograms (kg), grams (g), milligrams (mg), pounds (lb), or ounces (oz).
- Volume unit: cubic meters (m³), cubic centimeters (cm³), cubic millimeters (mm³), liters (L), milliliters (mL), cubic feet (ft³), or cubic inches (in³).
- Density unit: kg/m³, g/cm³, or lb/ft³ for entering a known density. Density-mode results always show all three density units.
Assumptions and Limitations
The disclaimer assumes a uniform, homogeneous material with no internal voids. The tool performs deterministic unit conversion and arithmetic only; it does not fetch or infer a material's real-world density. If you solve for mass or volume, you must supply the density yourself. Its output is not presented as certified engineering, chemistry, or professional advice.
Input Validation and Calculation Limits
Fields are required. Each value must match the calculator's decimal pattern, so exponent notation is not accepted. Values must be finite, greater than zero, and no greater than 1e15. The calculator rejects empty, non-matching, non-finite, zero, and negative values, and it also rejects a calculated result that is not finite.
How to Use the Density Calculator
- Choose Density, Mass, or Volume. The relevant input group is shown or hidden for the selected mode.
- Enter the two known quantities and choose their units.
- Click Calculate to show the result and the Formula & steps section.
- Use Copy result or Download result (.txt). The download is named
density-calculator-result.txt. If copying fails, select and copy the result manually. - Click Reset to clear the values, restore the default units, select Density, and hide the result.
Privacy and Calculator Data
The density calculator performs its arithmetic locally in your browser, and its calculator script does not submit the values you enter.
Frequently Asked Questions
What is the formula for density?
Density equals mass divided by volume: ρ = m / V. Rearranged, mass equals density times volume (m = ρ × V), and volume equals mass divided by density (V = m / ρ).
What units does this calculator support?
Mass can be entered in kilograms, grams, milligrams, pounds, or ounces. Volume can be entered in cubic meters, cubic centimeters, cubic millimeters, liters, milliliters, cubic feet, or cubic inches. Density can be entered or is reported in kg/m³, g/cm³, or lb/ft³.
Can I solve for mass or volume instead of density?
Yes. Choose Mass or Volume and enter the other two known values; the calculator rearranges ρ = m / V for you.
Does this calculator know the density of specific materials?
No. This tool does not look up or infer material properties such as the density of water, steel, or any other substance. You must supply the density value yourself if you are solving for mass or volume.
Why must mass, volume, and density be positive?
This calculator requires mass, volume, and density values greater than zero, so it rejects zero, negative, or non-numeric entries with a specific error message.