About this calculator
The ideal gas law, PV = nRT, links the pressure, volume, amount and temperature of a gas. It is accurate for most gases near room temperature and moderate pressure. This calculator solves it for any one quantity, applies the combined gas law (P₁V₁/T₁ = P₂V₂/T₂) to a fixed amount of gas, and finds a gas’s density.
The law only works with absolute pressure and absolute temperature (kelvin). Enter gauge pressures with the local atmospheric pressure, and temperatures in any unit: they are converted to kelvin. This is a calculation tool only, not advice for handling gases or pressure equipment.
Formula
P V = Z n R T ρ = P M ÷ (Z R T) P₁ V₁ ÷ T₁ = P₂ V₂ ÷ T₂ Pabs = Pgauge + Patm
P = absolute pressure (Pa), V = volume (m³), n = amount (mol), T = absolute temperature (K), M = molar mass (kg/mol), Z = compressibility factor (1 for an ideal gas).
The universal gas constant R is exact under the SI definitions (since 2019): R = NA × k, and both the Avogadro constant and the Boltzmann constant have fixed exact values. 8.314462618 J/(mol·K) is R rounded for display; the calculation uses the exact product, 8.31446261815324 J/(mol·K).
Worked example
- 1 mol of an ideal gas at 0 °C and 101.325 kPa occupies V = 1 × 8.314462618 × 273.15 ÷ 101 325 = 22.414 L; at 25 °C and 100 kPa it occupies 24.790 L.
- Air (M 28.96 g/mol) at 15 °C and 101.325 kPa: ρ = 101 325 × 0.02896 ÷ (8.314462618 × 288.15) = 1.2248 kg/m³.
- Combined law: 10 L at 101.325 kPa and 20 °C, compressed to 5 L at 40 °C: P₂ = 101.325 × (10 ÷ 5) × (313.15 ÷ 293.15) = 216.48 kPa absolute.
Assumptions and limitations
- Ideal-gas behaviour unless you enter a compressibility factor Z. Accuracy falls at high pressure, low temperature and near condensation.
- All pressures in the calculation are absolute and all temperatures are in kelvin. Gauge pressures are converted with the atmospheric pressure you enter.
- No condensation, phase change or chemical reaction. The combined gas law assumes a fixed amount of gas.
- A calculation tool only, not advice for handling gases or pressure equipment.
References
- CODATA recommended values of the fundamental physical constants (R, molar volume of an ideal gas).
- IUPAC Green Book: ideal gas equation and standard conditions.
