Compute gas density (ρ) from pressure, temperature, and molar mass. Visualize density vs. temperature, convert units, and explore real-world gas behavior.
The gas density (ρ) is a measure of mass per unit volume. For ideal gases, density is derived directly from the Ideal Gas Law: PV = nRT. By substituting n = m/M (mass over molar mass), we obtain the engineering form: ρ = PM / (RT), where P is absolute pressure, M is molar mass, R is the universal gas constant (8.314462618 J/(mol·K)), and T is absolute temperature in Kelvin. This relationship reveals that density is proportional to pressure and molar mass, and inversely proportional to temperature.
ρ = (P · M) / (R · T)
ρ [kg/m³], P [Pa], M [kg/mol], R = 8.31446 J/(mol·K), T [K]
| Gas | Formula | Molar Mass (g/mol) | Density at STP (0°C, 1 atm) (kg/m³) |
|---|---|---|---|
| Air | — | 28.96 | 1.293 |
| Oxygen | O₂ | 32.00 | 1.429 |
| Nitrogen | N₂ | 28.01 | 1.251 |
| Carbon Dioxide | CO₂ | 44.01 | 1.977 |
| Methane | CH₄ | 16.04 | 0.717 |
| Hydrogen | H₂ | 2.016 | 0.090 |
At sea level (101.325 kPa, 15°C), air density is approximately 1.225 kg/m³. For an aircraft taking off from a high-altitude airport (e.g., Denver at 1600 m, ~83.5 kPa, 20°C), the density drops to about 0.99 kg/m³. This 20% reduction directly affects lift force (L = ½ ρ v² S C_L) and engine performance. Using our calculator, pilots and engineers can quickly assess density altitude effects and adjust takeoff parameters. The interactive graph demonstrates how warming temperature at fixed pressure reduces density — critical for hot-and-high operations.
The ideal gas law assumes no intermolecular forces and negligible molecular volume. For most engineering conditions (near atmospheric pressure and above 0°C), deviations are <2%. However, at very high pressures (>50 bar) or cryogenic temperatures, compressibility factor Z must be introduced: ρ = PM/(ZRT). This calculator focuses on ideal behavior, suitable for the vast majority of educational and practical applications. For critical scenarios, refer to NIST REFPROP or Peng-Robinson EOS.