Formula and Method for Ideal Gas Density
The ideal gas law, PV = nRT, relates a gas's pressure (P), volume (V), amount of substance (n, in moles), and absolute temperature (T) through the universal gas constant R = 8.314462618 J/(mol·K). Density is mass per volume, ρ = m/V, and the number of moles equals mass divided by molar mass, n = m/M. Substituting n = m/M into PV = nRT and rearranging gives m/V = PM/(RT), so ρ = PM / (RT) — gas density depends only on pressure, molar mass, and absolute temperature, not on how much gas is present.
How the calculation works
Enter the gas pressure and its unit (converted internally to pascals), the temperature and its unit (converted internally to kelvin — absolute zero is 0 K, or −273.15°C), and the molar mass in grams per mole (pick a common gas from the dropdown or enter a custom value). The calculator converts pressure to Pa, temperature to K, and molar mass to kg/mol, then applies ρ = PM/(RT) to get density in kg/m³, with an lb/ft³ conversion alongside it. It also reports the molar volume, Vm = RT/P (the volume one mole of gas occupies under these conditions), and the specific gas constant, R_specific = R/M, which is useful for further thermodynamic work with that particular gas.
When the ideal gas approximation holds
The ideal gas law is accurate — typically within 1-2% — for most gases at pressures near atmospheric or below and temperatures well above their boiling point, where molecules are far apart and intermolecular forces are negligible. It becomes less reliable at very high pressure, very low temperature (near condensation), or for gases with strong intermolecular attraction such as water vapor or ammonia; in those cases a real-gas equation of state (for example, van der Waals) gives a better estimate.
Common mistakes
- Using Celsius or Fahrenheit directly: the ideal gas law requires absolute temperature in Kelvin; plugging in °C or °F without converting produces incorrect, sometimes negative, density values.
- Mixing up molar mass units: molar mass must be converted to kg/mol to stay consistent with R = 8.314 J/(mol·K); this calculator handles that conversion from the g/mol value you enter.
- Assuming gas density is constant: unlike liquids and solids, gas density changes significantly with conditions — doubling absolute pressure roughly doubles density, while doubling absolute temperature roughly halves it.
Real-world applications
- HVAC and combustion engineering use gas density to size ductwork, fans, and burners for the actual operating pressure and temperature, not just standard conditions.
- Aviation and meteorology use air density to compute lift, engine performance, and pressure-altitude corrections.
- Chemistry and process engineering use molar volume and density to convert between mass and volume flow rates for a gas stream.
- Buoyancy and balloon calculations compare a lifting gas's density (such as helium or hydrogen) against that of surrounding air.