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.

AP Chemistry illustration with a laboratory flask, atom, and microscope
Inside this lesson 9 sections 5 questions 8 figures

SECTION 1

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.

SECTION 2

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.

SECTION 3

Visualizing Ideal vs. Real Gas Behavior

Compressibility Factor Z vs. PressurePressure (atm) →Z = PV / nRT02004006008000.40.60.81.01.21.4Z = 1 (Ideal)N₂ (min Z)CO₂ (stronger IMFs)H₂ (weak IMFs)N₂CO₂H₂Z < 1 → attractions dominate
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.

SECTION 4

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=nRTPV = nRT

P = pressure (atm), V = volume (L), n = moles, R = 0.08206 L·atm/(mol·K), T = temperature (K)

VAN DER WAALS EQUATION

(P+an2/V2)(V−nb)=nRT(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 = 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

SECTION 5

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.

Conditions Favoring Ideal vs. Non-Ideal BehaviorIDEAL (Z ≈ 1)✓ Low pressure✓ High temperature✓ Small, nonpolar molecules✓ Weak IMFs (e.g., He, Ne)Molecules far apart, fast-movingNON-IDEAL (Z ≠ 1)✗ High pressure✗ Low temperature✗ Large, polar molecules✗ Strong IMFs (e.g., NH₃, H₂O)Molecules close, slow, interacting← Arrow of increasing ideality Arrow of increasing deviation →
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.
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

Van der Waals constants for selected gases. Larger a → stronger IMFs → greater deviation.

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.

SECTION 6

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.

Worked example

  1. 1

    Step 1 — Ideal Gas Calculation

    Using 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. 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. 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. 4

    Step 4 — Van der Waals Pressure

    Rearranging (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. 5

    Step 5 — Interpret the Difference

    The 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

SECTION 7

Strengths and Limitations of Each Model

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)

Comparison of the ideal gas law and the van der Waals equation.

★

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.

SECTION 8

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.

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

How AP-level real gas concepts connect to advanced physical chemistry.

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.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Which of the following changes would cause a real gas to behave MOST like an ideal gas?
  • A. Decreasing the temperature at constant pressure
  • B. Increasing the pressure at constant temperature
  • C. Increasing the temperature and decreasing the pressure
  • D. Replacing N₂ with NH₃ under the same conditions
Show answer (C)
C is correct. Increasing temperature raises molecular kinetic energy so that intermolecular attractions become negligible, and decreasing pressure increases the average distance between molecules so that finite molecular volume is insignificant relative to the container. Both changes push the gas toward ideal behavior. A is wrong because lower temperature strengthens the relative importance of IMFs. B is wrong because higher pressure crowds molecules together, amplifying both volume and attraction effects. D is wrong because NH₃ has stronger intermolecular forces (H-bonding) than N₂ (LDF only), producing more deviation from ideality.

Question 2: BASIC CALCULATION

Calculate the compressibility factor Z for a gas if 2.00 mol occupies 5.00 L at 350 K and 10.0 atm.
  • A. 0.872
  • B. 1.00
  • C. 1.15
  • D. 0.500
Show answer (A)
A is correct. Z = PV/(nRT) = (10.0 atm)(5.00 L) / [(2.00 mol)(0.08206 L·atm·mol⁻¹·K⁻¹)(350 K)] = 50.0 / 57.4 = 0.871, which rounds to 0.872. Since Z < 1, intermolecular attractions dominate at these conditions. B (Z = 1.00) would apply to a perfectly ideal gas. C (Z > 1) would indicate molecular volume dominance, which is inconsistent with the calculated value. D is far too low and would imply extreme non-ideality inconsistent with these moderate conditions.

Question 3: INTERMEDIATE

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.
  • A. 41.0 atm
  • B. 41.3 atm
  • C. 38.2 atm
  • D. 44.7 atm
Show answer (B)
B is correct. The van der Waals equation is P = nRT/(V − nb) − an²/V². Given n = 1.00 mol, T = 500 K, V = 1.00 L, a = 1.390 L²·atm/mol², and b = 0.0391 L/mol, first calculate the volume correction: V − nb = 1.00 − (1.00)(0.0391) = 0.9609 L. Next, calculate the repulsion-corrected pressure term: nRT/(V − nb) = (1.00)(0.08206)(500)/(0.9609) = 41.03/0.9609 = 42.70 atm. Then calculate the attraction correction: an²/V² = (1.390)(1.00)²/(1.00)² = 1.390 atm. Finally, subtract: P = 42.70 − 1.39 = 41.3 atm. Choice A (41.0 atm) is the ideal gas value obtained from PV = nRT, which neglects both corrections. Choice C (38.2 atm) significantly underestimates the pressure. Choice D (44.7 atm) overestimates the pressure, as would occur if the attraction correction were added rather than subtracted.

Question 4: APPLIED

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)
Show answer
Sample response: (a) Ranking from least to greatest deviation: He < CO₂ < NH₃. Helium is a noble gas with only very weak London dispersion forces (2 electrons, tiny polarizability). CO₂ is nonpolar overall but has 22 electrons, giving it substantially stronger LDF than He. NH₃ is polar and can hydrogen bond, giving it the strongest intermolecular attractions and the greatest deviation at 200 K. (b) For NH₃, the measured pressure would be lower than PV = nRT predicts. At 200 K, molecules move slowly enough that attractive forces (H-bonds, dipole–dipole) significantly reduce the frequency and force of wall collisions. The a correction (an²/V²) dominates over the b correction because at moderate density the attractive potential energy exceeds the volume exclusion effect. (c) First, raising the temperature increases molecular KE so molecules overcome attractive forces more easily, reducing deviation. Second, decreasing the amount of gas (lowering n/V) increases the average distance between molecules, making IMFs negligible. (d) At 1000 K with only 0.10 mol in 2.00 L, all three gases have very high kinetic energy and very low molar density. Z approaches 1.00 for all three because thermal energy dwarfs intermolecular potential energy, and the combined molecular volume is negligible compared to 2.00 L.

Question 5: CRITICAL 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)
Show answer
Sample response: (a) The graph starts near Z = 1 at low P, dips below 1 in the 50–500 atm range (reaching a minimum around 300 atm), then rises above 1 at 800 atm. The region from approximately 50–500 atm is dominated by intermolecular attractions (Z < 1), while above ~500 atm molecular volume effects dominate (Z > 1). (b) The minimum Z ≈ 0.78 occurs near 300 atm. At this pressure, the net reduction in pressure due to intermolecular attractions is at its maximum relative to the ideal prediction. Beyond this point, as molecules are compressed further, the excluded volume correction begins to outpace the attraction correction. (c) The unknown gas is Cl₂. The deep minimum (Z = 0.78, a 22% deviation) requires strong intermolecular attractions; Cl₂ has a = 6.49 L²·atm/mol², which is over 30 times larger than Ne's a = 0.211. Ne would show only a very shallow dip in Z — perhaps to 0.98 — because its weak LDF produce negligible attraction corrections. Additionally, Cl₂'s larger b (0.0562 vs. 0.0171) explains the rapid rise of Z above 1 at high pressures. (d) At 600 K, the Z vs. P curve would be flatter, with a shallower minimum closer to Z = 1. Higher temperature means greater average kinetic energy, so molecules spend less time under the influence of attractive forces. The crossover pressure where Z = 1 on the rising side would shift to a higher value, and the minimum Z would occur at a higher pressure as well.

Varsity Tutors • AP Chemistry • Deviation from Ideal Gas Law