🔬
🔬 Science & engineering

Gas Density Calculator

Results update as you type.

Your numbers

Understanding the gas density calculator — concept and principle

Gas density is the mass of gas in a unit volume, usually in kg/m³. It decides whether a gas rises or sinks in air, how much buoyancy a balloon gets, how ventilation and leak detection should be planned, and how mass flow relates to volume flow in pipes and fans. This calculator uses the ideal gas law to find density from molar mass, pressure and temperature, and compares the gas with dry air.

Density of air from the ideal gas lawAt 101.325 kPa and 20 °C, 101.325 × 28.97 ÷ (8.3145 × 293.15) = 1.204 kg per cubic metre; helium is 0.14 times and CO2 1.52 times as dense as air.How heavy is one cubic metre of air?1 m³ = 1.204 kgρ = P × M ÷ (R × T)P × M101.325 × 28.97= 2935.4R × T8.3145 × 293.15= 2437.4ρ = 1.204 kg/m³Same T and P: density follows molar massHelium4 g/mol× 0.14↑ risesAir28.97 g/mol× 1CO₂44 g/mol× 1.52↓ sinks
A cubic metre of dry air at 20 °C weighs about 1.2 kg; lighter molecules make a lighter gas.

How it is calculated

The principle

The ideal gas law PV = nRT says that at a given pressure and temperature, one mole of any ideal gas takes up the same volume. Since n = m/M, rewriting gives m/V = PM/(RT). Heavier molecules therefore make a denser gas, higher pressure packs more molecules into the same space, and higher temperature spreads them out. The law works well for most gases near room conditions; it becomes less accurate at high pressure or close to condensation.

Worked example

  1. Inputs: M = 28.97 g/mol (dry air), P = 101.325 kPa, T = 20 °C.
  2. T in kelvin = 20 + 273.15 = 293.15 K.
  3. Numerator P × M = 101.325 × 28.97 = 2935.4.
  4. Denominator R × T = 8.314462618 × 293.15 = 2437.4.
  5. ρ = 2935.4 ÷ 2437.4 = 1.204 kg/m³.
  6. Relative to air = 28.97 ÷ 28.97 = 1.
How Density (kg/m³) changes with Molar mass (g/mol)How Density changes with Molar mass00.511.522.57.2414.521.72936.243.557.9Example: 1.204317575Molar mass (g/mol)
Each point is the calculator re-run with only “Molar mass (g/mol)” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Molar mass (g/mol)Density (kg/m³)
7.240.3010793936
14.50.6021587873
21.70.9032381809
291.204317575
36.21.505396968
43.51.806476362
57.92.408635149

How to read the result

Dry air at sea-level pressure is about 1.204 kg/m³ at 20 °C and about 1.225 kg/m³ at 15 °C. A ratio above 1 means the gas is heavier than air and tends to collect in low spots (carbon dioxide, M ≈ 44 g/mol, ratio about 1.5). A ratio below 1 means it rises (helium, M ≈ 4 g/mol; methane, M ≈ 16 g/mol). Density falls by roughly 1% for every 3 °C of warming near room temperature, and also falls with altitude as pressure drops.

Common mistakes

Keep in mind: Results assume ideal gas behaviour. For high pressures, very low temperatures or gas mixtures near their dew point, use a compressibility factor or real-gas data, and follow applicable safety codes for hazardous gases.

Frequently asked questions

Why is humid air lighter than dry air?

Water vapour has a molar mass of about 18 g/mol, lower than the 28.97 g/mol of dry air, so replacing some air molecules with water molecules lowers the average molar mass.

What is the density of a gas mixture?

Use the mole-fraction-weighted average molar mass of the mixture as M, then apply the same formula.

Sources: IUPAC Compendium of Chemical Terminology (Gold Book), "ideal gas" · CODATA recommended value of the molar gas constant, NIST · ISO 2533, Standard Atmosphere

Checked 8 Nov 2026. Standard textbook formulas in SI units, computed in your browser. For learning and estimates — real designs must follow your local codes and be checked by a qualified engineer.

🔬 All science & engineering tools →🌍 Calculators by country →