Density Calculator
Density from a mass and a volume, printed in kg/m³ and g/cm³.
What the density calculator does
It applies ρ = m / V, one pair per line, and prints the quotient in kg/m³ with the same figure in g/cm³ beside it. 1.5 kg in 0.002 m³ is 750 kg/m³, which is 0.75 g/cm³; the second line is the first divided by 1000, not a second measurement.
Each line is one body: a mass in kilograms and the volume it occupies in cubic metres. A liquid, a solid or a powder all work the same way, because the page does not care what the material is. A porous or hollow object gives its bulk density, which the page states rather than implying a material's true density.
A volume of zero is refused because the division would have no value, and a negative mass or volume is refused by name. Up to 1000 pairs are accepted.
Numbers print to ten significant figures with trailing zeros trimmed.
How to use it
Enter one mass, volume pair per line in the text box, in kilograms and cubic metres.
Press Run. Each line prints the density in kg/m³ and g/cm³. If your measurement is in grams and millilitres, convert to kilograms and cubic metres first; the page does no unit conversion.
Worked example
Input:
1.5, 0.002
Output:
Line 1: 750 kg/m³ = 0.75 g/cm³
Why it runs in your browser
The division runs in this tab. The mass and the volume are never sent anywhere.
Density is mass per unit volume, and the page computes ρ = m / V from a mass and the volume it occupies. It prints the answer in kilograms per cubic metre with the same figure in grams per cubic centimetre beside it.
Each line is one body. 1.5 kg in 0.002 m³ is 750 kg/m³, which reads 0.75 g/cm³; the second number is the first divided by 1000, not a second measurement.
The page takes the mass and volume you measured and says nothing about the material's identity. A porous or hollow object therefore gives its bulk density, which is stated rather than implied.
Bulk density and true density
A solid block's density is its mass divided by the volume it encloses. A sponge, a gravel pile or a hollow casting encloses air, so the same quotient includes that air and is a bulk density rather than the material's true density.
The page cannot tell which you measured, so it prints the quotient and names the limit. A true density needs the solid volume alone, which is a displacement measurement the page does not ask for.
One quotient, two units
A kilogram per cubic metre and a gram per cubic centimetre differ by a factor of 1000, so the second line is the first divided by 1000. Water at about 1000 kg/m³ is 1 g/cm³, which is the calibration many people carry in their head.
The page does no unit conversion on input: mass is in kilograms and volume in cubic metres. A measurement in grams and millilitres has to be converted first, and the page says so instead of guessing which unit you meant.
How to use Density Calculator
Enter one `mass, volume` pair per line in the text box, in kilograms and cubic metres.
Press Run. Each line prints the density in kg/m³ and g/cm³, so two samples can be compared without a second calculation.
In the text box, convert grams to kilograms and litres to cubic metres first: 1 g/cm³ is 1000 kg/m³, and one litre is 0.001 m³.
What to Expect
Best for
- A density from a measured mass and volume
- Comparing two samples of the same nominal material
- A first check of a published material density
Not ideal for
- A porous or hollow object, where the quotient is a bulk density
- A material whose volume changes with temperature or pressure
What this tool keeps
- Every pair in the order you entered it
- Both printed units from the same quotient
What may need cleanup
- A mass in grams, which has to be divided by 1000
- A volume in litres or millilitres, which has to be converted to cubic metres
Common errors
- Entering grams and cubic metres in the same pair
- Treating the g/cm³ line as a second, independent measurement
Example use cases
- Checking a metal sample's identity
- Comparing two batches of a material
- A physics or chemistry density exercise
Sample input
Mass 1.5 kg in a volume of 0.002 m³.
Sample output
750 kg/m³ = 0.75 g/cm³.
Who this is for
- Students measuring a sample
- Anyone checking a materials figure
Frequently asked questions
Why is the volume refused at zero?
The density is the mass divided by the volume, and division by zero has no value. A zero volume is refused with the value named rather than printing infinity.
Which density does a hollow object have?
The quotient you get is its bulk density: the mass divided by the volume it encloses, including any air. The material's own density needs the solid volume, which this page cannot separate.
Can I enter grams and millilitres?
Convert them first. The page takes kilograms and cubic metres, so 50 g and 20 mL is 0.05 kg and 0.00002 m³. It performs no unit conversion.
Why print two units?
kg/m³ is the SI figure and g/cm³ is the one most material tables use. Printing both saves a conversion, and the second is the first divided by 1000, not a second measurement.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.