ThisCalculator

Chemistry

Density Calculator: Formula & How to Use It

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Density Calculator: Formula & How to Use It

A density calculator computes density from mass and volume using the formula � = m / V. You enter the mass and volume of a substance (in any consistent units), and it returns the density, typically in g/cm³, kg/m³, or lb/ft³. This page explains how the calculation works, how to choose the right units, and how to avoid common mistakes.

Formula

The density formula is:

� = m / V

Where:

  • Ï� (rho) is the density, in grams per cubic centimeter (g/cm³), kilograms per cubic meter (kg/m³), or pounds per cubic foot (lb/ft³).
  • m is the mass, in grams (g), kilograms (kg), or pounds (lb).
  • V is the volume, in cubic centimeters (cm³), cubic meters (m³), or cubic feet (ft³).

The units of density are always a mass unit divided by a volume unit. If you use grams and cubic centimeters, you get g/cm³. If you use kilograms and liters, you get kg/L, which is numerically the same as g/cm³.

Worked Example

Using the default values from the calculator above:

  1. Mass (m) = 50 g
  2. Volume (V) = 20 cm³
  3. Density = 50 g / 20 cm³ = 2.5 g/cm³
  4. Specific gravity = 2.5 g/cm³ / 1.0 g/cm³ = 2.5

The calculator shows a density of 2.50 g/cm³ and a specific gravity of 2.50. This means the substance is 2.5 times denser than water at 4°C.

When to Use a Density Calculator

You use a density calculator whenever you have a known mass and volume and want to identify a material or predict whether it will float. Common situations include:

  • Identifying an unknown metal or mineral from its density.
  • Checking if a liquid is pure or diluted (e.g., antifreeze, milk).
  • Converting between mass and volume for recipes or industrial mixing.
  • Designing objects that need to float or sink in water.

In chemistry labs, density is often used to identify substances because each pure substance has a characteristic density at a given temperature.

How to Read the Result

The density value tells you how much mass is packed into a given volume. A higher density means more mass per unit volume. For example:

  • Water at 4°C has a density of 1.00 g/cm³.
  • Aluminum has a density of about 2.70 g/cm³.
  • Iron has a density of about 7.87 g/cm³.
  • Air at room temperature has a density of about 0.0012 g/cm³.

If the density is less than 1 g/cm³, the substance will float in water (assuming no chemical reaction). If it is greater, it will sink. Specific gravity is the density of the substance divided by the density of water (1 g/cm³), so it is numerically equal to density in g/cm³ but unitless.

Common Mistakes and Unit Mix-Ups

The most frequent error is mixing units without converting. For example, if you enter mass in kilograms and volume in liters, you get kg/L, which is fine, but if you enter mass in grams and volume in milliliters, you get g/mL, which equals g/cm³. However, if you enter mass in pounds and volume in cubic inches, you get lb/in³, which is not a standard density unit.

Another common mistake is ignoring temperature. Density changes with temperature because volume expands or contracts. For liquids and gases, the change can be significant. Always note the temperature when measuring density.

Rounding too early can also cause errors. Keep at least three significant figures during intermediate steps, then round the final answer.

Limitations of the Formula

The simple formula � = m / V works for homogeneous substances where the density is uniform throughout. For mixtures, alloys, or porous materials, the measured density is an average, and the formula still applies but the result may not match a pure substance.

For gases, density depends strongly on pressure and temperature. The ideal gas law (PV = nRT) can be rearranged to give density, but that is beyond the simple mass/volume formula.

For irregularly shaped objects, volume cannot be measured directly with a ruler; you must use water displacement (Archimedes’ principle) to find the volume.

How to Measure Mass and Volume

To use the calculator, you need accurate mass and volume measurements:

  • Mass: Use a digital scale or balance. For solids, weigh the object directly. For liquids, weigh an empty container, then weigh the container with the liquid, and subtract.
  • Volume of a regular solid: Measure dimensions with calipers and calculate volume (e.g., length × width × height for a cube).
  • Volume of an irregular solid: Submerge in water in a graduated cylinder and measure the water level rise.
  • Volume of a liquid: Use a graduated cylinder or volumetric flask.

Always record the temperature, especially for liquids, because density changes with temperature.

Frequently Asked Questions

What is the density of water?

The density of pure water is 1.00 g/cm³ at 4°C (39.2°F). At room temperature (20°C), it is about 0.998 g/cm³. For most everyday calculations, 1 g/cm³ is accurate enough.

How do I convert density from g/cm³ to kg/m³?

Multiply by 1000. For example, 1 g/cm³ = 1000 kg/m³. This is because 1 g = 0.001 kg and 1 cm³ = 0.000001 m³, so 1 g/cm³ = 0.001 kg / 0.000001 m³ = 1000 kg/m³.

Can density be negative?

No. Mass and volume are always positive, so density is always positive. Negative density does not exist in normal matter.

Why does ice float on water?

Ice is less dense than liquid water. When water freezes, it expands, so the same mass takes up more volume. The density of ice is about 0.92 g/cm³, which is less than 1.00 g/cm³, so it floats.

How do I find the density of a gas?

For a gas, you can measure the mass of a known volume at a specific temperature and pressure, or use the ideal gas law: density = (P × M) / (R × T), where P is pressure, M is molar mass, R is the gas constant, and T is temperature in kelvin. This is more advanced than the simple mass/volume formula.

Related

Formula used
in m | Mass | g | 50 | 0
in V | Volume | cm³ | 20 | 0
out density | Density | g/cm³ | m / V | 2
out sg | Specific gravity | - | (m / V) / 1.0 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.