Density calculator

Calculate density calculator using the values and assumptions you provide.

Calculate density calculator using the values and assumptions you provide.

Both dots and commas are accepted as decimal separators.

Your inputs stay in your browser. Displayed results are rounded to a maximum of 12 significant digits.

Method and assumptions

Method version 1.0.0 · Updated

Calculate

Formula: ρ = m / V

Calculate density calculator using the values and assumptions you provide.

mass
Mass (kg)
volume
Volume (m³)

Results depend on the assumptions entered; verify professional or safety-critical decisions independently.

Calculate with code

These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.

JavaScript
const massKg = 2, volumeM3 = 0.001;
console.log(massKg / volumeM3); // 2000 kg/m³
TypeScript
const massKg = 2, volumeM3 = 0.001;
const density: number = massKg / volumeM3;
console.log(density); // 2000 kg/m³
Python
print(2 / 0.001)  # 2000 kg/m³
Java
System.out.println(2.0 / 0.001); // 2000 kg/m³
C#
Console.WriteLine(2m / 0.001m); // 2000 kg/m³