Skip to content
CalculatorAtlas

Density Calculator

Tested

Mass, volume and density.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

g

Leave blank to solve for this value

g/cm³

Leave blank to solve for this value

cm³

Leave blank to solve for this value

Results

Enter your values and press Calculate. Results appear here.

  • • Result

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

  1. Optionally, enter mass (m) (g).
  2. Optionally, enter density (ρ) (g/cm³).
  3. Optionally, enter volume (V) (cm³).
  4. Press Calculate to see the result, and use Reset to start again.
Inputs of the Density Calculator
InputWhat to enterAllowed 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.

Results of example 1
ResultValue
Mass270 g

Example 2

Inputs: Mass (m) = 540; Volume (V) = 200.

Results of example 2
ResultValue
Density2.7 g/cm³

Example 3

Inputs: Mass (m) = 78.5; Density (ρ) = 7.85.

Results of example 3
ResultValue
Volume10 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.

How the result changes with density
DensityMass
1.35135 g
2.7270 g
5.4540 g
10.81,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.

Choosing between the Density Calculator and similar calculators
CalculatorYou enterIt returns
[Air Density Calculator](/science/air-density/)pressure, temperature and relative humidityAir density
[Kinetic Energy Calculator](/science/kinetic-energy-calculator/)mass and speedKinetic 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 distanceForce

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.

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.