Science & Electronics · Formula v1.0

Density Calculator

Calculate density and specific gravity from mass and volume.

Specific gravity above 1 means denser than water; below 1 means it floats. At the worked-example inputs, the density is 2 g/cm³. Density is mass per unit volume, and the specific gravity compares it with water, which is 1 gram per cubic centimeter. On the example, 100 grams in 50 cubic centimeters is 2 g/cm³, twice the density of water, so it would sink. Use density to identify materials, check purity, predict floating and sinking and convert between mass and volume for ingredients or liquids. Wood floats because its density is under 1, and most metals sink. It returns density (g/cm³), specific gravity (relative to water).

FreeNo sign-upInputs stay in-browserCSV exportReviewed August 28, 2026
LAST REVIEWEDAugust 28, 2026Inputs stay in your browser
Live calculation

Enter your numbers

Calculated result
Density (g/cm³)2
Specific gravity (relative to water)2
Sensitivity check

What if mass (g) changes?

-10% input1.8
0% input2
+10% input2.2

Transparent method

The formula

Density = mass ÷ volume

Worked example

Density (g/cm³)2
Specific gravity (relative to water)2

Example inputs

Mass (g)100
Volume (cm³)50

How to interpret the result

Specific gravity is density expressed relative to water, which is what makes the number immediately meaningful without needing to remember water's own density in a specific unit system. Anything above 1 sinks in water, anything below 1 floats, a fast, intuitive read that raw density alone doesn't offer as directly.

Before you rely on it

What to check

Confirm mass and volume are measured in compatible units before dividing, since a units mismatch produces a density figure that looks plausible but is actually off by whatever factor the unit conversion was missing.

The common error

Where people go wrong with density calculator

Comparing raw density values measured in different unit systems without converting to a common basis first. Two genuinely different-looking density numbers can represent the identical material once the units are actually reconciled.

Sensitivity evidence

How mass (g) changes the density (g/cm³)

Density Calculator: density (g/cm³) and specific gravity (relative to water) across a range of mass (g), every other input held at the worked-example value.
Mass (g)Density (g/cm³)Specific gravity (relative to water)
801.61.6
901.81.8
100worked example22
1102.22.2
1202.42.4

Every input, tested

Which input moves the density (g/cm³) most

Density Calculator: density (g/cm³) with each input moved on its own, every other input held at the worked-example value.
InputTested fromToDensity (g/cm³) at each endSwing
Volume (cm³)45552.2 to 1.80.404 (20%)
Mass (g)901101.8 to 2.20.4 (20%)

Two variables at once

Density (g/cm³) by mass (g) and volume (cm³)

Density Calculator: density (g/cm³) at each combination of mass (g) (rows) and volume (cm³) (columns).
Mass (g) \ Volume (cm³)405060
8021.61.3
902.31.81.5
1002.521.7
1102.82.21.8
12032.42

Step by step

The worked example, input by input

Worked-example inputs and the results they produce for the density calculator.
InputValue used
Mass (g)100
Volume (cm³)50
Density (g/cm³)2
Specific gravity (relative to water)2

Where the inputs come from

Enter the mass in grams and the volume in cubic centimeters. Weigh the sample on a scale and measure volume by dimensions, by the water it displaces or from a label. One cubic centimeter equals one milliliter. Use the same system of units so that density comes out in grams per cubic centimeter. For irregular objects, submerge them in a graduated cylinder and read the change in level.

When the result stops applying

Density depends on temperature and pressure, especially for gases and liquids, and water is densest at about 4 degrees Celsius. Porous objects may absorb water and give a wrong displacement volume. Alloys and mixtures have densities between their components. Measurement errors in volume dominate for small samples.

What to compare it with

Convert mass and volume on the weight and volume converters, and compute volumes on the cylinder, sphere and rectangular prism calculators. The molarity and dilution pages use concentrations, and the percent error calculator measures how close your result is to a reference value.

People also ask

Frequently asked questions

What is specific gravity?

The ratio of a substance's density to the density of water, so a value above 1 sinks and below 1 floats in water.

How do I measure the volume of an irregular object?

Submerge it in water and measure how much the water level rises, which equals the object's volume.

Why does density change with temperature?

Most materials expand when heated, so the same mass occupies more volume and the density falls as the temperature rises.

Common science & electronics questions

Sources and evidence