The Compressibility Factor
Fill a steel cylinder with nitrogen at 800 atm and the ideal gas law fails badly. Predicted and measured pressures can differ by more than 20%. Chemists needed one clean number to track that failure. That number is the compressibility factor, . compares the actual molar volume of a real gas to the volume predicted by the ideal gas law. It equals exactly 1 for an ideal gas at every pressure and temperature. Deviations from 1 tell you whether attractive or repulsive intermolecular forces dominate under given conditions. This matters directly for industrial gas storage, natural gas pipelines, cryogenics, and any calculation where "close enough" to ideal is not good enough. This article defines rigorously. It builds the virial connection to intermolecular forces. It walks through two fully worked numerical examples. Finally, it previews how sets up the van der Waals equation and the law of corresponding states.
- measures the ratio of real to ideal molar volume at fixed , .
- for an ideal gas; signals net attractive forces; signals net repulsive (excluded-volume) forces.
- At low pressure for every real gas; at very high pressure always, because molecules have finite size.
- The Boyle temperature is where has zero initial slope in , and attraction/repulsion balance.
- is the first-order diagnostic behind the virial equation, the van der Waals equation, and corresponding states.
- Key idea: is a single dimensionless number that converts "how ideal is this gas right now" into a measurable, plottable quantity.
The compressibility factor packages all the messy physics of intermolecular attraction and molecular size into one ratio that equals 1 exactly when a gas behaves ideally, so its deviation from unity — and how that deviation changes with pressure and temperature — is a direct, measurable fingerprint of real intermolecular forces.
The physical picture
For one mole of an ideal gas, holds at every pressure. Real molecules occupy space and attract or repel one another, so real gases disobey this law except in the low-density limit. Rather than abandon the simple law, chemists keep its form and absorb all the non-ideality into a correction factor:
Two competing effects control . At moderate pressures, intermolecular attractions pull molecules together, letting the gas occupy less volume than ideal behavior predicts. This makes smaller than the ideal value, so . At high pressures, molecules are forced close enough that their finite size — repulsive core — becomes dominant, pushing the real volume above the ideal value, so . Every real gas shows this same qualitative shape: a dip below 1 followed by a rise above 1 as pressure increases, though the depth of the dip and the pressure at which crosses back through 1 depend strongly on temperature and on which gas you study. At a special temperature called the Boyle temperature , the initial low-pressure slope of against is exactly zero. Attractive and repulsive contributions cancel to first order, and the gas behaves ideally over an unusually wide pressure range. Above , thermal energy overwhelms attractions and rises monotonically from 1. Below , the characteristic dip appears.
The second useful picture is a molecular one: split the real gas's non-ideal molar volume into what attraction removes and what molecular size adds back.
The core relations
where is the actual molar volume, the pressure, the temperature, and the gas constant.
where is the molar volume an ideal gas would have at that same and .
where and are the pressure-series virial coefficients, with controlling the initial slope.
where , are the volume-series (molar-volume) virial coefficients; is often just written .
where is the Boyle temperature, the unique temperature at which the second virial coefficient vanishes.
Goal. Show how 's definition connects directly to the virial expansion, and extract the physical meaning of the first deviation term.
Step 1. Start from the exact experimental fact. For any real gas, a plot of against at fixed is smooth and can be fit by a power series in , since real equations of state are analytic away from phase transitions:
Step 2. Divide both sides by . By definition , so dividing gives immediately
This is the pressure-series virial equation of state, and it is exact in the sense that it is simply a Taylor expansion of measured data; , are empirical temperature-dependent coefficients.
Step 3. Relate the pressure series to the more physically transparent volume series. It is more common, and closer to molecular theory, to expand in instead of :
The two expansions must agree order by order once is eliminated using to lowest order, giving the standard low-order relation .
Step 4. Interpret the leading coefficient molecularly. Statistical mechanics shows that arises from the pairwise interaction potential between two molecules:
At long range, is attractive (negative), which makes the integrand positive there and drives negative — the physical signature of attraction lowering below 1. At short range, the steep repulsive wall makes large and positive, driving the integrand toward and pushing toward positive values — the signature of excluded volume raising above 1.
Step 5. Extract the Boyle temperature. Since to leading order in ,
the initial slope of versus is . This slope vanishes exactly when , defining . Below , and attraction dominates at low pressure, producing the characteristic initial dip in . Above , and rises immediately from 1.
Boxed result.
's low-pressure slope is fixed entirely by the second virial coefficient, and its sign is a direct experimental probe of whether attraction or repulsion controls the gas at that temperature.
Worked examples
Example 1 — Foundational: computing from a –– measurement. One mole of carbon dioxide gas is confined at and . Experiment shows the molar volume is . Find and interpret it. Step 1. Convert to consistent SI-friendly units using . Step 2. Compute the ideal molar volume at these conditions:
Step 3. Compute :
Step 4. Sanity check via the direct definition:
Both routes agree. Since is well below 1, CO₂ at 313 K and 60 atm is strongly dominated by attractive intermolecular forces — the actual volume is only 62% of the ideal prediction. This is physically reasonable: CO₂ has a relatively high critical temperature (304 K), so 313 K is only slightly above , a regime where attractions are known to be severe.
Example 2 — Applied: locating the pressure at which N₂ returns to near-ideal behavior. Nitrogen gas at has a measured second virial coefficient and, from tables, a third virial coefficient . Using the volume-series virial equation truncated at the term, estimate the molar volume and at , and compare with the ideal prediction. Step 1. Write the two-term-corrected virial equation with in atm, in cm³/mol, using :
Step 2. First find the ideal molar volume as a zeroth iterate:
Step 3. Iterate: insert into the right side to refine , then recompute .
Step 4. Because and nearly cancel at this , to three significant figures, so the correction is tiny; one more iteration confirms convergence:
The iteration is stationary, so and . Step 5. Interpret: at 300 K and 100 atm, nitrogen sits almost exactly at despite being at fairly high pressure — this is because 300 K is close to N₂'s experimental Boyle temperature (), where attraction and repulsion nearly cancel over a wide range of . Contrast this with Example 1: CO₂ at a temperature close to its own (much lower) shows severe deviation, while N₂ near its Boyle temperature shows almost none, even at comparable pressure. This contrast is exactly the qualitative behavior sketched in the first figure.
Limiting cases & common traps
| Regime | Behavior of | Physical reason |
|---|---|---|
| (any ) | Molecules far apart; both attraction and finite size become negligible | |
| over a wide range | ; attraction and repulsion cancel to first order | |
| , moderate | , shows a minimum | Attractive forces dominate |
| Very high (any ) | , rising without bound | Excluded volume dominates; molecules cannot be compressed past close packing |
| for all | Thermal energy suppresses attraction; repulsion wins immediately |
The chemist behind it
The compressibility factor's modern quantitative form owes much to Heike Kamerlingh Onnes, who introduced the virial expansion of in powers of (or ) around 1901 while pursuing precision gas measurements at Leiden. His group's meticulous –– data on gases at low temperature — motivated by the eventual liquefaction of helium in 1908 — provided the experimental backbone that let later theorists connect virial coefficients to intermolecular potentials.
Origins · 1 minHeike Kamerlingh Onnes and how this was discovered
Ask the tutor: How does the van der Waals equation predict the exact shape of the Z-versus-p curve, and why does it fail near the critical point?
Why does Z equal 1 for an ideal gas but not for real gases?
The ideal gas law assumes molecules have zero volume and no intermolecular forces, so holds exactly, making identically. Real molecules occupy finite volume and interact through attractive and repulsive forces, both of which change how responds to and . These effects vanish only in the low-density limit, so deviates from 1 whenever intermolecular forces or molecular size become significant relative to the thermal and pressure scales involved.
Is there a single formula that predicts Z for any gas at any condition?
Not exactly — depends on the specific intermolecular potential of each substance, so no universal closed-form expression works perfectly for all gases. However, the law of corresponding states shows that when is plotted against reduced pressure and reduced temperature , most gases collapse onto nearly the same curve. This approximate universality, covered in the corresponding-states article, makes generalized compressibility charts practically useful for engineering estimates.
How is Z related to the virial coefficients B and C?
The virial equation writes as a power series in (or in ), with coefficients , , and so on. The leading coefficient dominates at low-to-moderate density and directly reflects the balance between attraction and repulsion; it is negative below the Boyle temperature and positive above it. Higher terms like become important only as density increases further, refining the prediction beyond the Boyle-temperature-controlled first-order behavior described here.
Can Z ever be greater than 1 even at low pressure?
Yes, for gases at temperatures well above their Boyle temperature. In that regime the second virial coefficient is already positive, so even a small pressure increase pushes above 1 rather than causing the usual initial dip. Hydrogen and helium, which have unusually low critical temperatures, show at room temperature for essentially this reason — their Boyle temperatures are lower than most other common gases.
How does Z connect to the van der Waals equation?
The van der Waals equation, , can be rearranged and expanded in to yield a virial-like series whose second coefficient is . This single expression reproduces the qualitative story here directly: the term (excluded volume) pushes positive, the term (attraction) pushes it negative, and setting gives the van der Waals prediction for the Boyle temperature, .