Density describes how much mass is packed into a given volume. A block of lead and a block of cork can be the same size, but the lead weighs far more because it has higher density. This single property determines whether ships float, whether balloons rise, and whether a material is suitable for a specific engineering application. This calculator solves the density formula for any one of its three variables: density, mass, or volume.
What This Calculator Does
Select which quantity you want to find: density, mass, or volume. Enter the two known values with their units, and the calculator returns the missing third variable. It handles unit conversions automatically, so you can enter mass in grams and volume in liters without converting first.
For related physics tools, try our Mass Calculator for unit conversions, or our Speed Calculator which uses a similar three-variable formula structure.
- Inputs: Any two of density (kg/m3), mass (with unit selection), and volume (with unit selection)
- Output: The missing third variable, in your choice of units
How the Calculation Works
Density (D) = Mass (m) / Volume (V)
Mass (m) = Density (D) x Volume (V)
Volume (V) = Mass (m) / Density (D)
The SI unit for density is kilograms per cubic meter (kg/m3). Other common units include grams per cubic centimeter (g/cm3), which equals 1000 kg/m3, and grams per milliliter (g/mL), which is numerically identical to g/cm3. When you select different mass and volume units, the calculator converts them to kg and m3 before applying the formula to ensure consistent results.
The density formula is one of the oldest in physics. Archimedes discovered the principle of buoyancy around 250 BCE when he realized that the volume of water displaced by an object equals the object's volume. By measuring the displaced water and weighing the object, he could calculate density without modern instruments. The story of him shouting "Eureka" in the bath comes from this discovery, which he used to verify the purity of a gold crown for the King of Syracuse.
How to Use the Calculator
- Select what you want to solve for: Density, Mass, or Volume
- Enter the two known values with appropriate units
- The result appears immediately on the right
- Reference common densities in the result panel for comparison
Example Calculations
Finding the Density of Aluminum
A machinist has a block of aluminum with a mass of 2.7 kg and a volume of 0.001 m3 (1 liter). Density = 2.7 / 0.001 = 2,700 kg/m3. This matches the known density of aluminum at room temperature, confirming the material.
Finding the Volume of Water
Water has a density of 1,000 kg/m3 at 4 degrees Celsius. A container holds 5 kg of water. Volume = 5 / 1000 = 0.005 m3 = 5 liters. This relationship (1 kg of water = 1 liter) is convenient and comes directly from the density of water being 1 g/cm3.
Identifying an Unknown Metal
A jeweler receives a small ingot and needs to verify whether it is gold or a cheaper alloy. She measures its mass at 38.6 g and its volume at 2.0 cm3. Density = 38.6 / 2.0 = 19.3 g/cm3 = 19,300 kg/m3. That matches the density of pure gold. If the density had been 17.5 g/cm3, it would indicate 18-karat gold rather than 24-karat.
Real-World Scenarios
Floating and Sinking in Naval Architecture
An object floats if its average density is less than the density of the surrounding fluid. Ice (917 kg/m3) floats on water (1,000 kg/m3) because it is less dense. Steel (7,850 kg/m3) sinks, yet steel ships float because their hull contains large air-filled compartments that bring the overall density below that of water. Naval architects use density calculations to determine cargo capacity and freeboard. Getting these numbers wrong can lead to capsizing.
Material Identification in Geology
Field geologists identify rocks by measuring density. A sample of galena (lead ore) has a density around 7,500 kg/m3, while quartz sits near 2,650 kg/m3. By weighing a sample and measuring its volume through water displacement, a geologist can narrow down the mineral type in minutes. This is faster and cheaper than sending samples to a lab for X-ray diffraction.
Chemistry and Solution Preparation
A chemist needs 50 g of sulfuric acid for a reaction. The acid's density is 1.84 g/mL. Rather than weighing a corrosive liquid on a balance, she calculates the volume: 50 / 1.84 = 27.2 mL. She can measure this volume with a graduated cylinder, which is safer and faster. Density conversions like this are routine in analytical chemistry and pharmaceutical manufacturing. You can also use our Molarity Calculator for related solution calculations.
Common Mistakes to Avoid
- Mixing unit systems: Always use consistent units. Mixing kg and cm3 without converting will give a result in kg/cm3, not kg/m3. This calculator handles conversions, but if you are doing the math by hand, convert first
- Confusing g/cm3 with kg/m3: 1 g/cm3 = 1,000 kg/m3. Water at 1 g/cm3 equals 1,000 kg/m3. This factor of 1000 is a common source of errors
- Using weight instead of mass: Density uses mass (in kg), not weight (in Newtons). On Earth, weight = mass x 9.81, but density calculations always use mass. A 1 kg object has the same density on Earth as on the Moon
- Ignoring temperature effects: Density changes with temperature. Water reaches its maximum density of 999.97 kg/m3 at 4 degrees Celsius. At 20 degrees Celsius, it drops to about 998 kg/m3. For precise work, always note the temperature
Limitations of This Calculator
This tool assumes uniform density throughout the object. Real materials can have varying density due to porosity, temperature gradients, or mixed compositions. The calculator does not account for buoyancy effects in air (which cause a small apparent mass difference) or for phase changes. For gases, density depends heavily on pressure and temperature, so you would need to specify conditions. This calculator is best suited for solids and liquids at standard conditions.
Authoritative Research and Resources
- NIST WebBook: Thermophysical Properties of Fluid Systems - The National Institute of Standards and Technology provides density data for water and hundreds of other fluids across a wide range of temperatures and pressures, based on the IAPWS-95 international standard formulation.
- NIST: Density of Water Formulation (ITS-90) - A peer-reviewed NIST publication giving the precise density of water as a function of temperature on the International Temperature Scale of 1990, used for calibrating volumetric standards.
- Khan Academy: Density - An educational resource covering the concept of density with worked examples, suitable for students learning the fundamentals.