One law, many uses
With R = 8.314 J/(mol·K), absolute pressure in pascals and absolute temperature in kelvin, the density formula answers the question behind half of gas instrumentation: how heavy is this gas right now? — the input to rotameter corrections, DP flow sizing, and actual-vs-standard conversion.
Worked example
Air at 101.325 kPa (abs) and 25 °C:
- ρ = 101,325 × 0.02896 ÷ (8.314 × 298.15) = 1.184 kg/m³
- Molar volume = 8.314 × 298.15 ÷ 101,325 = 0.02446 m³ = 24.46 L/mol
- Compress to 5 bar abs and density scales to ~5.84 kg/m³ — density is proportional to absolute pressure
Field notes
- Absolute everything: gauge pressure and Celsius must become absolute pressure and kelvin before entering the law. Our gauge ↔ absolute converter handles the first.
- This density feeds directly into the mass ↔ volumetric flow converter and explains the actual ↔ standard flow correction — it's the same law in three costumes.
- Ideal has limits: above roughly 10–20 bar, or near condensation, include a compressibility factor Z. Natural gas custody metering never runs on the ideal law alone.
Frequently asked questions
What is the ideal gas law?
PV = nRT: pressure times volume equals moles times the gas constant (8.314 J/mol·K) times absolute temperature. It links the state variables of any gas that behaves ideally.
How do I calculate gas density from the ideal gas law?
ρ = P × M ÷ (R × T), with P in Pa (absolute), M in kg/mol, T in kelvin. Air (M = 0.02896 kg/mol) at 101.325 kPa and 25 °C gives 1.184 kg/m³.
When does the ideal gas law stop being accurate?
At high pressures and near condensation the ideal assumption drifts — typically noticeable above ~10-20 bar or close to the dew point. A compressibility factor (Z) corrects it: PV = ZnRT.
Provided for reference and education. See our disclaimer.