AP CHEMISTRY • PROPERTIES OF SUBSTANCES AND MIXTURES

Deviation from Ideal Gas Law

Why real gases depart from PV = nRT and how the van der Waals equation corrects for molecular reality.

Historical Context & Motivation

The ideal gas law, PV = nRT, elegantly unifies the earlier empirical observations of Boyle, Charles, and Avogadro into a single equation of state. For over a century it served as the workhorse of gas-phase calculations, yet experimentalists noticed persistent discrepancies when gases were compressed to high pressures or cooled toward their boiling points. These failures hinted at a deeper physical reality: gas molecules are not the infinitesimally small, non-interacting particles the ideal model assumes. The quest to reconcile theory with measurement drove some of the most consequential work in thermodynamics and physical chemistry during the nineteenth century.

1662
Boyle's Law
Robert Boyle establishes the inverse relationship between pressure and volume at constant temperature, laying the first quantitative groundwork for gas behavior.
1834
Clapeyron's Ideal Gas Equation
Émile Clapeyron combines Boyle's, Charles's, and Gay-Lussac's laws into the familiar PV = nRT, providing a universal equation of state for ideal gases.
1873
Van der Waals Equation
Johannes van der Waals publishes his doctoral thesis introducing correction terms for intermolecular attractions (a) and finite molecular volume (b), earning the 1910 Nobel Prize in Physics.
1901
Onnes & Virial Expansion
Heike Kamerlingh Onnes develops the virial equation of state, providing a systematic series expansion that quantifies deviations from ideality with increasing precision.

The central question that this lesson addresses is straightforward: under what conditions and why does PV = nRT fail, and how can we correct it? Understanding these deviations is critical for AP Chemistry because the College Board explicitly tests your ability to predict when a gas will deviate from ideal behavior and to apply the van der Waals equation quantitatively.

Core Principles of Real Gas Behavior

The ideal gas model rests on two simplifying assumptions: that gas particles have zero volume and that they exert no attractive or repulsive forces on one another. Real molecules violate both assumptions, and the magnitude of these violations determines how far a gas deviates from ideality. The following foundational ideas structure our analysis of real gas behavior.

1

Finite Molecular Volume

Real molecules occupy space. At high pressures, the volume of the molecules themselves becomes a significant fraction of the container volume, causing the measured volume to exceed the ideal prediction.
2

Intermolecular Attractions

London dispersion forces, dipole–dipole interactions, and hydrogen bonds pull molecules toward each other, reducing the force and frequency of wall collisions and lowering the observed pressure below the ideal value.
3

High Pressure → More Deviation

Compressing a gas forces molecules closer together, amplifying both the volume-exclusion effect and the strength of intermolecular forces, thereby magnifying deviations from PV = nRT.
4

Low Temperature → More Deviation

As kinetic energy drops, molecules spend more time within the attractive range of their neighbors. Attractive forces dominate over thermal motion, pulling the gas further from ideal behavior.
5

Compressibility Factor Z

The ratio Z = PV/(nRT) quantifies deviation. For an ideal gas Z = 1. When attractions dominate Z < 1; when molecular volume dominates Z > 1.
KEY TAKEAWAY
KEY TAKEAWAY

Visualizing Ideal vs. Real Gas Behavior

The plot shows the compressibility factor Z versus pressure for three gases. At moderate pressures, attractive intermolecular forces cause Z to dip below 1 (especially for CO2), while at very high pressures the finite molecular volume drives Z above 1. H2, with its extremely weak London dispersion forces, barely dips below 1 and rises quickly.

The diagram above is the single most important visual for understanding real gas behavior. Notice two distinct regimes. At moderate pressures, intermolecular attractions pull molecules inward, reducing wall collisions and making Z < 1 — the gas is more compressible than an ideal gas predicts. At very high pressures, the molecules are packed so tightly that their finite volume becomes the dominant correction, forcing Z > 1. The depth of the Z minimum correlates with the strength of intermolecular forces: CO2 (polar, larger electron cloud) dips more than N2, while H2 barely dips at all. This pattern is a favorite testing target on the AP exam.

Mathematical Framework: The Van der Waals Equation

To quantify deviations from ideality, we replace PV = nRT with the van der Waals equation, which introduces two correction terms — one for intermolecular attractions and one for finite molecular volume. These corrections transform the ideal gas law into a more physically realistic equation of state.

IDEAL GAS LAW
PV = nRT
P = pressure (atm), V = volume (L), n = moles, R = 0.08206 L·atm/(mol·K), T = temperature (K)
VAN DER WAALS EQUATION
(P + an²/V²)(V − nb) = nRT
a = intermolecular attraction constant (L²·atm/mol²): corrects pressure downward because attractions reduce wall collisions. b = excluded volume constant (L/mol): corrects volume upward because molecules themselves occupy space.
COMPRESSIBILITY FACTOR
Z = PV / (nRT)
Z = 1 for an ideal gas. Z < 1 when attractive forces dominate; Z > 1 when molecular volume dominates.

The term an²/V² is added to the measured pressure because intermolecular attractions decrease the observed pressure relative to what a non-interacting gas would exert. The factor is proportional to the square of the molar concentration (n/V) because attractions are pairwise — doubling the concentration quadruples the number of interacting pairs per unit volume. Similarly, nb is subtracted from the total volume because the portion of the container occupied by the molecules themselves is unavailable for free motion. Gases with larger, more polarizable electron clouds (e.g., Cl2, SO2) have larger a values, while physically larger molecules have larger b values.

AP Exam Tip

When Do Gases Deviate Most?

Predicting when a gas behaves ideally versus non-ideally is one of the most frequently tested skills on the AP Chemistry exam. The two primary factors are pressure and temperature, but the identity of the gas — specifically its molecular mass, polarity, and ability to hydrogen bond — also matters significantly.

The left panel shows conditions promoting ideal behavior: molecules are far apart and moving quickly. The right panel illustrates high-pressure, low-temperature conditions where molecules crowd together and intermolecular forces become significant.
Van der Waals constants for selected gases. Larger a → stronger IMFs → greater deviation.
Gasa (L²·atm/mol²)b (L/mol)Dominant IMF
He0.03420.0237Very weak LDF
N₂1.3900.0391LDF
CO₂3.5900.0427LDF (large e⁻ cloud)
NH₃4.1700.0371H-bonding + dipole–dipole
H₂O5.4600.0305Strong H-bonding

Notice how a increases dramatically from He to H₂O, spanning two orders of magnitude. Water vapor, with its strong hydrogen bonding network, deviates far more readily than helium at equivalent conditions. The b values vary less because molecular volumes are more similar than interaction strengths. On the AP exam, you should be prepared to rank gases by expected deviation based on their intermolecular force types and molecular sizes.

Worked Example: Comparing Ideal and Van der Waals Predictions

Let us calculate the pressure of 1.00 mol of CO2 confined to a 0.500 L container at 300 K using both the ideal gas law and the van der Waals equation, then compare the results. For CO2: a = 3.590 L²·atm/mol², b = 0.0427 L/mol.

1
Step 1 — Ideal Gas CalculationUsing PV = nRT, solve for P: P = nRT / V = (1.00 mol)(0.08206 L·atm·mol⁻¹·K⁻¹)(300 K) / (0.500 L).
P(ideal) = 49.2 atm
2
Step 2 — Calculate Pressure Correction (an²/V²)The attraction correction is an²/V² = (3.590)(1.00)² / (0.500)² = 3.590 / 0.250.
an²/V² = 14.4 atm
3
Step 3 — Calculate Volume Correction (nb)The volume correction is nb = (1.00)(0.0427) = 0.0427 L. The corrected volume is V − nb = 0.500 − 0.0427 = 0.457 L.
V(corrected) = 0.457 L
4
Step 4 — Van der Waals PressureRearranging (P + an²/V²)(V − nb) = nRT, we get P = nRT/(V − nb) − an²/V². P = (1.00)(0.08206)(300)/(0.457) − 14.4 = 53.9 − 14.4.
P(van der Waals) = 39.5 atm
5
Step 5 — Interpret the DifferenceThe ideal gas law overestimates the pressure by 49.2 − 39.5 = 9.7 atm, a relative error of about 20%. The intermolecular attractions in CO₂ significantly reduce the observed pressure. The volume correction alone (raising the nRT/V term from 49.2 to 53.9) would increase P, but the attraction correction (−14.4 atm) dominates at this moderate compression.
~20% deviation — attractions dominate over molecular volume

Strengths and Limitations of Each Model

Comparison of the ideal gas law and the van der Waals equation.
FeatureIdeal Gas LawVan der Waals Equation
Molecular volumeAssumed zeroCorrected by constant b
Intermolecular forcesAssumed noneCorrected by constant a
Accuracy at low P, high TExcellentExcellent (reduces to ideal)
Accuracy at high P, low TPoor — significant errorGood — qualitatively correct
Mathematical simplicitySimple algebraCubic in V; solvable analytically
Predicts liquefaction?NoQualitatively yes (below Tc)
KEY TAKEAWAY
PERSPECTIVE

It is worth noting that the van der Waals equation still has limitations: it does not handle the liquid phase quantitatively, it is gas-specific (requiring tabulated a and b values), and it cannot capture the sharp phase transitions that occur at the critical point with full accuracy. Nevertheless, for AP Chemistry purposes, the van der Waals framework provides the conceptual and mathematical tools needed to understand and predict real gas behavior.

Connection to Advanced Theory

The van der Waals equation is only the first step in a hierarchy of increasingly accurate equations of state. In university-level physical chemistry and chemical engineering courses, you will encounter more sophisticated models that extend the ideas introduced here.

How AP-level real gas concepts connect to advanced physical chemistry.
ConceptAP Chemistry LevelAdvanced / College Level
Equation of stateVan der Waals equation with given a, bVirial expansion, Redlich–Kwong, Peng–Robinson equations
Phase behaviorQualitative: gases liquefy at high P, low TCritical constants, reduced properties, law of corresponding states
Molecular interactionsLDF, dipole–dipole, H-bonding qualitative rankingLennard-Jones potential, statistical mechanics partition functions
Z interpretationZ < 1 or Z > 1 relative to idealBoyle temperature, fugacity, activity coefficients

One particularly elegant advanced concept is the Boyle temperature — the temperature at which the attractive and repulsive corrections exactly cancel for a given gas, making Z ≈ 1 over a wide pressure range. At this temperature the gas mimics ideal behavior despite having real intermolecular forces, a beautiful example of how competing effects can produce apparent simplicity. For now, the key insight to carry forward is that every equation of state is a model, and the art of physical chemistry lies in choosing the model whose assumptions best match the conditions of interest.

Practice Problems

1
Which of the following changes would cause a real gas to behave MOST like an ideal gas?
2
Calculate the compressibility factor Z for a gas if 2.00 mol occupies 5.00 L at 350 K and 10.0 atm.
3
Using the van der Waals equation, calculate the pressure exerted by 1.00 mol of N₂ in a 1.00 L container at 500 K. For N₂: a = 1.390 L²·atm/mol², b = 0.0391 L/mol.
PROBLEM 4APPLIED
A chemist stores three gases — He, CO₂, and NH₃ — in identical 2.00 L steel cylinders at 200 K and measures the internal pressure of each. (a) Rank the three gases from least deviation to greatest deviation from ideal behavior at these conditions. Justify your ranking using intermolecular force arguments. (3 points) (b) For the gas showing the greatest deviation, would the measured pressure be higher or lower than the pressure predicted by PV = nRT? Explain which van der Waals correction term dominates and why. (3 points) (c) Describe two changes to the experimental conditions (without changing the gas identity) that would reduce the deviation from ideality for NH₃. Explain each. (2 points) (d) If the chemist heats all three cylinders to 1000 K and reduces the amount of gas to 0.10 mol in each cylinder, predict what happens to Z for each gas and explain. (2 points)
PROBLEM 5CRITICAL THINKING
A student measures Z for an unknown gas at 300 K over a range of pressures and records the following data: P (atm): 1, 50, 150, 300, 500, 800 Z: 0.998, 0.92, 0.80, 0.78, 0.95, 1.20 (a) Sketch a qualitative graph of Z vs. P and identify the pressure region where intermolecular attractions dominate and the region where molecular volume effects dominate. (2 points) (b) Based on the data, estimate the pressure at which Z reaches a minimum. What is the physical significance of this minimum? (2 points) (c) The student hypothesizes the unknown gas is either Ne (a = 0.211, b = 0.0171) or Cl₂ (a = 6.49, b = 0.0562). Which identification is more consistent with the data? Justify using the magnitude of deviation and the van der Waals constants. (3 points) (d) Predict how the Z vs. P curve would change if the experiment were repeated at 600 K. Explain your reasoning. (2 points)
Varsity Tutors • AP Chemistry • Deviation from Ideal Gas Law