InfyCalculator
🧪

Gas Density Calculator

Find the density of an ideal gas from its pressure, molar mass and temperature using ρ = PM/RT.

Pressure
Molar mass
Temperature
Loading calculator…

How it works

ρ = P·M ÷ (R·T) · with R = 0.082057 L·atm·mol⁻¹·K⁻¹ · (g/L equals kg/m³)

Rearranging the ideal gas law PV = nRT with n = mass ÷ molar mass gives density ρ = PM/RT. Density rises with pressure and molar mass and falls as temperature increases. Because 1 g/L equals 1 kg/m³, the numerical value doubles as the SI density. The molar volume RT/P is the volume one mole occupies — 22.4 L at standard temperature and pressure.

Worked example

Carbon dioxide (M = 44.01 g/mol) at 1 atm and 273.15 K has ρ = (1 × 44.01) ÷ (0.082057 × 273.15) = 1.964 g/L, matching the tabulated density of CO₂ at STP.

Sources: Ideal gas law — Wikipedia

Frequently asked questions

Which temperature units do I use?

Kelvin. Convert from Celsius by adding 273.15. Using Celsius directly breaks the formula because the gas law needs an absolute temperature scale.

Why is g/L the same as kg/m³?

Because 1 gram per litre equals 1000 grams per 1000 litres, and 1000 litres is 1 cubic metre — so the ratio is unchanged and the number stays the same.

Does this work at high pressure?

It assumes ideal-gas behaviour, which is accurate near ambient conditions. At very high pressure or near condensation real gases deviate and need a compressibility correction.

Related calculators

Educational estimate. Check the formula, units and significant figures for your exact case.