Gibbs Energy of Mixing

Pour two liquids together and they mix without any push from outside. No stirring is required in principle, no heat needs to be added or removed. Why does this happen spontaneously? The answer lies in the Gibbs energy of mixing, ΔmixG\Delta_{\text{mix}}G, which is always negative for an ideal mixture at constant temperature and pressure. This quantity matters because it is the thermodynamic reason solutions exist at all. It explains why gases interdiffuse, why alloys form, and why a drop of dye spreads through water rather than staying clumped. It connects the microscopic idea of dispersal to the macroscopic criterion for spontaneous change. This article derives ΔmixG\Delta_{\text{mix}}G for an ideal mixture from the chemical potentials of the components. You will see where the negative sign comes from. Then you will see how it splits into entropy and enthalpy contributions. Finally you will see two fully worked numerical examples.

Key takeaways
  • ΔmixG=nRT(xAln⁡xA+xBln⁡xB)\Delta_{\text{mix}}G = nRT(x_A \ln x_A + x_B \ln x_B) for an ideal mixture, and this is always negative.
  • The negative sign arises because ln⁡xi<0\ln x_i < 0 for any mole fraction between 0 and 1.
  • Ideal mixing has zero enthalpy change; the entire driving force is entropic.
  • ΔmixG\Delta_{\text{mix}}G is most negative near x=0.5x = 0.5 and vanishes at the pure-component limits.
  • The same algebra you met for mixing ideal gases carries over unchanged to ideal solutions.
  • Key idea: mixing lowers Gibbs energy because spreading molecules over a larger accessible volume of composition space increases entropy, at no enthalpic cost, and ΔG=ΔH−TΔS\Delta G = \Delta H - T\Delta S then guarantees ΔmixG<0\Delta_{\text{mix}}G < 0.
The core insight

For an ideal mixture, ΔmixH=0\Delta_{\text{mix}}H = 0 and ΔmixS=−nR∑ixiln⁡xi>0\Delta_{\text{mix}}S = -nR\sum_i x_i \ln x_i > 0, so ΔmixG=nRT∑ixiln⁡xi\Delta_{\text{mix}}G = nRT\sum_i x_i \ln x_i is negative at every composition except the pure states — mixing is spontaneous purely because it multiplies the number of ways molecules can be arranged, not because any bonds get stronger.

The physical picture

Imagine two liquids, A and B, separated by a partition inside a container held at constant TT and pp. Each liquid is a pure substance with a well-defined chemical potential, μA∗\mu_A^* and μB∗\mu_B^*. When the partition is removed, the molecules of A and B intermingle. If the mixture is ideal — meaning A–A, B–B, and A–B interactions are all energetically equivalent — then no heat is exchanged in the process. The molecules do not care whether their neighbor is an A or a B. What does change is the number of accessible microscopic arrangements. Before mixing, all the A molecules are confined to one region and all the B molecules to another. After mixing, each type of molecule can be found anywhere in the combined volume. This is a purely statistical, entropic effect. It is exactly the same argument used earlier for two ideal gases expanding into a shared container: nothing energetic drives the process, but the accessible number of configurations rises enormously, so the entropy rises, and Gibbs energy falls. Because G=H−TSG = H - TS and ΔmixH=0\Delta_{\text{mix}}H = 0 for the ideal case, the sign of ΔmixG\Delta_{\text{mix}}G is dictated entirely by −TΔmixS-T\Delta_{\text{mix}}S. Since mixing always increases the entropy of two distinguishable, initially separated components, ΔmixG\Delta_{\text{mix}}G is always negative — mixing is always spontaneous for an ideal mixture, at any nonzero temperature and any intermediate composition.

Figure
Gibbs energy of mixing versus composition for one mole of an equimolar A–B system, showing the symmetric negative dip
G x_B 0 1 min at x = 0.5 ΔmixG = nRT(xA ln xA + xB ln xB) at 298 K, ΔmixG(min) ≈ −1.72 kJ per mole of mixture
Figure
Microstate picture: separated pure phases versus the mixed state, illustrating why W increases and S increases
separated: W small mixed: W much larger before mixing after mixing

The core relations

ΔmixG=nRT∑ixiln⁡xi\Delta_{\text{mix}}G = nRT\sum_i x_i \ln x_i

where: nn is total moles, RR the gas constant, TT absolute temperature, xix_i the mole fraction of component ii; the sum runs over all components.

ΔmixS=−nR∑ixiln⁡xi\Delta_{\text{mix}}S = -nR\sum_i x_i \ln x_i

where: this is always positive since each ln⁡xi<0\ln x_i < 0, and it is the sole source of the negative ΔmixG\Delta_{\text{mix}}G.

ΔmixH=0\Delta_{\text{mix}}H = 0

where: holds specifically for the ideal-mixture (or ideal-gas) approximation, where interactions between unlike and like molecules are energetically indistinguishable.

μi(mixture)=μi∗+RTln⁡xi\mu_i(\text{mixture}) = \mu_i^{*} + RT\ln x_i

where: μi∗\mu_i^{*} is the chemical potential of pure ii at the same TT and pp; this is the defining relation for an ideal mixture and the starting point of the derivation below.

Derivation AGibbs Energy of Mixing for an Ideal Mixture

Goal: starting from the chemical potentials of pure and mixed components, obtain ΔmixG=nRT∑ixiln⁡xi\Delta_{\text{mix}}G = nRT\sum_i x_i\ln x_i and show it is necessarily negative.

Step 1. Gibbs energy before mixing. Consider nAn_A moles of pure liquid A and nBn_B moles of pure liquid B, held separately at temperature TT and pressure pp. The total Gibbs energy of the unmixed system is simply the sum of the two pure Gibbs energies,

Ginitial=nAμA∗+nBμB∗G_{\text{initial}} = n_A \mu_A^{*} + n_B \mu_B^{*}

since for a pure substance G=nμ∗G = n\mu^{*}.

Step 2. Gibbs energy after mixing. For a mixture, the total Gibbs energy is the sum of niμin_i\mu_i over all components, where μi\mu_i is the chemical potential of ii in the mixture. For an ideal mixture this is defined (in exact analogy with the ideal-gas mixing result) by

μi=μi∗+RTln⁡xi.\mu_i = \mu_i^{*} + RT\ln x_i.

This says a component's chemical potential is lowered relative to its pure value by an amount that depends on how dilute it is in the mixture — the more dilute, the more negative ln⁡xi\ln x_i, the lower μi\mu_i. Substituting,

Gfinal=nA(μA∗+RTln⁡xA)+nB(μB∗+RTln⁡xB).G_{\text{final}} = n_A\left(\mu_A^{*} + RT\ln x_A\right) + n_B\left(\mu_B^{*} + RT\ln x_B\right).

Step 3. Subtract to isolate the mixing term. The Gibbs energy of mixing is defined as the difference,

ΔmixG=Gfinal−Ginitial.\Delta_{\text{mix}}G = G_{\text{final}} - G_{\text{initial}}.

The pure-component terms nAμA∗n_A\mu_A^{*} and nBμB∗n_B\mu_B^{*} appear identically in both expressions and cancel exactly, leaving

ΔmixG=nARTln⁡xA+nBRTln⁡xB.\Delta_{\text{mix}}G = n_ART\ln x_A + n_BRT\ln x_B.

Step 4. Express in terms of mole fraction and total moles. Writing nA=nxAn_A = n x_A and nB=nxBn_B = n x_B, where n=nA+nBn = n_A + n_B is the total number of moles,

ΔmixG=nRT(xAln⁡xA+xBln⁡xB).\Delta_{\text{mix}}G = nRT\left(x_A\ln x_A + x_B\ln x_B\right).

Generalizing to any number of components gives the boxed relation stated above.

Step 5. Show the sign is always negative. Because 0<xi<10 < x_i < 1 for every component actually present in a mixture, ln⁡xi\ln x_i is strictly negative for each term. Since RR, TT, and nn are all positive quantities, every term in the sum nRT xiln⁡xinRT\, x_i\ln x_i is negative, so the sum itself must be negative. There is no composition (short of a pure substance, where the process is not really mixing) at which ΔmixG\Delta_{\text{mix}}G can be positive or zero.

Step 6. Split into entropy and enthalpy. Differentiating ΔmixG\Delta_{\text{mix}}G with respect to TT at constant pp and composition, using (∂G/∂T)p=−S(\partial G/\partial T)_p = -S, gives

ΔmixS=−(∂ΔmixG∂T)p,x=−nR∑ixiln⁡xi,\Delta_{\text{mix}}S = -\left(\frac{\partial \Delta_{\text{mix}}G}{\partial T}\right)_{p,x} = -nR\sum_i x_i\ln x_i,

which is positive by the same sign argument. Because ΔmixG\Delta_{\text{mix}}G has no explicit dependence on TT beyond the prefactor TT itself, applying G=H−TSG = H - TS term by term shows

ΔmixH=ΔmixG+TΔmixS=0.\Delta_{\text{mix}}H = \Delta_{\text{mix}}G + T\Delta_{\text{mix}}S = 0.
ΔmixG=nRT∑ixiln⁡xi  <  0for all 0<xi<1\boxed{\Delta_{\text{mix}}G = nRT\sum_i x_i \ln x_i \;<\; 0 \quad\text{for all } 0<x_i<1}

Worked examples

Example 1 — Equimolar mixing of two liquids at room temperature. Take 1.00 mol of liquid A and 1.00 mol of liquid B, assumed to form an ideal mixture, at T=298 KT = 298\ \text{K}. Total moles: n=nA+nB=2.00 moln = n_A + n_B = 2.00\ \text{mol}. Mole fractions: xA=xB=0.500x_A = x_B = 0.500. Compute the entropy of mixing first:

ΔmixS=−nR(xAln⁡xA+xBln⁡xB)\Delta_{\text{mix}}S = -nR(x_A\ln x_A + x_B\ln x_B)
=−(2.00 mol)(8.314 J K−1mol−1)[(0.500)ln⁡(0.500)+(0.500)ln⁡(0.500)]= -(2.00\ \text{mol})(8.314\ \text{J K}^{-1}\text{mol}^{-1})\big[(0.500)\ln(0.500) + (0.500)\ln(0.500)\big]
=−(2.00)(8.314)[(0.500)(−0.6931)×2] J K−1= -(2.00)(8.314)\left[(0.500)(-0.6931) \times 2\right]\ \text{J K}^{-1}
=−(2.00)(8.314)(−0.6931) J K−1=11.53 J K−1.= -(2.00)(8.314)(-0.6931)\ \text{J K}^{-1} = 11.53\ \text{J K}^{-1}.

Now the Gibbs energy of mixing, using either the direct formula or ΔmixG=−TΔmixS\Delta_{\text{mix}}G = -T\Delta_{\text{mix}}S (valid since ΔmixH=0\Delta_{\text{mix}}H = 0):

ΔmixG=nRT(xAln⁡xA+xBln⁡xB)=−TΔmixS\Delta_{\text{mix}}G = nRT(x_A\ln x_A + x_B\ln x_B) = -T\Delta_{\text{mix}}S
=−(298 K)(11.53 J K−1)=−3.44×103 J=−3.44 kJ.= -(298\ \text{K})(11.53\ \text{J K}^{-1}) = -3.44\times 10^{3}\ \text{J} = -3.44\ \text{kJ}.

Sanity check: per mole of mixture, this is −3.44 kJ/2.00 mol=−1.72 kJ mol−1-3.44\ \text{kJ}/2.00\ \text{mol} = -1.72\ \text{kJ mol}^{-1}, matching the minimum labeled on the composition plot above, where the dip is deepest at x=0.5x = 0.5. The negative value confirms mixing is spontaneous, and the modest magnitude — a few kJ per mole, far smaller than a typical bond energy of hundreds of kJ per mole — confirms this is an entropic, not an energetic, effect.

Example 2 — Non-equimolar mixing and the "most negative" composition. A chemist mixes 3.00 mol of ideal liquid A with 1.00 mol of ideal liquid B at T=350 KT = 350\ \text{K}. Find ΔmixG\Delta_{\text{mix}}G, and compare it with the equimolar case at the same total moles and temperature to confirm the mixing is less favorable than 50:50 mixing. Total moles: n=4.00 moln = 4.00\ \text{mol}. Mole fractions: xA=3.00/4.00=0.750x_A = 3.00/4.00 = 0.750, xB=1.00/4.00=0.250x_B = 1.00/4.00 = 0.250.

xAln⁡xA=(0.750)ln⁡(0.750)=(0.750)(−0.2877)=−0.2158x_A\ln x_A = (0.750)\ln(0.750) = (0.750)(-0.2877) = -0.2158
xBln⁡xB=(0.250)ln⁡(0.250)=(0.250)(−1.3863)=−0.3466x_B\ln x_B = (0.250)\ln(0.250) = (0.250)(-1.3863) = -0.3466
∑ixiln⁡xi=−0.2158+(−0.3466)=−0.5624\sum_i x_i\ln x_i = -0.2158 + (-0.3466) = -0.5624
ΔmixG=nRT∑ixiln⁡xi=(4.00 mol)(8.314 J K−1mol−1)(350 K)(−0.5624)\Delta_{\text{mix}}G = nRT\sum_i x_i\ln x_i = (4.00\ \text{mol})(8.314\ \text{J K}^{-1}\text{mol}^{-1})(350\ \text{K})(-0.5624)
=(4.00)(8.314)(350)(−0.5624) J=−6.55×103 J=−6.55 kJ.= (4.00)(8.314)(350)(-0.5624)\ \text{J} = -6.55\times 10^{3}\ \text{J} = -6.55\ \text{kJ}.

Per mole of mixture: −6.55 kJ/4.00 mol=−1.64 kJ mol−1-6.55\ \text{kJ}/4.00\ \text{mol} = -1.64\ \text{kJ mol}^{-1}. Compare with an equimolar 2:2 mixture (same 4.00 mol total, same TT): xA=xB=0.500x_A = x_B = 0.500,

∑ixiln⁡xi=2(0.500)(−0.6931)=−0.6931,\sum_i x_i\ln x_i = 2(0.500)(-0.6931) = -0.6931,
ΔmixG=(4.00)(8.314)(350)(−0.6931) J=−8.07×103 J=−8.07 kJ,\Delta_{\text{mix}}G = (4.00)(8.314)(350)(-0.6931)\ \text{J} = -8.07\times10^{3}\ \text{J} = -8.07\ \text{kJ},

or −2.02 kJ mol−1-2.02\ \text{kJ mol}^{-1}. As expected, the equimolar mixture is more stable per mole (−2.02-2.02 vs. −1.64 kJ mol−1-1.64\ \text{kJ mol}^{-1}): mixing is still spontaneous in both cases, but the driving force is strongest at x=0.5x = 0.5, where the entropic dispersal of molecules is maximal, and weakest as either mole fraction approaches 0 or 1.

Limiting cases & common traps

SituationBehavior of ΔmixG\Delta_{\text{mix}}GNote
xi→0x_i \to 0 or xi→1x_i \to 1ΔmixG→0\Delta_{\text{mix}}G \to 0No mixing occurs at the pure-substance limit; nothing to mix.
xA=xB=0.5x_A = x_B = 0.5 (two components)Most negative valueMaximum entropic dispersal at equimolar composition.
Real (non-ideal) mixturesΔmixH≠0\Delta_{\text{mix}}H \neq 0Enthalpy of mixing can be positive or negative; ideal formula is only an approximation.
T→0T \to 0ΔmixG→0\Delta_{\text{mix}}G \to 0Since ΔmixG=−TΔmixS\Delta_{\text{mix}}G = -T\Delta_{\text{mix}}S for ideal mixing, it scales linearly with TT.
More than two componentsStill negativeSum extends over all ii; each term remains negative.

The chemist behind it

The chemical-potential formalism used here — writing μi=μi∗+RTln⁡xi\mu_i = \mu_i^{*} + RT\ln x_i and building macroscopic mixing thermodynamics directly from it — traces to Josiah Willard Gibbs, whose 1870s papers on the equilibrium of heterogeneous substances founded the entire framework of chemical potentials, phase equilibrium, and free energy used throughout physical chemistry. Gibbs worked largely in isolation at Yale, publishing in the relatively obscure Transactions of the Connecticut Academy of Sciences, and his ideas were only widely appreciated in chemistry after being popularized in Europe by Wilhelm Ostwax and later systematized by Gilbert N. Lewis, who introduced the modern notation of activities and fugacities built directly on Gibbs's chemical potential.

Origins · 1 minJosiah Willard Gibbs and how this was discovered
JW
Josiah Willard Gibbs
1839–1903 · American mathematical physicist whose chemical potential underlies every mixing and phase-equilibrium calculation in this article

Ask the tutor: What happens to the Gibbs energy of mixing when the two components are not ideal and have a nonzero enthalpy of mixing?

Why is ΔmixG negative even though nothing "energetically favorable" happens?

Gibbs energy combines enthalpy and entropy through G=H−TSG = H - TS. For an ideal mixture, ΔmixH=0\Delta_{\text{mix}}H = 0 because A–A, B–B, and A–B interactions are equally strong, so there is no energetic reward for mixing. However, entropy always rises when previously separated, distinguishable molecules are allowed to intermingle, since there are vastly more ways to arrange the mixed state than the separated one. With ΔH=0\Delta H = 0 and ΔS>0\Delta S > 0, the term −TΔS-T\Delta S is negative, so ΔG\Delta G must be negative — mixing is spontaneous on entropic grounds alone.

How does this relate to mixing ideal gases?

The derivation is structurally identical. For ideal gases, mixing at constant total pressure gives ΔmixG=nRT∑ixiln⁡xi\Delta_{\text{mix}}G = nRT\sum_i x_i\ln x_i because each gas expands into the combined volume, lowering its partial pressure and hence its chemical potential by RTln⁡xiRT\ln x_i. For an ideal solution, the same algebraic form emerges because each component's chemical potential in the mixture is defined the same way, μi=μi∗+RTln⁡xi\mu_i = \mu_i^{*} + RT\ln x_i. The physics differs — volume expansion for gases, statistical dispersal on a lattice-like model for liquids — but the resulting equation is identical.

Does ΔmixG depend on pressure?

Not directly, in the ideal case. The formula ΔmixG=nRT∑ixiln⁡xi\Delta_{\text{mix}}G = nRT\sum_i x_i\ln x_i contains no explicit pp dependence, because the pure and mixed states are compared at the same TT and pp, and the ideal-mixture assumption means volume changes on mixing are zero. In a real, non-ideal mixture, there can be a small volume of mixing, which would introduce weak pressure sensitivity through the p ΔVp\,\Delta V contributions buried in the true μi∗\mu_i^{*} and activity terms.

Can ΔmixG ever be positive for a real mixture?

Yes, but that means the mixture is behaving non-ideally, and full miscibility may fail. If ΔmixH\Delta_{\text{mix}}H is sufficiently positive (unfavorable A–B interactions) it can outweigh −TΔmixS-T\Delta_{\text{mix}}S at some compositions, making ΔmixG\Delta_{\text{mix}}G positive there — this is exactly the mechanism behind partial miscibility and upper critical solution temperatures. For a strictly ideal mixture, though, this can never happen; ΔmixG\Delta_{\text{mix}}G is guaranteed negative everywhere between the pure limits.

Why does ΔmixG vanish at x = 0 and x = 1?

At these limits, one of the mole fractions equals 1 and the other equals 0. The term xiln⁡xix_i\ln x_i vanishes both when xi=1x_i = 1 (since ln⁡1=0\ln 1 = 0) and when xi→0x_i \to 0 (since xln⁡x→0x\ln x \to 0 in that limit, even though ln⁡x→−∞\ln x \to -\infty, because xx goes to zero faster). Physically, these limits correspond to not actually mixing anything — you have pure A or pure B, and there is no dispersal to gain entropy from.

Before this

Where this leads