Home / Chemical Engineering / Process Design / Compressibility Factor (Real Gas)

Formula & Calculator

Compressibility Factor (Real Gas)

The compressibility factor Z corrects the ideal gas law for real gas behaviour. It equals pressure times volume divided by n times R times temperature. For an ideal gas, Z = 1. For real gases, Z can be less than or greater than 1 depending on pressure and temperature. For example, at high pressure, Z for many gases is less than 1 because attractive forces dominate; at very high pressure, it can be greater than 1 because repulsive forces dominate. It is used in equations of state for real gases.

Chemical Engineering Thermodynamics Process Design
VORZEP · THERMODYNAMICS & REAL GAS TOOLS

Compressibility Factor Calculator

Solve the real-gas equation of state Z = PV / (nRT) for any of its five variables — the compressibility factor, pressure, volume, moles, or temperature — with step-by-step algebra, a live piston-cylinder schematic, real-gas comparisons via the van der Waals equation, and full reference tables.

Z = P·V / (n·R·T) · Z = 1 for ideal gas · Z < 1 attractive · Z > 1 repulsive
Solve for
Pressure (P) Absolute pressure of the gas. Use absolute pressure, not gauge pressure — add 1 atm (101.325 kPa) to gauge readings. Low pressures (near 1 atm) give Z ≈ 1; high pressures show significant deviation as molecular volume and intermolecular forces come into play.
Pressure must be a positive value.
Volume (V) Volume of the container holding the gas. The molar volume of an ideal gas at STP is 22.414 L/mol (0°C, 1 atm). At high pressure, the actual volume per mole is larger than ideal because molecules have finite size — this is one reason Z rises above 1.
Volume must be a positive value.
Amount of Substance (n) Number of moles of gas. One mole contains 6.022×10²³ molecules (Avogadro's number). Use kmol for industrial-scale calculations (1 kmol = 1000 mol) or lbmol for US engineering (1 lbmol = 453.59 mol). The value appears in the denominator of Z, so more moles at fixed P·V·T means lower Z.
Amount must be a positive value.
Temperature (T) Absolute temperature of the gas. All thermodynamic calculations require absolute temperature — Kelvin or Rankine, never Celsius or Fahrenheit directly. The calculator converts automatically. At high temperature, molecules move faster and intermolecular attraction matters less, so Z tends toward 1.
Temperature must be above absolute zero.
Compressibility Factor (Z) Dimensionless ratio that measures how much a real gas deviates from ideal behaviour. Z = 1 means the gas behaves ideally. Z < 1 means attractive intermolecular forces dominate (gas is more compressible than ideal). Z > 1 means repulsive forces and molecular volume dominate (gas is less compressible). Values from 0.2 to 2+ are seen in practice.
—
Z must be between 0.05 and 5.
COMPRESSIBILITY FACTOR (Z)
0.9437
Attractive-dominated · 5.6% below ideal
REAL GAS — ATTRACTIVE-DOMINATED (Z < 1)
Z = 0.1 Z = 1.0 (ideal) Z = 3.0
Z = 0.9437 · 5.6% below ideal
Z = PV/(nRT)
Step-by-step solution
Z vs. pressure (at fixed V, n, T)
Z = V/(nRT) · P (linear) Your current P
Z vs. temperature (at fixed P, V, n)
Z = PV/(nR) · 1/T (hyperbolic) Your current T
Z vs. volume (at fixed P, n, T)
Z = P/(nRT) · V (linear) Your current V
Z vs. moles (at fixed P, V, T)
Z = PV/(RT) · 1/n (hyperbolic) Your current n
Sensitivity
Real-gas comparison at your conditions

Predicted Z from the van der Waals equation for common gases at your pressure and temperature. Gases with low critical temperature (He, H₂) stay near ideal; gases near or above their critical pressure (CO₂, NH₃) deviate strongly.

Companion thermodynamic metrics
Z = PV/(nRT) — live piston-cylinder schematic
REAL GAS EQUATION OF STATE · Z = P·V / (n·R·T) Z = (P·V) / (n·R·T) = 0.9437 PISTON-CYLINDER P V n = 10.00 mol T = 373.15 K COMPRESSIBILITY FACTOR SCALE Z=1 0.1 3.0 Z attractive near-ideal repulsive Z = 0.9437 vs ideal Z = 1.000 Real volume is 5.6% smaller than ideal Attractive forces dominate P = 100 atm · V = 100 L · n = 10.00 mol · T = 373.15 K · Z = 0.9437 Ideal gas would occupy 0.0224 m³ at these conditions
Pressure — force per unit area on the piston Volume — gas region between piston and cylinder base Temperature — thermal energy of molecules
What the compressibility factor really measures
Zcompressibility
=
P·Vactual
÷
n·R·Tideal prediction

Z is a correction factor for non-ideality

The ideal gas law PV = nRT assumes molecules have no volume and exert no forces on each other. Real molecules do both. The compressibility factor Z measures how wrong that assumption is at the current conditions — it is the ratio of the actual molar volume to the ideal molar volume. A Z of 0.9 means the gas occupies 10% less space than ideal (intermolecular attraction pulls molecules together); a Z of 1.1 means it occupies 10% more (molecular volume pushes them apart). Real gas equations like van der Waals, Redlich-Kwong, and Peng-Robinson all aim to predict Z accurately.

Low pressure, high temperature → Z ≈ 1

At low pressure (below a few atmospheres) molecules are far apart, so both their finite volume and their mutual attraction become negligible. At high temperature, molecules move fast enough that attractive forces cannot hold them together long enough to matter. The combined regime — low P and high T relative to the gas's critical point — is where Z sits closest to 1 and the ideal gas law works best. This is why the ideal gas law is a good approximation for air at ambient conditions but fails badly for steam in a boiler or CO₂ in a high-pressure pipeline.

Z < 1 means attraction wins; Z > 1 means repulsion wins

In the low-to-moderate pressure range, attractive forces dominate and Z drops below 1 — the gas is more compressible than ideal because molecules are pulling each other inward. At high pressure, molecules are packed so tightly that their finite size becomes the dominant effect and Z rises above 1. The result is that Z passes through a minimum at intermediate pressures (typically 50–150 atm depending on temperature). For example, nitrogen at 0°C has Z ≈ 0.997 at 10 atm, ≈ 0.98 at 100 atm, rises through 1.0 around 300 atm, and reaches 1.25 at 1000 atm.

Real-gas engineering needs accurate Z values

In chemical process design, pipeline transport, and gas storage, using Z = 1 when it is actually 0.7 or 1.3 leads to errors in equipment sizing, compressor duty, and safety margins that can be catastrophic. The petroleum industry uses the Standing-Katz generalized compressibility chart (Z as a function of reduced pressure and temperature) as the industry standard, with the Pitzer acentric factor correction for non-hydrocarbon gases. Modern process simulators use cubic equations of state (Peng-Robinson, Soave-Redlich-Kwong) with binary interaction parameters to predict Z to within 1–3% across a wide range of conditions.

How to Use This Calculator

The compressibility factor Z is defined by the real-gas equation of state Z = PV/(nRT). Enter four of the five variables and the calculator solves for the fifth.

1. Choose what to solve for

Select Z, P, V, n, or T from the toggle. The calculator rearranges Z = PV/(nRT) algebraically for whichever variable you choose — no iterative solving needed.

2. Enter values with the right units

Each field has its own unit selector. Pressure can be Pa, kPa, MPa, bar, atm, psi, or mmHg. Volume in m³, L, mL, cm³, or ft³. Amount in mol, kmol, or lbmol. Temperature in K, °C, °F, or °R. The calculator converts everything to SI internally.

3. Use absolute pressure and temperature

Z requires absolute pressure (not gauge) and absolute temperature (not Celsius or Fahrenheit directly — the calculator handles that conversion). If your pressure gauge reads 10 bar, the absolute pressure is about 11 bar — add atmospheric pressure.

4. Read the result and Z-scale

The result card shows Z along with a colour-coded verdict: near-ideal (0.99–1.01), attractive-dominated (Z < 1), or repulsive-dominated (Z > 1). The horizontal scale shows exactly where your Z sits between 0.1 and 3.0.

5. Check the schematic and real-gas comparison

The piston-cylinder schematic shows how V and P relate to the physical gas. In advanced mode, the real-gas comparison table uses the van der Waals equation to estimate Z for He, H₂, N₂, O₂, CH₄, CO₂, NH₃, and H₂O at your exact conditions.

6. Switch to Advanced for depth

Advanced mode adds Z vs V and Z vs n charts, a sensitivity panel showing partial derivatives, the real-gas comparison table, and companion metrics including molar volume, deviation from ideal, and reduced conditions.

What This Tool Offers

Built around the real-gas equation of state Z = PV/(nRT), the fundamental correction to the ideal gas law.

Five-way solving

Solve for Z, P, V, n, or T. All five rearrangements are handled algebraically, so no iteration is needed and results are exact.

Full unit flexibility

Seven pressure units, five volume units, three amount units, and four temperature scales — all converted internally to SI for the calculation.

Live piston-cylinder schematic

A physical schematic showing the gas in a cylinder with a movable piston, molecule density scaled by n, and a marker on the Z-scale showing where your value sits.

Real-gas comparison

See what Z would be for eight common gases at your pressure and temperature, computed via the van der Waals equation — so you know which gases are close to ideal and which deviate strongly.

Four coordinated charts

Z vs P (linear), Z vs T (hyperbolic), Z vs V (linear), and Z vs n (hyperbolic) — each plotted with your current operating point marked.

Reference tables

A gas constant reference table in seven unit systems, critical constants for common gases, typical Z values across pressure ranges, and a complete variable reference.

Reference Tables & Conversions

A gas constant reference in multiple unit systems, critical constants for common gases, and typical Z values across pressure.

Universal Gas Constant (R) in Various Unit Systems

The same physical constant expressed in different units. Choose the value that matches your pressure and volume units.

UnitsValue of RTypical use
J/(mol·K)8.314462618SI base — with Pa and m³
Pa·m³/(mol·K)8.314462618Same as J/(mol·K)
kPa·L/(mol·K)8.314462618Common in chemistry
L·atm/(mol·K)0.082057Classic chemistry textbook
L·bar/(mol·K)0.0831446Common in European industry
L·mmHg/(mol·K)62.3636Legacy medical/vacuum
cal/(mol·K)1.98588Nutrition and biology
ft³·psi/(lbmol·°R)10.7316US customary engineering
ft³·atm/(lbmol·°R)0.73024US gas industry
BTU/(lbmol·°R)1.98588US HVAC

Critical Constants of Common Gases

Critical temperature and pressure define the reduced properties used in generalized compressibility charts. Gases with low critical temperature (He, H₂) behave nearly ideally at room conditions.

GasTc (K)Pc (bar)Vc (L/mol)ω (acentric)Behavior at 25°C, 1 atm

Typical Compressibility Factors Across Pressure

Z values for common gases at 300 K across a range of pressures. Values below 1 indicate attractive forces dominate; values above 1 indicate molecular volume dominates.

Gas1 atm10 atm50 atm100 atm300 atm1000 atm

Variable Reference

SymbolMeaningTypical rangeUnits
ZCompressibility factor0.2 – 2.0dimensionless
PAbsolute pressure10² – 10⁸Pa (or kPa, bar, atm)
VVolume10⁻⁴ – 10m³ (or L, cm³)
nAmount of substance10⁻³ – 10⁵mol (or kmol, lbmol)
RUniversal gas constant8.314 (SI)J/(mol·K)
TAbsolute temperature10 – 3000K (or °R)
VmMolar volume0.02 – 1L/mol
Vm,idealIdeal molar volumeRT/PL/mol
PrReduced pressureP/Pcdimensionless
TrReduced temperatureT/Tcdimensionless

What Does the Compressibility Factor Measure?

The compressibility factor Z is a dimensionless correction that quantifies how much a real gas deviates from ideal behaviour. Under the ideal gas law, PV = nRT, so the ratio PV/(nRT) is exactly 1. Real gases, however, have molecules with finite size and with attractive and repulsive forces between them, so PV/(nRT) is not 1 — it is Z. When Z equals 1, the gas behaves ideally. When Z is less than 1, attractive forces dominate and the gas occupies less volume than ideal. When Z is greater than 1, molecular volume dominates and the gas occupies more volume than ideal. Engineers use Z to correct every real-gas calculation in chemical processing, gas pipelines, compressor design, and high-pressure storage.

Compressibility Factor Formula

The defining relationship is a simple ratio:

Z = P·V / (n·R·T)

where P is absolute pressure, V is volume, n is moles, R is the universal gas constant (8.314462618 J/(mol·K) in SI), and T is absolute temperature. Rearranged to solve for the other four variables:

P = Z·n·R·T / V
V = Z·n·R·T / P
n = P·V / (Z·R·T)
T = P·V / (Z·n·R)

The molar volume and its ideal counterpart follow directly:

Vm = V / n = Z·R·T / P
Vm,ideal = R·T / P
Z = Vm / Vm,ideal

Reduced properties — the basis of generalized compressibility charts — are:

Pr = P / Pc    Tr = T / Tc

Compressibility Variables

SymbolMeaningNotes
ZCompressibility factorRatio of real to ideal molar volume
PAbsolute pressureUse gauge + atmospheric for absolute
VTotal volumeVolume of the container
nMoles of gasMoles = mass / molar mass
RUniversal gas constant8.314 J/(mol·K) in SI
TAbsolute temperatureKelvin or Rankine, never °C or °F
VmMolar volumeV/n; the volume per mole of gas
Tr, PrReduced T and PInputs to the generalized compressibility chart

How Each Variable Affects Z

The formula Z = PV/(nRT) is linear in P and V, and inverse-linear in n and T. Because Z is the quantity being calculated, these relationships describe how Z changes when the other four variables are held fixed — which is exactly what happens in different types of thermodynamic processes. Holding V, n, and T constant while raising P raises Z proportionally. Holding P, n, and T constant while raising V does the same. Holding P, V, and T constant while raising n lowers Z. Holding P, V, and n constant while raising T lowers Z.

In practice, however, real processes usually hold different variables fixed, which is why real-gas Z curves bend rather than being simple straight lines. On an isotherm (constant T), as P is raised, V decreases faster than 1/P — the Z vs P curve dips below 1 at moderate pressures and rises above 1 at high pressures. On an isobar (constant P), as T is raised, V increases faster than T — the Z vs T curve rises toward 1. The simple linear relationship Z = PV/(nRT) describes only what happens when the other three variables stay fixed.

Compressibility Factor Examples

Example 1: 1 mol of gas at 1 atm, 273.15 K occupies 22.4 L. Find Z.
P = 101325 Pa, V = 0.0224 m³, n = 1 mol, T = 273.15 K
nRT = 1 × 8.314 × 273.15 = 2271.0 J
PV = 101325 × 0.0224 = 2269.7 J
Z = 2269.7 / 2271.0 = 0.9994 (near-ideal)
Example 2: 10 mol of CO₂ at 100 atm, 373.15 K, in a 3.2 L vessel.
P = 10132500 Pa, V = 0.0032 m³, n = 10 mol, T = 373.15 K
nRT = 10 × 8.314 × 373.15 = 31025 J
PV = 10132500 × 0.0032 = 32424 J
Z = 32424 / 31025 = 1.045 (slightly repulsive)
Example 3: Solve for pressure when Z = 0.85, V = 0.05 m³, n = 5 mol, T = 300 K.
P = Z·n·R·T / V = 0.85 × 5 × 8.314 × 300 / 0.05
= 0.85 × 12471 / 0.05 = 212,000 Pa ≈ 2.1 bar
Example 4: Solve for temperature when Z = 1.05, P = 5 MPa, V = 0.02 m³, n = 3 mol.
T = P·V / (Z·n·R) = 5e6 × 0.02 / (1.05 × 3 × 8.314)
= 100000 / 26.19 = 3819 K

Frequently Asked Questions

Z is the ratio of the actual volume a real gas occupies to the volume an ideal gas would occupy at the same P, T, and n. It matters because the ideal gas law is wrong for real gases — sometimes by only 1% (air at room conditions), sometimes by 30% or more (CO₂ at 100 atm, steam at high pressure). Any engineering calculation involving real gases — compressor sizing, pipeline flow, gas storage, distillation column design, refrigeration cycles — needs Z to be correct. Using Z = 1 when the actual Z is 0.7 means your equipment will be undersized by 30%, which in high-pressure systems can be dangerous.

Two competing effects determine Z. Intermolecular attraction pulls molecules together, making the gas more compressible than ideal and driving Z below 1. Molecular volume (the finite size of molecules) prevents them from being packed too tightly, making the gas less compressible than ideal and driving Z above 1. At moderate pressure, molecules are close enough for attraction to matter but not so close that their size dominates — so Z dips below 1. At high pressure, molecules are packed so tightly that their finite size becomes the dominant effect, and Z rises above 1. The crossover point depends on the gas and temperature but is typically in the 100–300 atm range.

Reduced pressure Pr = P/Pc and reduced temperature Tr = T/Tc, where Pc and Tc are the gas's critical pressure and temperature. The critical point is where liquid and gas become indistinguishable. Reduced properties normalise a gas's behaviour to its own critical point, which turns out to be a powerful insight: gases with the same Pr and Tr have nearly the same Z. This "corresponding states" principle is the basis of the generalized compressibility charts used throughout engineering. For example, N₂ at 25°C and 50 atm has Tr = 298/126 = 2.36 and Pr = 50/34 = 1.47 — and any other gas at the same reduced conditions will have a similar Z.

There is no single best equation — accuracy depends on the gas and conditions. The van der Waals equation (1873) is the simplest and is used in this calculator for the real-gas comparison table; it captures the qualitative behaviour but has ~5–10% error near the critical point. Redlich-Kwong and its modification by Soave (SRK) are more accurate for hydrocarbons. Peng-Robinson (1976) is the industry standard in process simulation and works well for natural gas, petroleum fluids, and light gases. Benedict-Webb-Rubin (BWR) and Lee-Kesler are more complex but more accurate over wide ranges. For very high accuracy (reference quality), multi-parameter equations like IAPWS-95 for water or the GERG-2008 for natural gas are used, but they require extensive data tables.

The Standing-Katz chart and its Nelson-Obert refinements plot Z on the y-axis against reduced pressure Pr on the x-axis, with a family of curves for different reduced temperatures Tr. To use it: (1) look up the gas's critical temperature and pressure, (2) compute Pr = P/Pc and Tr = T/Tc, (3) find the curve for your Tr, (4) read the Z value at your Pr. For gases with a significant acentric factor (ω > 0.1, like CO₂ or water), a correction using Pitzer's correlation Z = Z⁰ + ω·Z¹ improves accuracy. The chart covers Pr from 0 to about 15 and Tr from 1.0 to 3.0, which spans most engineering applications.

Yes — "compressibility factor," "deviation factor," and "Z-factor" all refer to the same quantity. The gas industry often calls it the Z-factor or deviation factor. In some texts the reciprocal 1/Z is called the "supercompressibility ratio" and appears in gas-metering equations (the "supercompressibility factor" Fpv is √(1/Z) in AGA-8). The terminology can be confusing, but all of them are derived from the same underlying Z = PV/(nRT). When someone says "the Z-factor of this gas is 0.85," they mean exactly the quantity this calculator computes.

For most gases, Z is within 1% of unity when the pressure is below about 5 atm and the temperature is well above the gas's critical temperature (say Tr > 2). Air at room temperature and pressure has Z ≈ 0.9995. Nitrogen at 10 atm and 300 K has Z ≈ 0.997. If your calculations require better than 1% accuracy, or your conditions are above 5–10 atm, or the gas has a critical temperature near or above the operating temperature (like CO₂, NH₃, or steam), you need to use a real Z value. As a rough rule of thumb: if the pressure is more than 10% of the gas's critical pressure, real-gas corrections start to matter.

Calculating...

Variables

Symbol Quantity Unit
Z Compressibility factor
P Absolute pressure atm
V Molar volume L/mol
n Moles of gas mol
R Universal gas constant 0.08206 L.atm/mol.K
T Absolute temperature K

What it means

The compressibility factor Z is a correction factor that accounts for the non‑ideal behaviour of real gases. It is defined as Z = PV/(nRT), where P is pressure, V is volume, n is moles, R is the gas constant, and T is temperature. For an ideal gas, Z = 1. For real gases, Z can be less than 1 (indicating intermolecular attraction reduces volume) or greater than 1 (repulsion forces dominate). Z is a function of temperature and pressure, and is often correlated using the principle of corresponding states (reduced temperature and pressure) or via equations of state like van der Waals, Peng‑Robinson, or Soave‑Redlich‑Kwong. The compressibility factor is essential for accurate calculations of gas properties in pipelines, compressors, and chemical reactors. It is also used in thermodynamic property estimation, such as enthalpy and entropy departures. Understanding Z is crucial for process design in the oil and gas, petrochemical, and power generation industries, where gases often deviate significantly from ideal behaviour.

Worked example

Compressibility Factor – Two Examples

Real‑World
Scenario: STP: P=1 atm, V=22.4 L/mol, T=273 K. Find Z.
ParameterValue
P1 atm
V22.4 L/mol
T273 K
1Z = PV/(nRT) = 1×22.4/(0.08206×273) = 1.00
Result Z = 1.00 ✓ Ideal gas
Scenario: High pressure: P=50 atm, V=0.4 L/mol, T=300 K. Find Z.
ParameterValue
P50 atm
V0.4 L/mol
T300 K
1Z = 50×0.4/(0.08206×300) = 20/24.618 = 0.812
Result Z = 0.812 ✓ Real gas
Key insight: Z=1 ideal; Z<1 attraction dominates, Z>1 repulsion dominates.

Common mistakes

  • Pressure P: Absolute pressure, not gauge.
  • Temperature T: In Kelvin.
  • Volume V: In m³, molar volume in m³/mol.
  • Ideal gas constant R: 8.314 J/(mol·K) – ensure units match.
  • Z = 1 for ideal gas: Deviation increases at high pressure and/or low temperature; use an equation of state for accurate Z.

Applications

The compressibility factor, Z = PV/(nRT), corrects the ideal gas law for real gas behaviour. It is a function of temperature and pressure, with Z=1 for ideal gases, Z<1 indicating attractive forces dominate (usually at moderate pressures), and Z>1 indicating repulsive forces (at high pressures). Engineers use Z in calculations involving gases at high pressure, such as in natural gas pipeline design, compressors, and chemical reactors. It is essential for accurate volumetric flow rates, equipment sizing, and process design. Charts or equations of state (e.g., Peng‑Robinson) provide Z values. By using the compressibility factor, professionals can ensure safe and efficient design of gas handling and processing systems.

  • Design of natural gas pipelines and storage facilities
  • Sizing of compressors and gas expanders
  • Process simulation of high‑pressure chemical reactors
  • Calculation of gas densities and flow rates in custody transfer
  • Safety analysis for gas pressurised systems and relief devices