Gas Density Calculator

Calculate ideal gas density from molar mass, temperature, and pressure using ρ = PM/(RT). Presets for 12 common gases with comparison chart.

Density
1.2925
1.2925 g/L
Molar Volume
22.4140
0.022414 m³/mol
Specific Volume
0.7737
1/ρ
Compressibility Factor
1.000
Ideal gas (Z=1)
Speed of Sound (est.)
331.3
γ = 1.4 (diatomic approx)
Conditions
273.15 K / 101.33 kPa
M = 28.970 g/mol

Gas Density Comparison (same T & P)

Sulfur Dioxide (SO₂)
2.8583 kg/m³
Propane (C₃H₈)
1.9675 kg/m³
Carbon Dioxide (CO₂)
1.9635 kg/m³
Argon (Ar)
1.7823 kg/m³
Oxygen (O₂)
1.4276 kg/m³
Air
1.2925 kg/m³
Nitrogen (N₂)
1.2498 kg/m³
Water Vapor (H₂O)
0.8037 kg/m³
Ammonia (NH₃)
0.7598 kg/m³
Methane (CH₄)
0.7156 kg/m³
Helium (He)
0.1786 kg/m³
Hydrogen (H₂)
0.0899 kg/m³
GasMolar Mass (g/mol)Density (kg/m³)Density (g/L)Relative to Air
Sulfur Dioxide (SO₂)64.0662.85832.85832.211×
Propane (C₃H₈)44.1001.96751.96751.522×
Carbon Dioxide (CO₂)44.0101.96351.96351.519×
Argon (Ar)39.9481.78231.78231.379×
Oxygen (O₂)31.9981.42761.42761.105×
Air28.9701.29251.29251.000×
Nitrogen (N₂)28.0141.24981.24980.967×
Water Vapor (H₂O)18.0150.80370.80370.622×
Ammonia (NH₃)17.0300.75980.75980.588×
Methane (CH₄)16.0400.71560.71560.554×
Helium (He)4.0030.17860.17860.138×
Hydrogen (H₂)2.0160.08990.08990.070×
Planning notes, formulas, and examples

About the Gas Density Calculator

The ideal gas law gives density directly: ρ = PM/(RT), where P is absolute pressure, M is molar mass, R is the universal gas constant, and T is absolute temperature. This calculator computes gas density for any gas at any temperature and pressure.

Choose from 12 preset gases, including air, nitrogen, oxygen, CO₂, helium, hydrogen, argon, methane, propane, ammonia, SO₂, and water vapor, or enter a custom molar mass. The calculator supports six pressure units (Pa, kPa, atm, bar, psi, mmHg) and three temperature units (K, °C, °F).

Results include density in kg/m³ and g/L, molar volume, specific volume, and an estimated speed of sound. The side-by-side comparison chart shows all 12 gases at your chosen conditions, which makes it easier to compare buoyancy, ventilation needs, or reaction volumes.

When This Page Helps

Gas density comes up in HVAC, combustion, ballooning, gas storage, reactor design, and air-quality work. A calculator is faster than doing the same ideal-gas rearrangement by hand every time you change pressure, temperature, or gas type.

The multi-gas comparison table is especially useful when you want to compare how a gas behaves relative to air at the same conditions.

How to Use the Inputs

  1. Select a preset gas or choose "Custom" and enter the molar mass in g/mol.
  2. Enter the temperature and select the unit (K, °C, or °F).
  3. Enter the absolute pressure and select the unit (Pa, kPa, atm, bar, psi, mmHg).
  4. View density in kg/m³ and g/L, molar volume, specific volume, and speed of sound.
  5. Check the comparison chart to see how your gas compares to others at the same conditions.
Formula used
Ideal Gas Density: ρ = PM / (RT), where P = absolute pressure (Pa), M = molar mass (kg/mol), R = 8.31446 J/(mol·K), T = absolute temperature (K). Molar Volume: V_m = RT/P. Speed of Sound (approx): c = √(γRT/M) with γ ≈ 1.4 for diatomic gases.

Example Calculation

Result: 1.2922 kg/m³

ρ = (101325 × 0.02897) / (8.31446 × 273.15) = 1.2922 kg/m³. This is the standard air density at STP (0 °C, 1 atm).

Tips & Best Practices

  • At STP, one mole of ideal gas occupies 22.414 L, a useful mental benchmark.
  • Gas density is inversely proportional to temperature: heating a gas from 20 °C to 40 °C at constant pressure reduces density by about 6%.
  • For gas mixtures, use the effective molar mass: M_mix = Σ(y_i × M_i), where y_i is mole fraction.
  • CO₂ (M = 44, 1.52x air) sinks; methane (M = 16, 0.55x air) rises, critical for leak detection and ventilation.
  • At very high pressures (> 50 atm), ideal gas errors exceed 10%. Use compressibility factor tables.

The Ideal Gas Law and Density

The ideal gas equation PV = nRT can be rearranged by substituting n = m/M (mass over molar mass) and rearranging to ρ = PM/(RT). This elegant form shows that gas density is directly proportional to pressure and molar mass, and inversely proportional to temperature.

Key insight: at the same T and P, any gas's density is proportional to its molar mass. This is why the "relative density to air" column in the comparison table equals M_gas / M_air (= M_gas / 28.97).

Practical Applications

| Application | Gas Property Used | |---|---| | Hot air balloons | Lower ρ of heated air vs. ambient | | Helium balloons | Low M and therefore low ρ | | CO₂ fire suppression | CO₂ sinks (heavier than air) | | Combustion air flow | Air density at elevation and temperature | | Natural gas metering | CH₄ density at line T and P | | Diving gas mixtures | Respiratory resistance depends on ρ |

Sources & Methodology

Last updated:

Frequently Asked Questions

  • It assumes ideal behavior (Z = 1). For most gases at moderate pressures and temperatures, the error is under 2%. At very high pressures or near the boiling point, use the van der Waals or Peng-Robinson equation instead.