Home
Select a gas to auto-fill its molar mass.
Molar mass in g/mol (e.g., 28.97 for air).
Absolute pressure (not gauge).
Select pressure unit.
Absolute temperature in Kelvin (K).
Select temperature unit.
Number of decimal places in results.
📋 Gas Density Reference Formula & common gas densities
Formula
ρ = P · M / (R · T)
ρ = density kg/m³
P = pressure Pa (absolute)
M = molar mass kg/mol
R = gas constant 8.314 J/(mol·K)
T = temperature Kelvin (K)
Common Gas Densities (STP)
Hydrogen (H₂)0.0899 kg/m³
Helium (He)0.1786 kg/m³
Nitrogen (N₂)1.251 kg/m³
Air (mixture)1.293 kg/m³
Oxygen (O₂)1.429 kg/m³
Carbon Dioxide (CO₂)1.964 kg/m³
Source: NIST, Engineering Toolbox
Key Relationships
Pressure ↑Density ↑ (direct)
Temperature ↑Density ↓ (inverse)
Molar Mass ↑Density ↑ (direct)
Specific Volumev = 1/ρ
Specific GravitySG = ρ_gas / ρ_air
Molar Volume (STP)22.414 L/mol
STP: 0°C (273.15 K), 101325 Pa
Note: This calculator uses the ideal gas law (ρ = PM/RT). The ideal gas approximation works well at moderate temperatures and pressures (far from condensation points). At high pressures or near the boiling point, real-gas equations of state (van der Waals, Peng-Robinson) should be used. Temperature must be in Kelvin for correct results.
📊 Common Gases at Standard Temperature and Pressure (STP) 0°C (273.15 K), 101,325 Pa
Gas Formula Molar Mass (g/mol) Density (kg/m³) Density (g/L)
📌 Key Formula: ρ = P·M / (R·T)  |  R = 8.314 J/(mol·K)  |  Temperature must be in Kelvin

What Is Gas Density?

Gas density (ρ) is the mass per unit volume of a gas, typically expressed in kg/m³ or g/L. Unlike liquids and solids, gas density varies significantly with pressure and temperature, making it essential to specify the conditions when reporting gas density.

The density of an ideal gas can be derived from the Ideal Gas Law (PV = nRT):

ρ = P · M / (R · T)

where ρ = density (kg/m³), P = absolute pressure (Pa), M = molar mass (kg/mol), R = universal gas constant (8.314 J/(mol·K)), T = absolute temperature (K)

Derivation from the Ideal Gas Law

Starting with PV = nRT and the definition of density (ρ = m/V):

  • n = m / M (moles = mass / molar mass)
  • PV = (m/M) · RT
  • P = (m/V) · (RT/M) = ρ · (RT/M)
  • Rearranging: ρ = P · M / (R · T)

Key Factors Affecting Gas Density

  • Pressure: Density is directly proportional to pressure. Doubling pressure doubles density.
  • Temperature: Density is inversely proportional to absolute temperature. Higher temperature means lower density.
  • Molar Mass: Heavier molecules create denser gases at the same P and T conditions.
  • Humidity: Humid air is less dense than dry air because water vapor (M = 18 g/mol) is lighter than the average air molecule (M ≈ 29 g/mol).

Why Use This Calculator?

  • 16 gas presets: Quickly select common gases with auto-filled molar masses.
  • Unit flexibility: Enter pressure in Pa, kPa, bar, atm, or psi; temperature in K, °C, or °F.
  • Additional outputs: Get specific volume, specific gravity relative to air, and molar volume.
  • Step-by-step solution: See exactly how the calculation is performed.
  • Free & private: No registration, no data storage — all calculations are done in your browser.

❓ Gas Density Calculator FAQ

What is the formula for gas density?

The formula is ρ = PM / (RT), where ρ is density, P is absolute pressure, M is molar mass, R is the gas constant, and T is absolute temperature in Kelvin.

Why must temperature be in Kelvin?

Gas density calculations use absolute temperature. Celsius and Fahrenheit are relative scales that start at arbitrary points, so they break the proportional relationship. Always convert to Kelvin (K = °C + 273.15).

What is the density of air at STP?

At standard temperature and pressure (0°C, 101,325 Pa), dry air has a density of approximately 1.293 kg/m³ (1.293 g/L).

Why is humid air less dense than dry air?

Humid air is less dense because water vapor molecules (H₂O, M = 18 g/mol) replace heavier nitrogen (N₂, M = 28 g/mol) and oxygen (O₂, M = 32 g/mol) molecules in the air. Since water molecules are lighter, the average molar mass of the mixture decreases, reducing the overall density.

When does the ideal gas approximation break down?

The ideal gas law becomes inaccurate at high pressures (above about 10 atm), low temperatures (near the boiling point of the gas), or when intermolecular forces become significant. In these cases, real-gas equations of state (van der Waals, Peng-Robinson) should be used.

What is specific gravity of a gas?

Specific gravity (SG) of a gas is the ratio of its density to the density of air at the same temperature and pressure. SG = ρ_gas / ρ_air. A gas with SG > 1 is heavier than air; SG < 1 is lighter.

How accurate is this calculator?

This calculator uses the exact ideal gas law formula ρ = PM/RT. Accuracy depends on the precision of the input values and the validity of the ideal gas approximation at your conditions. You can adjust the decimal precision in the output.

Is this calculator free?

Yes, this calculator is completely free to use. No registration or personal data storage is required.

What is the molar volume of an ideal gas at STP?

At STP (0°C, 101,325 Pa), one mole of any ideal gas occupies 22.414 liters.

Can I use this calculator for gas mixtures?

Yes, but you must use the effective molar mass of the mixture, weighted by mole fraction. For example, dry air has an effective molar mass of approximately 28.97 g/mol.