Density Calculator
Calculate density, mass, or volume from the other two values using the formula density = mass ÷ volume.
Example
A metal block has a mass of 100 g and a volume of 50 cm³. Density = 100 ÷ 50 = 2 g/cm³ (equivalent to 2000 kg/m³).
How it works
Density (ρ) equals mass (m) divided by volume (V): ρ = m / V. Rearranged, mass = ρ × V and volume = m / ρ. Pick which quantity to solve for and enter the other two.
Good to know
This Density Calculator is a three-way solver built around the relationship ρ = m / V. Pick which quantity you want to find using the Density / Mass / Volume toggle, type the other two numbers, and the answer updates the instant you stop typing. It's a quick tool for students working through physics or chemistry homework, hobbyists checking whether a material will float or sink, and makers estimating how heavy a part will be before they cut or print it.
The calculator works in a single consistent metric system: grams for mass, cubic centimeters for volume, and grams per cubic centimeter for density. Because 1 cm³ of water weighs almost exactly 1 g, the g/cm³ figure doubles as a handy reference point — anything below about 1 g/cm³ will float on water, and anything above it sinks. The result panel also restates your answer in SI-friendly units (kg/m³ for density, kg for mass, and liters for volume) and echoes the exact arithmetic it used, so you can copy the working straight onto a homework sheet.
Reading the output is straightforward: the large number is your answer, "In kg/m³" shows the converted equivalent, and "Formula" spells out the substituted equation. If you see dashes instead of a number, one of your inputs is blank or you've asked it to divide by zero (a volume or density of 0), so check those fields.
One practical caveat: the tool assumes you enter values in grams and cubic centimeters, so convert first if your figures are in kilograms, milliliters, or cubic meters. A useful shortcut is that 1 mL equals 1 cm³, which makes liquid volumes easy to plug in, and remember that density depends on temperature — published reference densities are usually quoted at a specific temperature, so expect small differences for hot or cold samples.
Frequently asked questions
What units does this density calculator use?
It uses grams for mass, cubic centimeters (cm³) for volume, and grams per cubic centimeter (g/cm³) for density. Results are also shown in kg/m³, where 1 g/cm³ equals 1000 kg/m³.
How do I find mass or volume instead of density?
Use the toggle at the top to switch modes. To find mass, enter density and volume (m = ρ × V). To find volume, enter mass and density (V = m / ρ).
Is my data uploaded anywhere?
No — this calculator runs entirely in your browser. Your inputs never leave your device, and it works offline once loaded.
Is this calculator free?
Yes, completely free with no sign-up and no limits.
People also ask
What is the formula for density?
Density equals mass divided by volume, written as ρ = m / V. Rearranged, mass = density × volume and volume = mass ÷ density, which is why this calculator can solve for any one of the three values.
How do I calculate the density of an irregular object?
Find its mass on a scale, then measure its volume by water displacement: submerge it in a graduated container and record how much the water level rises in mL (which equals cm³). Divide the mass by that volume to get density.
What is the density of water in g/cm³?
Pure water is almost exactly 1 g/cm³ at 4°C, which equals 1000 kg/m³. This makes water a convenient benchmark — materials lighter than 1 g/cm³ float and denser ones sink.
How do I convert g/cm³ to kg/m³?
Multiply the g/cm³ value by 1000. For example, 2 g/cm³ equals 2000 kg/m³. This calculator shows both units side by side automatically.
Is density the same as specific gravity?
They are closely related but not identical. Specific gravity is density divided by the density of water, so it is unitless, whereas density carries units like g/cm³. Numerically, an object's specific gravity matches its density in g/cm³ because water is about 1 g/cm³.
Why does my calculated density show a dash instead of a number?
A dash appears when a required field is empty or when you've entered a volume or density of zero, since dividing by zero is undefined. Fill in both inputs with non-zero values to get a result.
Does temperature affect density?
Yes. Most materials expand when heated, which increases volume and lowers density, so the same substance can have slightly different densities at different temperatures. Reference tables usually state the temperature at which a density was measured.
Related calculators