Le Châtelier’s Principle and Equilibrium Simulator
Stress a gas equilibrium and watch it shift: add or remove gas, squeeze the piston, heat it, or add argon or a catalyst, with K from NIST-JANAF data.
Simulator
Drag the piston to change the volume. With the scene focused, the arrow keys move it 0.5 L. Space plays and pauses.
N₂O₄(g) ⇌ 2NO₂(g) at 298 K in 10 L: 0.1 mol N₂O₄, 0 mol NO₂. Q < K, shifts right.
Q against K
- Direction Below K the forward reaction is faster and products form; above K the reverse is faster (AP Chemistry 7.7.A.2).
- Q < K, shifts right
- Q Qp: the same expression as Kp with the partial pressures of this moment, in bar. With concentrations, Qc is 0.
- 0 bar
- K at 298 K Kp from the NIST-JANAF log Kf rows, standard state 1 bar, with ln K interpolated linearly in 1/T between them (van ’t Hoff). With pressures in atm it is 0.145.
- 0.147 bar
The mixture
- N₂O₄ dissociated Of all the N₂O₄ the mixture could hold, the share that is NO₂.
- 0 %
- Total pressure Every gas in the cylinder, argon included, by PV = nRT.
- 0.2445 atm 0.2478 bar
- Volume
- 10 L piston fixed
- Brown NO₂ The color’s depth follows the concentration of the colored gas across the cylinder.
- 0 mol/L
K, rates and energy
- Kc Kp = Kc(RT)^Δn with Δn = 1 (OpenStax 13.2), and R = 0.083145 L·bar/(mol·K).
- 0.00593 mol/L
- Forward ÷ reverse rate K/Q, since kf/kr = Kc. Above 1 the forward reaction is faster; at equilibrium the two are equal (AP Chemistry 7.2.A.1).
- ∞
- ΔG° = −RT ln K Negative when K > 1 (AP Chemistry 9.5).
- +4.753 kJ/mol
- ΔH° at 298 K Σν ΔfH° from the same tables, per mole of reaction as written.
- +57.11 kJ endothermic
More on the model
K at each temperature is exact thermodynamics: log Kp = Σν log Kf(products) − Σν log Kf(reactants), from the log Kf column of the NIST-JANAF tables, standard state 1 bar. Between the tables’ rows, mostly 50 or 100 K apart, ln K is interpolated linearly in 1/T, which is the van ’t Hoff equation with ΔH° constant over the span. Every gas is ideal, and none condenses.
Each new equilibrium is solved exactly; with the piston fixed it is the ICE table calculator’s own solver. The path there is mass-action relaxation, dξ/dt = V(kf Π[R]^ν − kr Π[P]^ν) with kr = kf/Kc, on model time. The rate constants are illustrative: near each equilibrium the gap between Q and K shrinks by a factor of e every 0.5 to 4.5 s of model time, so the end states are exact and the speed is not. The catalyst multiplies kf and kr by 8.
- log₁₀ Q
- log₁₀ K
Cite this tool
Citing this tool
Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.
The equation
NIST-JANAF Thermochemical Tables (Chase 1998), with OpenStax Chemistry 2e 13.3
What does Le Châtelier’s principle predict?
Stress a mixture at equilibrium and it shifts in the direction that undoes part of the stress. Add a reactant and more product forms; squeeze a gas mixture and it shifts toward the side with fewer moles of gas; heat an endothermic reaction and it runs forward. The AP Chemistry course lists the stresses as adding or removing a species, changing the temperature, changing the volume or pressure of a gas-phase system, and dilution (topic 7.9).
The simulator runs four gas-phase reactions in a cylinder under a piston, works out the new equilibrium exactly after each stress, and plays the mixture’s path there. The particle count tracks the moles, one dot per 0.0025 mol on N₂O₄ and per 0.025 or 0.05 mol on the others, which is the particulate picture of topic 7.8. Each gas stops at 240 dots’ worth.
What to try
- Squeeze the brown gas. The N₂O₄ ⇌ 2NO₂ preset holds 0.1 mol of N₂O₄, and at 298 K in 10 L, 31.8 percent of the N₂O₄ has dissociated. Drag the piston down to 5 L. [NO₂] doubles at once, from 0.00636 to 0.0127 mol/L, so the gas turns darker, and Q is twice K. The mixture then shifts left, toward one mole of gas, and [NO₂] falls back to 0.00951 mol/L, still darker than before; 23.8 percent stays dissociated.
- Heat it. The reaction is endothermic, ΔH° = +57.1 kJ, so heating raises K. From 298 to 350 K, Kp rises from 0.147 to 4.49 and the dissociated share from 31.8 to 82.4 percent.
- Run the Haber process. N₂ + 3H₂ ⇌ 2NH₃ at 700 K in 2 L yields 32.4 percent of the ammonia the reactants could make, at 96.3 atm. Halve the volume and the yield rises to 44.1 percent; cool to 600 K instead and it rises to 54.8 percent. Add 1 mol of N₂ and the ammonia rises from 0.647 to 0.815 mol.
- Try Δn = 0. H₂ + I₂ ⇌ 2HI has two moles of gas on each side. Change the volume and every partial pressure changes by the same factor, Q stays equal to K, and the mole fractions stay where they were.
- Add argon both ways. With the piston fixed, argon raises the total pressure and leaves every partial pressure alone, so nothing shifts. Free the piston and add argon: the cylinder grows to hold its pressure, the reacting gases spread out, and the mixture shifts toward more moles of gas. On the Haber mixture, 1 mol of argon at constant pressure takes the cylinder from 2 to 2.60 L at once and to 2.65 L as it settles, and the ammonia down from 0.647 to 0.556 mol.
- Switch the catalyst on and stress the mixture again. It arrives at the same equilibrium, sooner.
Play runs model time, and the scene pauses itself two seconds after the Direction readout says Q = K. Step moves it half a second, and Skip to end lands on the end state at once. With reduced motion on, every stress jumps straight to its new equilibrium. The share link keeps the reaction, the conditions and the mixture at the last stress, after the # in its address.
Q against K: which way the mixture runs
The reaction quotient Q has the same form as K, with the partial pressures or concentrations of the moment in place of the equilibrium ones: for aA + bB ⇌ cC + dD, Qp = (PC)c(PD)d / (PA)a(PB)b. A stress pushes Q away from K, and the mixture responds by bringing Q back to K (AP Chemistry 7.10.A.1). With Q below K the forward reaction runs faster than the reverse and products form; with Q above K the reverse is faster (AP Chemistry 7.7.A.2). The bar under the plot puts Q and K on one log scale, with an arrow for the way the mixture is about to move.
The rate picture says the same thing. For a mixture that relaxes by mass action, the forward rate divided by the reverse rate equals K/Q, so the two rates are equal exactly when Q equals K, which is what makes the equilibrium dynamic (AP Chemistry 7.1.A.3 and 7.2.A.1). The Forward ÷ reverse readout gives that ratio.
Concentration and volume change Q; temperature changes K
Adding or removing a species changes Q only, and the mixture shifts until Q is back at the same K. A change of volume at constant temperature scales every partial pressure by V₀/V, which multiplies Q by (V₀/V)Δn, where Δn is the moles of gas on the right minus the left. Halving the volume of N₂O₄ ⇌ 2NO₂, where Δn = 1, makes Q = 2K; for Δn = 0 it leaves Q alone (OpenStax 13.3). A temperature change is the one stress that moves K itself (AP Chemistry 7.10.A.2): heating raises K for an endothermic reaction and lowers it for an exothermic one. The log₁₀ Q and K plot under the stage shows both kinds: Q jumping away from a flat K, or K stepping to a new value with Q following it.
Inert gas and catalysts
Adding an inert gas at constant volume does not shift the equilibrium, because the partial pressures of the gases in Q do not change (LibreTexts). At constant pressure the same gas makes the cylinder grow, which lowers every reacting partial pressure as an expansion would, so a reaction with Δn ≠ 0 shifts toward more moles of gas. A catalyst lowers the activation energy of the forward and reverse reactions alike, so equilibrium is reached sooner with no change in K (OpenStax 13.3).
Where K comes from
Each K is computed from the NIST-JANAF thermochemical tables, which list log Kf, the log of the equilibrium constant for forming a species from its elements, at temperatures mostly 50 or 100 K apart, with a standard state of 1 bar. For a reaction, log Kp = Σν log Kf(products) − Σν log Kf(reactants), so for N₂O₄ ⇌ 2NO₂ at 298.15 K, log Kp = 2(−8.980) − (−17.132) = −0.828 and Kp = 0.149. The Haber Kp is 105.734 = 5.4 × 10⁵ bar⁻² at 298.15 K and 10−4.058 = 8.7 × 10⁻⁵ bar⁻² at 700 K. Between rows the simulator interpolates ln K linearly in 1/T, which is the van ’t Hoff equation with ΔH° constant over the span.
Kc follows from Kp = Kc(RT)Δn (OpenStax 13.2), here with R = 0.083145 L·bar/(mol·K) to match the tables’ 1 bar standard state. The same tables give ΔH° = 2(33.095) − 9.079 = 57.11 kJ for N₂O₄ ⇌ 2NO₂ at 298.15 K, against the 57.20 kJ OpenStax quotes, and −91.80 kJ for the Haber reaction, against OpenStax’s −92.2 kJ. For hydrogen iodide, OpenStax uses Kc = 50.0 at 400 °C; the tables give 61.7 at 673.15 K.
What the model leaves out
Every gas is ideal, so partial pressures follow PV = nRT; at the Haber process’s 150 to 250 atm (OpenStax 13.3) real gases depart from that. None of these reactions is a single elementary step, and the simulator has no measured rate constants: the path after a stress follows the rate law of an elementary step, dξ/dt = V(kf Π[R]ν − kr Π[P]ν) with kr = kf/Kc, with kf scaled so that near each new equilibrium the gap between Q and K shrinks by a factor of e every 0.5 to 4.5 s of model time. The end states are exact; the speed is illustrative. The piston stops at 0.5 L and 20 L.
No gas condenses in the model, so each preset opens below every gas’s vapor pressure. Liquid N₂O₄ has a vapor pressure of 0.897 bar at 298.15 K by the NIST-JANAF tables (log Kf −17.085 for the liquid, −17.132 for the gas), which is why the preset holds 0.1 mol, 0.169 bar of N₂O₄ at equilibrium, rather than 1 mol. Ammonia cannot liquefy above its critical temperature of 405.4 K, where the Haber preset’s range starts, and the HI preset starts at 550 K, above the temperatures where its iodine would condense. A hard squeeze can still pass a vapor pressure, and the model keeps the gas.
Sources
- College Board, AP Chemistry Course and Exam Description, effective fall 2024, Unit 7, topics 7.1 to 7.10.
- Flowers, Theopold, Langley and Robinson, Chemistry 2e, OpenStax, 2019, sections 13.2 Equilibrium Constants and 13.3 Shifting Equilibria: Le Châtelier’s Principle.
- Chase, NIST-JANAF Thermochemical Tables, 4th ed., J. Phys. Chem. Ref. Data Monograph 9, 1998, tables N-007 Nitrogen Oxide (NO2), N-032 Nitrogen Oxide (N2O4), H-083 Ammonia (NH3), H-005 Hydrogen Iodide (HI), I-027 Iodine (I2), O-034 Sulfur Dioxide (SO2), O-058 Sulfur Trioxide (SO3).
- Chase, NIST-JANAF table N-031 Nitrogen Oxide (N2O4), liquid, for its vapor pressure; and NIST Chemistry WebBook, Ammonia, phase change data, for its critical temperature (Brunner, 1988).
- LibreTexts Chemistry, Le Chatelier’s Principle Fundamentals, for an inert gas at constant volume.
H₂, N₂ and O₂ are elements in their reference states, whose log Kf is zero at every temperature. Every figure on this page is the simulator’s own output for the conditions named. The drawings are this site’s own.
Model and assumptions
The method, what it assumes and how accurate it is
- Method
- Exact expression, no time stepping
- Repeatability
- Deterministic. The same link gives the same numbers on any machine.
What it assumes
- K at each temperature is log Kp = Σν log Kf(products) − Σν log Kf(reactants) from the NIST-JANAF tables’ log Kf column, standard state 1 bar, with ln K interpolated linearly in 1/T between the tables’ rows, the van ’t Hoff equation over each span, mostly 50 or 100 K.
- Every gas is ideal: partial pressures follow PV = nRT, and Kc = Kp(RT/P°)^(−Δn) with R = 0.083145 L·bar/(mol·K).
- Each equilibrium is solved exactly: with the piston fixed by the ICE table calculator’s own solveEquilibrium on concentrations, with it free by bisection on the extent at the pressure the piston holds.
- The path between equilibria is mass-action relaxation of an elementary step, dξ/dt = V(kf Π[R]^ν − kr Π[P]^ν) with kr = kf/Kc, stepped by implicit Euler at 0.02 s of model time. kf has no measured value: it is scaled so that near each equilibrium the gap between Q and K shrinks by a factor of e every 0.5 to 4.5 s, so the speed is illustrative, and the catalyst multiplies kf and kr by 8.
- No gas condenses. Each preset opens below every gas’s vapor pressure: N₂O₄ at 0.1 mol in 10 L against the liquid’s 0.897 bar at 298.15 K (NIST-JANAF N-031 against N-032), ammonia only above its 405.4 K critical temperature (NIST Chemistry WebBook), and the HI mixture from 550 K. A hard squeeze can still pass a vapor pressure.
Where it stops holding. At high pressure, where real gases depart from PV = nRT: the Haber process runs at 150 to 250 atm (OpenStax 13.3). And for timing, since none of these reactions is a single elementary step and the model has no measured rate constants. The ICE Table Calculator is the right tool there.
Numerical accuracy
No method error to report: the result is a closed-form expression evaluated directly, with no time stepping to accumulate error. What remains is double-precision rounding, of order one part in 10^16 per operation.
Constants used: Molar gas constant (R).
Common questions
What is Le Châtelier’s principle?
If a system at equilibrium is stressed, it shifts in the direction that relieves part of the stress and re-establishes equilibrium (OpenStax 13.3). AP Chemistry lists the stresses as adding or removing a species, changing the temperature, changing the volume or pressure of a gas, and dilution. In the simulator, adding 1 mol of N₂ to the Haber mixture at 700 K in 2 L raises the ammonia from 0.647 to 0.815 mol: some of the added N₂ reacts away, and the rest stays.
How do Q and K tell you which way a reaction shifts?
Compare them. Q has the same form as K but uses the amounts of the moment. With Q below K the forward reaction is faster and products form; with Q above K the reverse is faster; at Q = K the two rates are equal and nothing changes on balance (AP Chemistry 7.7.A.2). Halving the volume of N₂O₄ ⇌ 2NO₂ makes Q twice K the instant after, so the mixture shifts left.
Why does compressing N₂O₄ and NO₂ make the gas darker and then lighter?
Squeezing the gas into half the volume doubles every concentration, brown NO₂ included, so the color deepens at once. That makes Q = 2K, and the mixture shifts toward N₂O₄, the side with fewer moles of gas, which uses up some NO₂. With 0.1 mol of N₂O₄ at 298 K squeezed from 10 to 5 L, [NO₂] jumps from 0.00636 to 0.0127 mol/L and settles at 0.00951 mol/L, lighter than right after the squeeze but darker than before it.
Does adding an inert gas shift an equilibrium?
Not at constant volume: argon raises the total pressure but leaves the partial pressures of the reacting gases, and so Q, unchanged. At constant pressure the container has to grow to make room for it, which lowers every reacting partial pressure as an expansion would, so a reaction with different moles of gas on each side shifts toward the side with more. On the Haber mixture at 700 K, 1 mol of argon at constant pressure takes the cylinder from 2 to 2.60 L at once and to 2.65 L as it settles, and the ammonia down from 0.647 to 0.556 mol. For H₂ + I₂ ⇌ 2HI, with two moles of gas each side, neither way shifts it.
Why does temperature change K when concentration does not?
K depends only on temperature: it is set by the standard free energy change, ΔG° = −RT ln K, so adding a reactant or changing the volume moves Q while K stays put. Heating raises K for an endothermic reaction and lowers it for an exothermic one. From the NIST-JANAF tables, Kp for N₂O₄ ⇌ 2NO₂ (ΔH° = +57.1 kJ) rises from 0.147 at 298 K to 4.49 at 350 K, and the Haber Kp (ΔH° = −91.8 kJ) falls from 5.4 × 10⁵ bar⁻² at 298.15 K to 8.7 × 10⁻⁵ bar⁻² at 700 K.
Does a catalyst shift the equilibrium?
No. A catalyst lowers the activation energy of the forward and reverse reactions alike, so both speed up and the mixture reaches equilibrium sooner, with K unchanged (OpenStax 13.3). In the simulator the catalyst multiplies both rate constants by 8, and the end state after any stress is the same to the last digit with it or without it.