Quick answer
Density is ρ = m ÷ V, so mass is m = ρV. A material with density 2.7 g/cm³ and volume 100 cm³ has a mass of 270 g (aluminium).
Enter any two of density, mass and volume, leaving one blank. The calculator returns the missing value.
Related tools: Air Density Calculator: Density of moist air from pressure, temperature and humidity. Kinetic Energy Calculator: Kinetic energy and momentum of a moving mass. Charles's Law Calculator: V₁/T₁ = V₂/T₂ at constant pressure.
How to use the Density Calculator
- Optionally, enter mass (m) (g).
- Optionally, enter density (ρ) (g/cm³).
- Optionally, enter volume (V) (cm³).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Mass (m) (optional) | A number, in g. Leave blank to solve for this value | — |
| Density (ρ) (optional) | A number, in g/cm³. Leave blank to solve for this value | — |
| Volume (V) (optional) | A number, in cm³. Leave blank to solve for this value | — |
Formula and method
Formula
ρ = m ÷ V (m = ρ × V)
IEEE-754 double precision; shown to at most 6 decimal places.
Fill in any two values and leave the third blank; the blank one is calculated. Use consistent units.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Density (ρ) = 2.7; Volume (V) = 100.
| Result | Value |
|---|---|
| Mass | 270 g |
Example 2
Inputs: Mass (m) = 540; Volume (V) = 200.
| Result | Value |
|---|---|
| Density | 2.7 g/cm³ |
Example 3
Inputs: Mass (m) = 78.5; Density (ρ) = 7.85.
| Result | Value |
|---|---|
| Volume | 10 cm³ |
The first line is the headline result (mass). IEEE-754 double precision; shown to at most 6 decimal places.
Reference densities
Water 1.0 g/cm³, aluminium 2.7, iron 7.87, lead 11.3, gold 19.3 and air about 0.0012. An object floats in a liquid if its density is lower.
Units
Use consistent units: g/cm³ with cm³ gives grams, kg/m³ with m³ gives kilograms. 1 g/cm³ = 1,000 kg/m³. Exactly one field must be blank and division by zero is rejected.
How the result changes with density
Holding every other input at the first worked example, this table changes only density. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Density | Mass |
|---|---|
| 1.35 | 135 g |
| 2.7 | 270 g |
| 5.4 | 540 g |
| 10.8 | 1,080 g |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Mass (m): entering "1" shows "Leave exactly one field blank and fill in the other two." beside that field and no result.
Choosing between the Density Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Air Density Calculator](/science/air-density/) | pressure, temperature and relative humidity | Air density |
| [Kinetic Energy Calculator](/science/kinetic-energy-calculator/) | mass and speed | Kinetic energy |
| [Charles's Law Calculator](/science/charles-law/) | Final volume | |
| [Boyle's Law Calculator](/science/boyles-law/) | Final volume | |
| [Coulomb's Law Calculator](/science/coulombs-law-charge/) | charge 1, charge 2 and distance | Force |
Background: motion and mechanics
For constant acceleration the standard relations are v = u + at, s = ut + ½at², v² = u² + 2as and s = ½(u + v)t. Pick the equation that contains your three known quantities and the one you want. Use SI units (metres, seconds, kilograms, newtons, joules) throughout or the answer will be off by a factor.
These equations stop applying when acceleration changes during the motion, as with a rocket burning fuel; that needs calculus or numerical methods.
Assumptions and limitations
- Exactly one field must be left blank
- Division by zero is rejected
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for mass (m) to confirm this.
Frequently asked questions
How do I find volume from mass and density?
Rearrange ρ = m ÷ V to V = m ÷ ρ: 270 g of a 2.7 g/cm³ metal has a volume of 100 cm³.
What is specific gravity?
Density relative to water.
Does density change with temperature?
Slightly, especially for gases.
What does the Density Calculator calculate?
Solve mass, density or volume. It returns Mass.
What formula does the Density Calculator use?
ρ = m ÷ V (m = ρ × V). Fill in any two values and leave the third blank; the blank one is calculated.
What do I need to enter in the density Calculator?
You enter . Optional: Mass (m) (g), Density (ρ) (g/cm³) and Volume (V) (cm³).
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Exactly one field must be left blank.
What are the limits of this calculator?
Exactly one field must be left blank. Division by zero is rejected.
What is an example of a density result?
With density (ρ) 2.7 and volume (V) 100, the mass is 270 g.
Related calculators
- Air Density Calculator — Density of moist air from pressure, temperature and humidity.
- Kinetic Energy Calculator — Kinetic energy and momentum of a moving mass.
- Charles's Law Calculator — V₁/T₁ = V₂/T₂ at constant pressure.
- Boyle's Law Calculator — P₁V₁ = P₂V₂ at constant temperature.
- Coulomb's Law Calculator — Electrostatic force between two point charges.
- Speed Distance Time Calculator — Solve distance, speed or time.
Sources
- OpenStax, University Physics Volume 1 (Rice University): mechanics
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.