Report

Help us improve this tool

Gas Density Calculator

Calculate gas density from pressure, temperature, and molar mass using the ideal gas law with unit conversions.

O M T

How to Calculate Gas Density

Gas density tells you how much mass a gas occupies per unit volume. For ideal gases at moderate pressure and temperature, density follows from the ideal gas law rearranged as ρ = P × M / (R × T), where P is absolute pressure, M is molar mass, R = 8.314 J/(mol·K), and T is absolute temperature in kelvin.

Ideal Gas Density Formula

At standard conditions (101,325 Pa, 273.15 K), dry air with M = 28.97 g/mol has a density of about 1.29 kg/m³. Heating a gas lowers its density; compressing it raises density. The calculator supports common gases and unit conversions for pressure and temperature.

Common Gas Densities at STP

  • Air: ~1.29 kg/m³
  • Helium: ~0.18 kg/m³
  • Carbon dioxide: ~1.98 kg/m³
  • Hydrogen: ~0.09 kg/m³

Related tools: Ideal Gas Law Calculator.

Frequently Asked Questions

When does the ideal gas law break down?

At very high pressures or very low temperatures, real gases deviate from ideal behavior. Corrections such as the van der Waals equation may be needed for CO₂ near its critical point or dense industrial gases.

Why must temperature be in kelvin?

The ideal gas constant R is defined using absolute temperature. Celsius or Fahrenheit must be converted to kelvin before applying ρ = PM/(RT).

Is molar mass in g/mol or kg/mol?

Enter molar mass in g/mol (e.g., 28.97 for air). The calculator converts internally to kg/mol for the SI formula.

How does altitude affect air density?

At higher altitude, atmospheric pressure drops, so air density decreases. Use the local pressure and temperature at your altitude for accurate results.