Density Calculator
Calculate density, mass or volume in seconds. Switch between metric and imperial units, follow the calculation steps and compare your result with common materials.
What would you like to calculate?
Select the unknown quantity, then enter the other two measurements.
Your calculated answer
Density from mass and volume
Calculation steps
- Calculated steps will appear here.
Measurement note: This calculator uses mass density. Values for actual substances can vary with temperature, pressure and composition. Reference material densities are approximations.
What is density?
Density describes how much mass occupies a particular volume. It helps explain why a small metal object can feel heavy while a much larger piece of foam feels light. Two objects can have the same volume and very different masses because their average densities are different. Density is used in science classes, material selection, manufacturing, shipping, and many other situations where both mass and space matter.
The density of a uniform material is the mass divided by its volume. The standard SI unit is kilograms per cubic meter (kg/m³), but grams per cubic centimeter (g/cm³) and grams per milliliter (g/mL) are common for smaller samples and liquids. Our density calculator lets you work with those units and several US customary units without converting the numbers manually first.
Density formula and the three calculations
The same relationship can answer three different questions. Choose the calculation you need above, then enter the two quantities you already know.
If you know density and volume, multiply them to find mass. If you know mass and density, divide mass by density to find volume. The calculator converts your inputs into kilograms and cubic meters internally before applying the formula, then converts the answer to your selected display unit. This avoids mixing units such as pounds and liters in the same arithmetic step.
How to calculate density from mass and volume
Suppose a sample has a mass of 2.7 kilograms and occupies 1 liter. One liter is 0.001 cubic meter. Divide 2.7 kg by 0.001 m³ to obtain 2,700 kg/m³. That is also 2.7 g/cm³. A density around this value is typical of some aluminum alloys, although real materials vary with composition and conditions.
How to calculate mass from density and volume
Imagine a liquid with density 0.8 g/mL and a measured volume of 750 mL. Multiply 0.8 g/mL by 750 mL to get a mass of 600 grams. The volume and density units cancel neatly here, but the same method works with other units when they are converted first. This is useful for planning sample quantities or checking whether a container’s contents are consistent with an expected material.
How to calculate volume from density and mass
Consider a substance with mass 1.5 kg and density 1,200 kg/m³. Dividing 1.5 by 1,200 gives 0.00125 m³, or 1.25 liters. Volume must be positive in a meaningful physical sample, so the calculator rejects zero or negative volume. Similarly, a mass divided by zero density does not give a valid finite volume.
Convert between density units
Density is a ratio of mass to volume, so both parts of the unit matter. One gram per cubic centimeter is exactly 1,000 kilograms per cubic meter because 1 g equals 0.001 kg and 1 cm³ equals 0.000001 m³. One gram per milliliter is the same density as one gram per cubic centimeter, since 1 mL equals 1 cm³. The table below lists some useful relationships.
| Density unit | Equivalent in kg/m³ | Where you might see it |
|---|---|---|
| 1 g/cm³ | 1,000 | Solids and laboratory samples |
| 1 g/mL | 1,000 | Liquids and laboratory mixtures |
| 1 kg/L | 1,000 | Bulk liquid quantities |
| 1 g/L | 1 | Light gases and solutions |
| 1 lb/ft³ | About 16.0185 | Construction and materials |
| 1 lb/in³ | About 27,679.9 | Engineering specifications |
US gallons in this calculator mean US liquid gallons, not imperial gallons. Pounds represent mass in these conversions. When a source describes a force or the weight of a substance under gravity, do not treat it as a mass without checking the context.
Examples of material density
The density of a substance can change with temperature, pressure, purity and composition. The values below are rough reference values for comparison, not certified properties for a specific batch. Water is around 998 kg/m³ near 20°C, while air near room temperature at ordinary atmospheric pressure is roughly 1.2 kg/m³.
| Material | Approximate density | Notes |
|---|---|---|
| Air | 1.2 kg/m³ | Changes substantially with pressure and temperature |
| Ethanol | 789 kg/m³ | Near room temperature |
| Water | 998 kg/m³ | Near 20°C |
| Aluminum | 2,700 kg/m³ | Depends on alloy |
| Steel | 7,850 kg/m³ | Varies by grade and composition |
You can load the example buttons above to see the calculator respond to familiar densities. The reference comparison displayed beside the answer is a ratio to approximate liquid-water density, not a full buoyancy calculation. Whether an object floats also depends on its average density, displacement and the fluid in which it is placed. A hollow steel boat, for example, behaves differently from a solid steel block.
How to use the calculator accurately
- Select the unknown: Density, mass or volume.
- Enter the two known measurements: Choose a unit for each input before calculating.
- Pick the output unit: Use kg/m³, g/cm³, grams, liters or another available unit.
- Check the steps: The result card shows the formula, the converted SI values and the arithmetic.
- Choose decimal places: Rounding changes the displayed answer only, not the underlying conversion.
For precise laboratory work, consider measurement uncertainty and significant figures. A scale that reads to the nearest gram and a measuring jug marked every 50 mL cannot support the same precision as a calibrated balance and volumetric instrument. Additional displayed decimal digits do not make the original measurements more accurate.
Common mistakes when calculating density
The most frequent mistake is dividing incompatible units without converting them. For example, dividing 2 kilograms by 500 milliliters gives a numerical result of 0.004, but that number is not in kg/m³ until the volume is converted. Another mistake is assuming that all materials have the same density as water. A liter of oil, a liter of water and a liter of a dense metal do not have the same mass.
Always distinguish the space occupied by the whole object from the volume of solid material alone. A porous material or container with air gaps may have a lower bulk density than the true density of its solid particles. For gases, density can change dramatically with pressure and temperature; this simple calculator does not estimate those changes. Enter measurements that reflect the conditions you intend to analyze.
Frequently asked questions
What is the formula for density?
Density equals mass divided by volume. In SI units, divide kilograms by cubic meters to get kg/m³. You can rearrange the relationship to find mass or volume instead.
Is 1 g/mL the same as 1 g/cm³?
Yes. One milliliter equals one cubic centimeter, so both density expressions are equivalent. Each is equal to 1,000 kg/m³.
How do I calculate mass if I know density and volume?
Multiply density by volume after ensuring the units are compatible. For example, 0.8 g/mL multiplied by 750 mL equals 600 g.
How do I calculate volume from mass and density?
Divide the mass by the density. For example, 1.5 kg divided by 1,200 kg/m³ gives 0.00125 m³, equivalent to 1.25 L.
Can I calculate density using pounds and gallons?
Yes. Select pounds for mass and US gallons for volume. The calculator converts them internally and returns density in your selected output unit.
Does water always have density 1,000 kg/m³?
No. That figure is a common approximation. Actual density varies with temperature, pressure and dissolved substances. Around 20°C, pure liquid water has a density close to 998 kg/m³ at ordinary atmospheric pressure.
Can density be negative?
Mass density for ordinary physical substances is not negative. This tool rejects negative measured mass, volume and density. It also prevents division by zero.
Related calculators
For educational and general estimating purposes. Double-check critical engineering, laboratory or commercial work using appropriate standards and verified measurements.
