Thermodynamics
Gibbs Free Energy
The energy free to do work — and the arbiter of spontaneity at constant T and P: G = H − TS
Gibbs free energy G = H − TS is the thermodynamic potential whose change predicts the direction of a process held at constant temperature and pressure: it runs spontaneously when ΔG < 0, sits at equilibrium when ΔG = 0, and its decrease −ΔG sets the maximum non-expansion work you can extract. Here H is enthalpy, T is absolute temperature (K), and S is entropy. Introduced by J. Willard Gibbs in his 1876–1878 memoir "On the Equilibrium of Heterogeneous Substances," it is the single most-used quantity in chemical thermodynamics, connecting enthalpy, entropy, and the equilibrium constant through ΔG = ΔG° + RT ln Q.
- DefinitionG = H − TS = U + PV − TS
- Spontaneity (const T, P)ΔG < 0 spontaneous · ΔG = 0 equilibrium
- Temperature splitΔG = ΔH − TΔS
- CompositionΔG = ΔG° + RT ln Q
- Equilibrium constantΔG° = −RT ln K
- Maximum useful workw_non-exp,max = −ΔG
- R (gas constant)8.314 J/(mol·K); RT = 2.48 kJ/mol at 298 K
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
What Gibbs free energy is
Gibbs free energy is a thermodynamic potential — a state function built so that its minimum marks equilibrium under the conditions a chemist actually controls: fixed temperature and fixed pressure. It is defined as
G = H − TS = U + PV − TS
where each symbol carries specific units:
- G — Gibbs free energy (J, or J/mol for molar quantities)
- H — enthalpy, H = U + PV (J)
- U — internal energy (J)
- P — pressure (Pa); V — volume (m³)
- T — absolute temperature (K) — never °C
- S — entropy (J/K)
The name is precise: of the total enthalpy H, the amount free to do useful work is G, because the quantity TS is energy that must remain "bound" as thermal agitation and cannot be marshalled into ordered work. Gibbs originally called it the "available energy"; the letter G and the name "Gibbs energy" are the modern IUPAC standard.
Why constant T and P is the whole point
Different thermodynamic potentials are minimized under different constraints. The choice is not arbitrary — each is the natural potential for a particular set of held-fixed variables:
| Potential | Definition | Minimized at equilibrium when you hold constant… |
|---|---|---|
| Internal energy U | U | S and V |
| Enthalpy H | U + PV | S and P |
| Helmholtz free energy F (or A) | U − TS | T and V |
| Gibbs free energy G | U + PV − TS | T and P |
Because a flask open to the lab is at essentially constant atmospheric pressure and, in a thermostatted bath, constant temperature — and a living cell is at ~310 K and ~1 atm — G is the potential that governs the overwhelming majority of chemistry and biochemistry. Its differential form makes this concrete:
dG = V dP − S dT + Σ μ_i dn_i
Here μ_i is the chemical potential of species i (μ_i = ∂G/∂n_i) and n_i is its amount (mol). At constant T and P the first two terms vanish, leaving dG = Σ μ_i dn_i — the engine that drives reactions and phase changes toward the composition of lowest G.
The spontaneity criterion, derived
Why is ΔG < 0 the test for a spontaneous change? It is the second law in disguise. The second law demands that the entropy of the universe never decreases:
ΔS_universe = ΔS_system + ΔS_surroundings ≥ 0
At constant T and P, heat rejected to the surroundings equals the system's enthalpy change with a sign flip, so ΔS_surroundings = −ΔH/T. Substituting:
ΔS_universe = ΔS − ΔH/T ≥ 0 ⟹ ΔH − TΔS ≤ 0 ⟹ ΔG ≤ 0
Multiplying through by −T (which flips the inequality) gives exactly ΔG = −T·ΔS_universe. So a negative ΔG is not a loophole in the second law — it is the second law, rewritten using only quantities you can measure on the system itself. The three cases:
| Sign of ΔG (const T, P) | Direction | Equilibrium status |
|---|---|---|
| ΔG < 0 | Forward process is spontaneous (exergonic) | Not yet at equilibrium |
| ΔG = 0 | No net change | At equilibrium — G is at its minimum |
| ΔG > 0 | Reverse process is spontaneous (forward is endergonic) | Not yet at equilibrium |
The tug-of-war: enthalpy versus entropy
Splitting G into its pieces gives the most useful working form:
ΔG = ΔH − TΔS
Two opposing tendencies compete. Nature "wants" to lower energy (ΔH < 0, exothermic) and to raise entropy (ΔS > 0). Temperature is the referee, scaling how much the entropy term counts. The four sign combinations tell the whole story:
| ΔH | ΔS | ΔG = ΔH − TΔS | Example |
|---|---|---|---|
| − (exothermic) | + (more disorder) | Always < 0 — spontaneous at all T | 2 H₂O₂ → 2 H₂O + O₂ (peroxide decomposition) |
| + (endothermic) | − (more order) | Always > 0 — never spontaneous | Ozone synthesis 3 O₂ → 2 O₃ |
| − (exothermic) | − (more order) | < 0 only at low T | Water freezing below 0 °C |
| + (endothermic) | + (more disorder) | < 0 only at high T | CaCO₃ → CaO + CO₂ (limestone → lime) |
The last two rows have a crossover temperature where ΔG = 0, found by setting ΔH = TΔS:
T_crossover = ΔH / ΔS
For calcium carbonate decomposition, ΔH° ≈ +178 kJ/mol and ΔS° ≈ +161 J/(mol·K), so T_crossover ≈ 178 000 / 161 ≈ 1105 K (≈ 832 °C). Below that, limestone is stable; above it, it decomposes — the physics behind every lime kiln and cement plant.
Composition dependence: ΔG = ΔG° + RT ln Q
The standard change ΔG° assumes every species sits in its standard state (1 bar for gases, 1 mol/L activity for solutes, the pure phase for solids/liquids). Real systems are rarely there, so the actual free-energy change depends on the current composition through the reaction quotient Q:
ΔG = ΔG° + RT ln Q
- ΔG° — standard molar free-energy change (J/mol)
- R — gas constant, 8.314 J/(mol·K)
- T — temperature (K); RT = 2.478 kJ/mol at 298.15 K
- Q — reaction quotient, the same product-over-reactant ratio as K but evaluated at the current (non-equilibrium) activities
As the reaction proceeds, Q climbs and ΔG rises toward zero. When ΔG hits zero the reaction stops advancing — that composition is equilibrium, and there Q = K. Setting ΔG = 0 gives the bridge between thermodynamics and the equilibrium constant:
0 = ΔG° + RT ln K ⟹ ΔG° = −RT ln K ⟹ K = e^(−ΔG°/RT)
A useful rule of thumb at 298 K: because RT ln 10 = 5.71 kJ/mol, every 5.7 kJ/mol of ΔG° multiplies or divides K by ten. A modest ΔG° = −34 kJ/mol already gives K ≈ 10⁶ — effectively "goes to completion."
Maximum non-expansion work
Beyond direction, G quantifies how much useful work you can extract. For a process at constant T and P,
w_non-expansion, max = −ΔG
"Non-expansion" work is everything except pushing back the atmosphere: electrical work in a galvanic cell or fuel cell, the mechanical work of a molecular motor, the chemical work driving biosynthesis. The equality holds only for a hypothetical reversible path; any real, irreversible process yields strictly less, and the difference is dissipated as extra entropy production. This is why −ΔG is a ceiling engineers can approach but never beat.
The link to electrochemistry is direct. For a cell delivering charge, ΔG = −nFE, where n is the number of electrons transferred per reaction event, F = 96 485 C/mol is Faraday's constant, and E is the cell potential (V). A hydrogen fuel cell with E° ≈ 1.23 V and n = 2 has ΔG° ≈ −237 kJ/mol of H₂O formed — precisely the standard free energy of water formation.
Where it matters: from batteries to ATP
- Batteries and fuel cells. The voltage you read on a cell is −ΔG/nF. Every rechargeable chemistry is an exercise in tuning ΔG per electron.
- Life's energy currency. ATP hydrolysis (ATP → ADP + Pᵢ) has ΔG° ≈ −30.5 kJ/mol, but under real cellular concentrations the actual ΔG is closer to −50 kJ/mol — the RT ln Q correction matters enormously. Cells drive "uphill" (ΔG > 0) reactions by coupling them to ATP hydrolysis so the sum has ΔG < 0.
- Metallurgy and materials. Ellingham diagrams plot ΔG° versus T for metal oxidation to decide which reducing agent (carbon, hydrogen, another metal) can win the free-energy contest at a given furnace temperature.
- Phase equilibria. At a phase boundary the two phases share the same molar Gibbs energy; the Clausius–Clapeyron relation falls straight out of equating chemical potentials.
- Solubility and mixing. Dissolution is spontaneous when the free energy of the dissolved state is lower — often entropy-driven even when endothermic.
Worked example: is the Haber process spontaneous?
Consider ammonia synthesis at 298 K:
N₂(g) + 3 H₂(g) → 2 NH₃(g)
Standard data: ΔH° = −92.2 kJ/mol, ΔS° = −198.7 J/(mol·K). Then
ΔG° = ΔH° − TΔS°
= (−92 200 J/mol) − (298 K)(−198.7 J/(mol·K))
= −92 200 + 59 213
= −32 990 J/mol ≈ −33.0 kJ/mol
Negative, so the reaction is thermodynamically favorable at room temperature, with
K = e^(−ΔG°/RT) = e^(33 000 / (8.314 × 298)) ≈ e^(13.3) ≈ 6 × 10⁵
Yet industrial Haber–Bosch runs at ~700 K and 150–300 bar. Why fight the thermodynamics? Because ΔS° is negative (4 gas molecules become 2), the −TΔS° penalty grows with temperature and ΔG° actually turns positive above ~460 K — but at 298 K the reaction is impossibly slow without catalysis. Engineers accept a lower K at higher T to get a workable rate, then use Le Chatelier (high pressure, favoring the fewer-mole product side) to claw back yield. It is a textbook case of thermodynamics setting the ceiling and kinetics setting the pace.
JavaScript — Gibbs free energy calculations
const R = 8.314; // J/(mol·K)
const F = 96485; // C/mol (Faraday constant)
// Free-energy change from enthalpy and entropy
// dH in J/mol, dS in J/(mol·K), T in K -> dG in J/mol
function deltaG(dH, dS, T) {
return dH - T * dS;
}
// Haber process at 298 K
console.log(`ΔG° (Haber, 298 K): ${(deltaG(-92200, -198.7, 298) / 1000).toFixed(1)} kJ/mol`); // ≈ -33.0
// Crossover temperature where ΔG = 0 (same-sign ΔH, ΔS)
function crossoverT(dH, dS) { return dH / dS; }
console.log(`CaCO₃ crossover T: ${crossoverT(178000, 161).toFixed(0)} K`); // ≈ 1106 K
// Equilibrium constant from ΔG°
function Kfromdeltag(dG0, T) { return Math.exp(-dG0 / (R * T)); }
console.log(`K (ΔG° = -33 kJ/mol, 298 K): ${Kfromdeltag(-33000, 298).toExponential(2)}`); // ≈ 6.2e5
// Actual ΔG at a given reaction quotient Q
function actualDeltaG(dG0, Q, T) { return dG0 + R * T * Math.log(Q); }
// A reaction with positive ΔG° can still run forward if Q is tiny:
console.log(`ΔG (ΔG°=+5 kJ, Q=1e-3, 298 K): ${(actualDeltaG(5000, 1e-3, 298) / 1000).toFixed(1)} kJ/mol`); // ≈ -12.1
// Free energy from cell potential: ΔG = -nFE
function deltaGfromCell(n, E) { return -n * F * E; }
console.log(`ΔG° (H₂ fuel cell, n=2, E=1.23 V): ${(deltaGfromCell(2, 1.23) / 1000).toFixed(0)} kJ/mol`); // ≈ -237
Common mistakes
- Using ΔG° to predict direction. Only the actual ΔG (which includes RT ln Q) tells you which way a system runs right now. A reaction with ΔG° > 0 still proceeds forward if Q is small enough.
- Forgetting kelvin. In ΔG = ΔH − TΔS the temperature must be absolute. Plugging in Celsius silently corrupts the entropy term.
- Unit mismatch on ΔS. ΔS is typically tabulated in J/(mol·K) while ΔH is in kJ/mol. Convert one before subtracting, or you will be off by 1000.
- Confusing "spontaneous" with "fast." ΔG governs thermodynamics, not kinetics. Diamond → graphite has ΔG < 0 yet takes geological time; ΔG says nothing about the activation barrier.
- Thinking exothermic means spontaneous. Endothermic reactions (ΔH > 0) are routinely spontaneous when TΔS > ΔH — dissolving ammonium nitrate is the classic cold-pack example.
- Treating −ΔG as achievable work in practice. −ΔG is the reversible maximum; every real device delivers less, with the balance lost to entropy production.
- Mixing up G and F. Gibbs (G = H − TS) is for constant T and P; Helmholtz (F = U − TS) is for constant T and V. They coincide only when PV is unchanged.
Frequently asked questions
What is Gibbs free energy in simple terms?
Gibbs free energy G = H − TS is the portion of a system's energy that is free to do useful work at constant temperature and pressure. H is enthalpy, T is absolute temperature in kelvin, and S is entropy. The TS term subtracts off the energy that must stay tied up as thermal disorder. Because most chemistry and biology happen at fixed T and P (a beaker on a bench, a cell at 310 K), G is the go-to potential: a change proceeds spontaneously in the direction that lowers G.
Why does a reaction go forward when ΔG is negative?
At constant T and P the second law requires the total entropy of system plus surroundings to increase. It can be shown that ΔS_total = −ΔG/T, so ΔG < 0 is exactly equivalent to ΔS_total > 0. A negative ΔG therefore does not violate the second law — it is the second law rewritten in system-only variables. The reaction runs until G reaches its minimum, where ΔG = 0 and the system sits at equilibrium.
What is the difference between ΔG and ΔG°?
ΔG° is the standard free-energy change: the value when every reactant and product is in its standard state (1 bar partial pressure for gases, 1 mol/L activity for solutes, pure substance for solids and liquids). ΔG is the actual free-energy change at the real, current composition. They are linked by ΔG = ΔG° + RT ln Q, where Q is the reaction quotient. Only ΔG (not ΔG°) tells you which way a system runs right now; a reaction with positive ΔG° can still go forward if Q is small enough.
How is Gibbs free energy related to the equilibrium constant K?
At equilibrium ΔG = 0 and Q = K, so 0 = ΔG° + RT ln K, giving ΔG° = −RT ln K, or equivalently K = exp(−ΔG°/RT). A large negative ΔG° means K ≫ 1 (products favored); a large positive ΔG° means K ≪ 1 (reactants favored). At 298 K, RT = 2.48 kJ/mol, so every 5.7 kJ/mol of ΔG° shifts K by a factor of ten.
Can a reaction with positive ΔH still be spontaneous?
Yes. Because ΔG = ΔH − TΔS, an endothermic reaction (ΔH > 0) is spontaneous whenever the entropy gain is large enough that TΔS > ΔH. Dissolving ammonium nitrate in water is endothermic yet spontaneous — it feels cold because it absorbs heat, driven by the entropy increase of ions dispersing. Melting ice above 0 °C and evaporation are other everyday entropy-driven examples.
What does −ΔG being the maximum work actually mean?
At constant T and P, the decrease in Gibbs free energy equals the maximum non-expansion work a process can deliver: w_non-exp,max = −ΔG (equality holds only for a reversible path). 'Non-expansion' means work other than pushing back the atmosphere — electrical work in a battery or fuel cell, mechanical work by a muscle protein, chemical work in ATP hydrolysis. Any real, irreversible process delivers strictly less than −ΔG, with the shortfall dissipated as extra entropy.
Why does temperature flip the sign of ΔG for some reactions?
In ΔG = ΔH − TΔS the entropy term is weighted by temperature. If ΔH and ΔS have the same sign, there is a crossover temperature T = ΔH/ΔS where ΔG changes sign. For CaCO₃ → CaO + CO₂, ΔH ≈ +178 kJ/mol and ΔS ≈ +161 J/(mol·K), so ΔG turns negative above about 1105 K (≈832 °C) — which is why lime kilns must run hot to decompose limestone.