Home · Science · Heat & Thermodynamics · Compressibility Factor Calculator

Compressibility Factor Calculator

Compressibility factor Z from the truncated virial equation Z = 1 + B·p/(R·T), with the second virial coefficient B entered for your gas and temperature.

Your figures

Example result — edit the figures to make it yours

0.98

Compressibility factor Z

Computed from the inputs on this page with the formula below — change any figure and every result updates.

Deviation from ideal (Z − 1)-2.41 %
Real molar volume ZRT/p0.00 m³/mol

What this calculator does

Compressibility factor Z from the truncated virial equation Z = 1 + B·p/(R·T), with the second virial coefficient B entered for your gas and temperature. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.

The formula and method

Z = 1 + B · p / (R · T), with B in m³/mol

This tool uses the truncated virial form Z = 1 + B·p/(R·T), where B is the second virial coefficient of the gas at the given temperature, entered in cm³/mol and converted to m³/mol.

Z = 1 is the ideal gas; Z < 1 means attractions dominate and the gas is denser than ideal, Z > 1 means repulsion dominates. B depends on the gas and temperature and must be looked up in virial-coefficient tables.

Worked example

With the example inputs this page opens with (second virial coefficient b (cm³/mol) -12, pressure p (pa) 5000000, temperature t (k) 300), the result is 0.98 — compressibility factor z. Computed from the inputs on this page with the formula below — change any figure and every result updates.

Quick reference

Quick reference — varying second virial coefficient b (cm³/mol)
Second virial coefficient B (cm³/mol)Compressibility factor Z
-60.99
-9.60.98
-120.98
-150.97
-180.96
-240.95

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

What does Z measure?

Z = pV/(nRT) compares the real gas with an ideal gas at the same p and T. Z = 1 is ideal behaviour.

Where do I get the virial coefficient B?

From published virial-coefficient tables for the gas at the temperature of interest; B is negative below the Boyle temperature and positive above it.

How does the Compressibility Factor Calculator work?

Compressibility factor Z from the truncated virial equation Z = 1 + B·p/(R·T), with the second virial coefficient B entered for your gas and temperature. Virial coefficient B · Pressure · Temperature → Z. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Compressibility Factor Calculator need?

Virial coefficient B · Pressure · Temperature → Z. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.