Gas Compressibility Factor (Z) Calculator

Calculate the compressibility factor Z = PV/nRT for real gases using the van der Waals equation.
Compare real vs ideal gas behavior.

Compressibility Factor Z

The compressibility factor Z measures how much a real gas deviates from ideal gas behavior.

Definition:

Z = PV / (nRT) = PVm / RT

where Vm = molar volume (L/mol).

For an ideal gas: Z = 1 (always).

For real gases:

  • Z < 1: Intermolecular attractions dominate → gas is more compressed than ideal
  • Z > 1: Repulsive forces dominate (at high pressure) → gas occupies more volume than ideal

Van der Waals equation:

(P + a/Vm²)(Vm - b) = RT

Where:

  • a = intermolecular attraction parameter (L²·atm/mol²)
  • b = molecular volume (excluded volume) parameter (L/mol)

Van der Waals constants (a, b): these are properties of the gas itself, not of the conditions, so the same pair applies at every temperature.

Gas a (L²atm/mol²) b (L/mol)
He 0.034 0.0237
H₂ 0.244 0.0266
N₂ 1.390 0.0391
O₂ 1.360 0.0318
CO₂ 3.640 0.0427
H₂O 5.460 0.0305
NH₃ 4.170 0.0371
CH₄ 2.253 0.0428

Z at 1 atm, 25°C: nearly 1 for all gases (ideal behavior is a good approximation). At very high pressures (>100 atm) or low temperatures (near boiling point), Z deviates significantly.

The Boyle temperature: The temperature at which a real gas behaves most like an ideal gas (Z ≈ 1 over a range of P). For a van der Waals gas, T_Boyle = a/(Rb) in Kelvin. Nitrogen works out to about 433 K, which is why nitrogen at room temperature already deviates noticeably from ideal, while at 160 °C it barely does. (Do not confuse this with the critical temperature, T_c = 8a/(27Rb). The two differ by a factor of 27/8, and mixing them up is the usual source of a Boyle temperature that comes out in the thousands.)


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.