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) at 25°C:

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 many gases, T_Boyle ≈ 27a/(Rb) in Kelvin.


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.