Chemical Engineering

Ideal Gas Law Calculator (PV = nRT)

Solve PV = nRT for P, V, n or T, apply the combined gas law, or find a gas’s density — always in absolute pressure and temperature.

Inputs

Calculate from
A horizontal cylinder closed by a piston on the right. Dots inside represent gas. Labels show P, V, n and T, and a gauge on top.P (absolute)Vn, T (K)piston
A gas of amount n in a volume V at absolute pressure P and absolute temperature T: PV = nRT. Gauge pressure must be added to the atmospheric pressure first. Diagram not to scale.

Gas laws need absolute pressure. A gauge reads pressure above the local atmosphere.

Gives the mass and density of the gas. For example air ≈ 28.96 g/mol, nitrogen 28.01, CO₂ 44.01.

1 for an ideal gas. For real gases at high pressure or low temperature, use Z from gas data (0.1 to 2). In the combined law, Z is taken as the same in both states.

Result

Volume
22.414
Molar volume
22.414L/mol
Working
P V = Z n R T with R = 8.314462618 J/(mol·K), Z = 1 P = 101.325 kPa (absolute), V = 22.414 L, n = 1 mol, T = 273.15 K

The result is 22.414 L.

Educational estimate — check the assumptions below.

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.