Real Gases and Deviations from Ideality

Squeeze carbon dioxide hard enough at room temperature, and it turns to liquid. The ideal gas law predicts no such thing could ever happen. That single failure exposes a deep truth about real molecules. Real gases deviate from ideal behavior because molecules occupy space and attract one another. These two effects, invisible in the ideal gas model, become important at high pressure and low temperature. Understanding them is essential for predicting when gases liquefy, how refrigerants behave, and why the atmosphere itself deviates from ideality under compression. This article builds the qualitative and semi-quantitative picture behind real gas behavior. You will see why the ideal gas law fails. Then you will see how molecular size and intermolecular attraction act in opposite directions. Finally you will see how this sets up the compressibility factor and the van der Waals equation, covered in the next articles.

Key takeaways
  • Ideal gas molecules are treated as point particles with zero volume and no interactions.
  • Real molecules have finite size, so the volume actually available for motion is less than the container volume.
  • Real molecules attract each other at moderate range, which lowers the pressure they exert compared to ideal prediction.
  • Deviations are largest at high pressure and low temperature, near the conditions where gases liquefy.
  • At high temperature and low pressure, real gases approach ideal behavior because kinetic energy dominates over attractive forces.
  • Key idea: Real gas behavior departs from the ideal gas law because finite molecular volume pushes pressure up while intermolecular attraction pulls it down, and the competition between these effects depends on temperature and density.
The core insight

Every real molecule takes up space and pulls on its neighbors, so a real gas can never obey PV=nRTPV = nRT exactly; the two corrections, excluded volume and attractive pressure, act oppositely and their balance determines whether a gas behaves nearly ideally or condenses into a liquid.

The physical picture

The ideal gas law,

PV=nRTPV = nRT

rests on two silent assumptions. First, gas molecules are treated as point particles: they have mass but zero volume. Second, molecules do not interact with one another except during instantaneous, perfectly elastic collisions. Neither assumption is exactly true for any real substance.

Finite molecular volume. A real molecule is a small but definite blob of electron density, roughly 0.10.1–0.50.5 nm across. When many such molecules are packed into a container, part of the container volume is physically occupied by the molecules themselves. The volume actually available for any one molecule to move through is smaller than the container volume VV. Because pressure arises from the frequency and force of wall collisions, restricting the available space means molecules hit the walls more often than the ideal law predicts. Finite size therefore pushes the real pressure above the ideal prediction, an effect that grows as VV shrinks, i.e., at high density.

Intermolecular attraction. Real molecules also attract one another at short-to-moderate range through van der Waals forces: induced-dipole (dispersion), dipole-dipole, and sometimes hydrogen bonding. A molecule approaching the container wall is pulled backward, toward the bulk of the gas, by its neighbors. This attractive tug softens the impact on the wall, so the actual pressure is lower than the ideal prediction. This effect scales with how often molecules encounter each other, so it grows with density too, but it works in the opposite direction to the volume effect. The two corrections do not cancel evenly. At low density, molecules are far apart, both corrections are small, and the gas behaves nearly ideally. At high density and low temperature, both effects become significant, but attraction tends to dominate first as pressure rises modestly, later giving way to the volume effect at very high pressure. This crossover from attraction-dominated to volume-dominated behavior is exactly what produces the characteristic dip-then-rise shape seen when real gas behavior is plotted against pressure.

Figure
Two competing corrections to ideal gas pressure as density increases
Molar density n/V (increasing to the right) P(real) minus P(ideal) 0 attraction lowers P finite size raises P ideal limit

A second useful picture is the molecular-scale origin of the two corrections side by side: excluded volume as a geometric exclusion zone, and attraction as an inward-pulling force field near the container wall.

Figure
Molecular origin of the two deviations from ideality
Excluded volume molecules block space, b greater than 0 Attractive pull at wall neighbors pull molecule inward, softening impact

The core relations

The ideal gas law, the reference point for all deviations:

PV=nRTPV = nRT

where: PP is pressure, VV is volume, nn is moles, R=8.314 J K−1mol−1R = 8.314\ \text{J K}^{-1}\text{mol}^{-1}, TT is temperature. The qualitative correction structure that motivates the van der Waals equation (developed fully in the next article):

Preal≈Pideal, corrected for volume−Pideal, corrected for attractionP_{\text{real}} \approx P_{\text{ideal, corrected for volume}} - P_{\text{ideal, corrected for attraction}}

where: the first term reflects a smaller free volume than VV, the second reflects reduced wall impact from attraction. The Boyle temperature condition, where attractive and volume effects momentarily cancel for a given gas:

TB≈aRbT_B \approx \frac{a}{Rb}

where: aa measures attraction strength, bb measures molecular size (excluded volume per mole), both substance-specific constants introduced formally with the van der Waals equation. The compressibility factor, the standard diagnostic for how far a gas has strayed from ideality:

Z=PVmRTZ = \frac{PV_m}{RT}

where: Vm=V/nV_m = V/n is molar volume; Z=1Z = 1 for an ideal gas, Z<1Z < 1 signals attraction dominates, Z>1Z > 1 signals excluded volume dominates.

Derivation AWhy finite size and attraction push pressure in opposite directions

Goal. Show qualitatively, from the kinetic picture of pressure, why molecular volume raises apparent pressure while intermolecular attraction lowers it, and why both scale with density.

Step 1: Pressure from kinetic theory. In the ideal gas model, pressure arises purely from the rate of momentum transfer as point molecules strike the walls. The mean free path and collision frequency depend only on the container volume VV and the number density n/Vn/V, because molecules are assumed to have zero size and are assumed non-interacting between collisions with the wall.

Step 2: Introduce finite molecular volume. Real molecules exclude a region of space around each other; two molecules cannot approach closer than roughly the sum of their radii. For nn moles of molecules with molar excluded volume bb, the volume genuinely accessible for translational motion is reduced from VV to approximately

Vfree≈V−nbV_{\text{free}} \approx V - nb

Since the ideal gas law with the true free volume would read P(V−nb)=nRTP(V - nb) = nRT, solving for PP gives

P=nRTV−nbP = \frac{nRT}{V - nb}

This is larger than the naive ideal prediction nRT/VnRT/V at the same VV, because the denominator has shrunk. Geometrically, molecules confined to a smaller effective volume collide with the walls more frequently, raising the pressure. This correction grows sharply as V→nbV \to nb, i.e., as the gas is compressed toward close packing.

Step 3: Introduce intermolecular attraction. A molecule deep in the bulk of the gas feels attractive pulls from neighbors on all sides, which average to zero net force. A molecule about to strike a wall, however, feels a net inward pull, because its neighbors lie only on the bulk side. This net inward force decelerates the molecule just before impact, reducing the momentum actually transferred to the wall compared to a non-interacting molecule of the same speed.

Step 4: Scaling of the attractive correction. The strength of this inward pull is proportional to the local number density of neighboring molecules, n/Vn/V. The number of molecules experiencing this pull near the wall, per unit time, is also proportional to n/Vn/V. The pressure reduction due to attraction therefore scales as the product of these two factors:

ΔPattraction∝(nV)2=a(nV)2\Delta P_{\text{attraction}} \propto \left(\frac{n}{V}\right)^2 = a\left(\frac{n}{V}\right)^2

where aa is a positive constant capturing the strength of intermolecular attraction for a given substance. Because this correction subtracts from pressure while the excluded-volume correction adds to it, combining Steps 2 and 4 gives the qualitative structure

P=nRTV−nb−a(nV)2P = \frac{nRT}{V - nb} - a\left(\frac{n}{V}\right)^2

Step 5: Interpreting the balance. At low density (n/Vn/V small), nb≪Vnb \ll V and a(n/V)2a(n/V)^2 is negligible, so P→nRT/VP \to nRT/V and the gas is essentially ideal. At high density, both corrections grow, but the attractive term grows first as a modest departure (since it enters as density squared but with an initially small coefficient at moderate compression), while the excluded-volume term diverges sharply only as VV approaches nbnb. This is why real gases typically show Z<1Z < 1 at moderate pressure (attraction wins) and Z>1Z > 1 only at very high pressure (excluded volume wins).

P=nRTV−nb−a(nV)2\boxed{P = \frac{nRT}{V - nb} - a\left(\frac{n}{V}\right)^2}

This boxed expression is precisely the van der Waals equation, which the next article develops and parameterizes rigorously; here it is derived only to the level of physical motivation, not curve-fitting precision.

Worked examples

Example 1 — Foundational: comparing real CO₂ to the ideal prediction. Consider 1.00 mol of CO₂ gas confined to V=0.500V = 0.500 L at T=300T = 300 K. Estimate the ideal pressure, then use the van der Waals constants for CO₂ (a=3.640 L2atm mol−2a = 3.640\ \text{L}^2\text{atm mol}^{-2}, b=0.04267 L mol−1b = 0.04267\ \text{L mol}^{-1}) to see the size of the real correction. Step 1: Ideal pressure.

Pideal=nRTV=(1.00 mol)(0.08206 L atm K−1mol−1)(300 K)0.500 LP_{\text{ideal}} = \frac{nRT}{V} = \frac{(1.00\ \text{mol})(0.08206\ \text{L atm K}^{-1}\text{mol}^{-1})(300\ \text{K})}{0.500\ \text{L}}
Pideal=24.62 L atm0.500 L=49.2 atmP_{\text{ideal}} = \frac{24.62\ \text{L atm}}{0.500\ \text{L}} = 49.2\ \text{atm}

Step 2: Real (van der Waals) pressure.

Preal=nRTV−nb−a(nV)2P_{\text{real}} = \frac{nRT}{V - nb} - a\left(\frac{n}{V}\right)^2
V−nb=0.500−(1.00)(0.04267)=0.4573 LV - nb = 0.500 - (1.00)(0.04267) = 0.4573\ \text{L}
nRTV−nb=24.620.4573=53.85 atm\frac{nRT}{V-nb} = \frac{24.62}{0.4573} = 53.85\ \text{atm}
a(nV)2=3.640×(1.000.500)2=3.640×4.00=14.56 atma\left(\frac{n}{V}\right)^2 = 3.640 \times \left(\frac{1.00}{0.500}\right)^2 = 3.640 \times 4.00 = 14.56\ \text{atm}
Preal=53.85−14.56=39.3 atmP_{\text{real}} = 53.85 - 14.56 = 39.3\ \text{atm}

Sanity check: Preal=39.3P_{\text{real}} = 39.3 atm is noticeably lower than Pideal=49.2P_{\text{ideal}} = 49.2 atm, meaning Z=Preal/Pideal≈0.80Z = P_{\text{real}}/P_{\text{ideal}} \approx 0.80. Attraction dominates at this moderate density, exactly as expected for CO₂ well below its Boyle temperature at this compression — physically sensible since CO₂ is a polarizable, easily liquefied gas.

Example 2 — Applied: locating the crossover density where corrections cancel. For CO₂ at T=300T = 300 K, find the molar volume VmV_m at which the excluded-volume and attractive corrections to pressure are exactly equal in magnitude — i.e., the point where the van der Waals pressure momentarily equals the ideal pressure evaluated at the same VmV_m, a useful diagnostic for "accidental ideality." We want

RTVm−b−aVm2=RTVm\frac{RT}{V_m - b} - \frac{a}{V_m^2} = \frac{RT}{V_m}

Rearranging,

RT(1Vm−b−1Vm)=aVm2RT\left(\frac{1}{V_m - b} - \frac{1}{V_m}\right) = \frac{a}{V_m^2}
RT⋅Vm−(Vm−b)Vm(Vm−b)=aVm2RT\cdot\frac{V_m - (V_m - b)}{V_m(V_m-b)} = \frac{a}{V_m^2}
RT⋅bVm(Vm−b)=aVm2RT\cdot\frac{b}{V_m(V_m - b)} = \frac{a}{V_m^2}

For Vm≫bV_m \gg b (a reasonable approximation since b=0.04267b = 0.04267 L/mol is small), Vm−b≈VmV_m - b \approx V_m, so

RTb≈aVm2Vm2⋅Vm2Vm2RTb \approx \frac{a V_m^2}{V_m^2} \cdot \frac{V_m^2}{V_m^2}

More carefully, substituting Vm−b≈VmV_m - b \approx V_m on the left gives

RTbVm2≈aVm2\frac{RTb}{V_m^2} \approx \frac{a}{V_m^2}

which cancels Vm2V_m^2 entirely and yields the temperature condition rather than a volume condition:

T≈aRbT \approx \frac{a}{Rb}

This is the Boyle temperature. Plugging in CO₂'s constants:

TB=aRb=3.640 L2atm mol−2(0.08206 L atm K−1mol−1)(0.04267 L mol−1)T_B = \frac{a}{Rb} = \frac{3.640\ \text{L}^2\text{atm mol}^{-2}}{(0.08206\ \text{L atm K}^{-1}\text{mol}^{-1})(0.04267\ \text{L mol}^{-1})}
TB=3.6400.003502=1039 KT_B = \frac{3.640}{0.003502} = 1039\ \text{K}

Sanity check: this is far above 300 K, confirming that at 300 K, CO₂ is well below its Boyle temperature, so attraction dominates over the whole accessible density range — consistent with Z<1Z < 1 found in Example 1. The literature Boyle temperature of CO₂ is close to 1000–1100 K depending on the equation of state used, so this simple van der Waals estimate is physically reasonable.

Limiting cases & common traps

RegimeBehaviorPhysical reason
Low pressure, any reasonable TTZ→1Z \to 1, gas nearly idealMolecules far apart; both corrections vanish as V/n→∞V/n \to \infty
Moderate pressure, T<TBT < T_BZ<1Z < 1Attraction dominates; real PP below ideal PP
High pressure, any TTZ>1Z > 1Excluded volume dominates; real PP exceeds ideal PP
T=TBT = T_B (Boyle temperature)Z≈1Z \approx 1 over an extended pressure rangeAttractive and volume corrections cancel to leading order
Very low TT, moderate PPCondensation to liquidAttraction overwhelms thermal kinetic energy; ideal gas law cannot describe this at all

The chemist behind it

The qualitative story of finite molecular size and intermolecular attraction was made quantitative by the Dutch physicist Johannes Diderik van der Waals. In his 1873 doctoral thesis, he proposed that the ideal gas law fails because gas molecules have volume and attract one another, and he encoded both effects into a single modified equation of state. His equation not only reproduced the qualitative deviations described here but also predicted the existence of a critical point and the liquid-gas transition, unifying the gas and liquid states within one continuous mathematical framework. This insight — that liquids and gases are two faces of the same underlying physics — was decades ahead of a rigorous molecular theory of liquids.

Origins · 1 minJohannes Diderik van der Waals and how this was discovered
JD
Johannes Diderik van der Waals
1837–1923 · Dutch physicist whose 1873 thesis introduced molecular size and attraction corrections, earning the 1910 Nobel Prize in Physics

Ask the tutor: How do the van der Waals constants aa and bb get measured experimentally for a real gas?

Why does the ideal gas law fail at all if it derives from basic kinetic theory

The ideal gas law's kinetic derivation assumes molecules are point particles with no volume and no forces between them except during instantaneous collisions. Real molecules violate both assumptions: they have finite size on the order of a few angstroms, and they attract each other through van der Waals forces at longer range. These assumptions are excellent approximations when gas is dilute, but they break down as density rises, because molecular size and mutual attraction become comparable in effect to the container volume and thermal energy.

Do all real gases deviate from ideality in the same direction

No. The direction of deviation depends on the balance between attraction and excluded volume at the specific temperature and pressure in question. Below a gas's Boyle temperature, attraction typically dominates at moderate pressure, giving Z<1Z < 1. Above the Boyle temperature, the excluded-volume effect dominates across essentially all pressures, giving Z>1Z > 1 throughout. Hydrogen and helium, with weak attractive forces and low boiling points, show Z>1Z > 1 even near room temperature, unlike CO₂.

How does this topic connect to why gases liquefy

Liquefaction is essentially an extreme manifestation of intermolecular attraction winning decisively over thermal kinetic energy. As temperature drops, molecules move slower and attraction has more relative influence, eventually pulling molecules together into a condensed phase. The ideal gas law, having no attraction term at all, cannot predict condensation under any conditions. This is one of the clearest experimental proofs that intermolecular forces are real and must be included in any accurate equation of state.

What is the compressibility factor and how does it relate to this article

The compressibility factor Z=PVm/RTZ = PV_m/RT measures exactly how far a real gas has drifted from ideal behavior at given conditions; Z=1Z = 1 means ideal, Z≠1Z \neq 1 means real effects are significant. This article explains the two molecular causes behind any deviation of ZZ from unity. The next article in this sequence treats ZZ quantitatively, showing how it varies with pressure, temperature, and gas identity.

Is the van der Waals equation the final word on real gas behavior

No, it is a valuable first approximation, not an exact law. It captures the qualitative physics of excluded volume and attraction correctly and even predicts a critical point, but it is not numerically precise for all gases and all conditions. More sophisticated equations of state, such as the Redlich-Kwong or Peng-Robinson equations, refine the same two ideas with better empirical accuracy, but the qualitative picture developed here remains the conceptual foundation for all of them.

Before this

Where this leads