Compressibility Factor Calculator

Created by Luis Hoyos
Last updated: Sep 07, 2022

Welcome to the compressibility factor calculator, a tool created to calculate the compressibility factor of gases, also known as compression factor, gas deviation factor, or simply Z-factor.

Calculating the Z-factor is the most straightforward way to quantify the deviation of a gas from the ideal gas law behavior. In the following sections of this article, we talk about this deviation, the equation for the compressibility factor, and the air compressibility factor values.

Compressibility factor definition and equation

The widely-known ideal gas law is an idealization of the complex behavior of gases. Depending on the temperature, pressure, and type of substance, gases will behave more or less according to that idealization. The compressibility factor is the tool that quantifies that deviation from the ideal behavior.

Depending on the field of study, the form of the compressibility factor equation used will vary. For example, in statistical mechanics (and this calculator), the compressibility factor formula is:

Z=pVnRˉTZ = \frac{p\cdot V}{n \cdot\bar R \cdot T}

, where:

  • pp — Pressure, in pascals (Pa);
  • VV — Volume, in cubic meters ();
  • nn — Number of moles of gas, in mol;
  • Rˉ\bar R — Universal gas constant, whose value equals 8.3144626 J/(mol K);
  • TT - Absolute temperature of the gas, in kelvin (K); and
  • ZZ — Compressibility factor (calculated as dimensionless quantity).

In engineering thermodynamics, the commonly used formula for the compressibility factor is:

Z=pρRspecificTZ = \frac{p}{\rho \cdot R_{\text{specific}} \cdot T}


  • ρ\rho — Gas density, in kilograms per cubic meter (); and
  • RspecificR_{\text{specific}} — Specific gas constant of the gas, in J/(kg K);

🔎 In our gas density calculator, you can find values for the density and specific gas constant of the most common gases.

If Z = 1, by definition, the gas behaves perfectly as an ideal gas. The farther Z is from unity, the less it will act as an ideal gas. Values far from Z = 1 correspond to pressures and temperatures near the critical point. You can figure this out in the compressibility chart in the following section.

Compressibility factor of air

With this compressibility factor calculator, we can calculate the Z-factor if we conduct measurements of the pressure, volume, mass (for the number of moles), and temperature.

If we only know the temperature and pressure, we can still calculate it using a compressibility chart.

Compressibility chart.
Compressibility chart. Attribution: Daniele Pugliesi, CC BY-SA 3.0, via Wikimedia Commons

A compressibility chart contains values for Z as a function of the reduced pressure (pᵣ) and reduced temperature (Tᵣ), defined as:

  • pᵣ = p/pc
  • Tᵣ = T/Tc

where pc is the critical pressure and Tc is the critical temperature. pc and Tc are the pressure and temperature values of the critical point of the substance.

Thanks to the theorem of corresponding states, we can use the previous chart for any gas, but if we're only studying the compressibility of air, we can use a chart that doesn't require knowing pc and Tc.

Z for air as a function of pressure and temperature, for the 75-200 K range.
Z for air as a function of pressure and temperature, for the 75-200 K range. Attribution: Power.corrupts, Public domain, via Wikimedia Commons.
Z for air as a function of pressure and temperature, for the 250-1000 K range.
Z for air as a function of pressure and temperature, for the 250-1000 K range. Attribution: Power.corrupts, Public domain, via Wikimedia Commons.

Using those charts, we can obtain the compressibility of gases by only knowing the temperature and pressure.

Luis Hoyos
Pressure (P)
Volume (V)
cu in
Number of moles (n)
Universal gas constant (R̄)
Temperature (T)
Compressibility factor (Z)
People also viewed…

Boiling point elevation

Determine the change in the boiling point of a solution using the boiling point elevation calculator.

Mean free path

Our mean free path calculator answers the question: "how long before two molecules collide" in the blink of an eye.

Schwarzschild radius

Discover the fundamental of black hole physics with our Schwarzschild radius calculator.
main background