Entropy of Mixing of Ideal Gases

Pull a partition out of a box separating argon from neon and something irreversible happens. Each gas expands into the space the other used to occupy. Even though no heat crosses the system boundary and no chemical bond forms, the entropy of the universe rises. This quiet fact — mixing itself generates entropy — sits at the heart of solution chemistry, colligative properties, and the meaning of disorder in the Second Law. The entropy of mixing matters because it explains why gases and miscible liquids mix spontaneously with no energy input at all. It sets the baseline against which every real solution's excess entropy is measured. It also exposes a famous conceptual trap, the Gibbs paradox, that forces us to think carefully about what "distinguishable" means at the molecular level. This article derives the entropy of mixing from the entropy of isothermal expansion of an ideal gas. You will see the partial-volume argument step by step. You will compute the mixing entropy for concrete examples. Then you will meet the Gibbs paradox and see why mixing identical gases must give zero entropy change.

Key takeaways
  • Mixing two different ideal gases at constant TT and PP increases entropy because each gas expands into the total volume.
  • The result is ΔmixS=−nR∑ixiln⁡xi\Delta_{mix}S = -nR\sum_i x_i \ln x_i, always positive for a genuine mixture.
  • This formula depends only on mole fractions, not on the chemical identity of the gases.
  • The Gibbs paradox arises if the formula is applied to mixing a gas with itself — it must give zero, not a positive number.
  • Resolving the paradox requires recognizing that identical particles are fundamentally indistinguishable, foreshadowing the statistical view of entropy.
  • Key idea: entropy of mixing is just the sum of independent free expansions, one for each gas into the full volume.
The core insight

When a partition separating two different ideal gases is removed, each gas undergoes its own free expansion from its initial partial volume to the total volume, and because the gases do not interact, their entropy increases simply add — giving ΔmixS=−nR∑ixiln⁡xi\Delta_{mix}S = -nR\sum_i x_i \ln x_i, a purely combinatorial, composition-dependent quantity independent of what the gases actually are, provided they are genuinely distinguishable.

The physical picture

Consider a rigid, insulated container divided by a removable partition into two compartments. The left compartment holds nAn_A moles of gas A at volume VAV_A; the right holds nBn_B moles of gas B at volume VBV_B. Both compartments are at the same temperature TT and the same pressure PP, so the gases occupy volumes in proportion to their mole numbers. When the partition is withdrawn, nothing happens to the total energy — ideal gases have no intermolecular potential energy, so mixing at constant TT involves no enthalpy change. But each gas now has access to the full volume V=VA+VBV = V_A + V_B. Gas A, initially confined to VAV_A, spontaneously expands to fill VV. Gas B does the same. Because ideal-gas molecules do not interact, gas A's presence does not hinder gas B's expansion, and vice versa. The process is exactly two independent free expansions happening simultaneously in the same container. Each free expansion is irreversible and isothermal, and from the earlier result for entropy of an ideal-gas expansion, the entropy change for an isothermal volume change is:

ΔS=nRln⁡VfVi\Delta S = nR\ln\frac{V_f}{V_i}

Applying this separately to A and to B, and adding the two contributions, gives the total entropy of mixing. The key physical insight is that mixing at constant total pressure is nothing more than two coupled isothermal expansions — the "mixing" language just describes what the expansion looks like when two different gases share one container.

Figure
Two compartments merge: each gas expands into the full volume
Gas A, n_A, V_A Gas B, n_B, V_B before: partition in place → A and B, V = V_A + V_B after: each gas fills full V ΔmixS = −nR(xA ln xA + xB ln xB) > 0

The core relations

ΔSi=niRln⁡VVi=−niRln⁡xi\Delta S_i = n_i R \ln\frac{V}{V_i} = -n_i R \ln x_i

where: xi=Vi/V=ni/nx_i = V_i/V = n_i/n is the mole fraction of component ii at fixed T,PT,P.

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

where: n=∑inin = \sum_i n_i is total moles; the sum runs over all components of the mixture.

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

where: ΔmixG<0\Delta_{mix}G < 0 always, since ΔmixH=0\Delta_{mix}H = 0 for ideal gases and ΔmixG=ΔmixH−TΔmixS\Delta_{mix}G = \Delta_{mix}H - T\Delta_{mix}S.

Worked examples

Derivation AEntropy of mixing from partial-volume expansions

Goal. Derive ΔmixS=−nR∑ixiln⁡xi\Delta_{mix}S = -nR\sum_i x_i \ln x_i for an arbitrary number of ideal gases mixed at constant TT and PP.

Step 1. Set up the initial state. Suppose cc ideal gases, with n1,n2,…,ncn_1, n_2, \dots, n_c moles, are each confined in their own compartment at the same temperature TT and same pressure PP. Each compartment has volume Vi=niRT/PV_i = n_i RT/P, since every gas independently obeys the ideal gas law at that shared TT and PP.

Step 2. Define the final state. All partitions are removed. The gases occupy one common volume:

V=∑iVi=RTP∑ini=nRTPV = \sum_i V_i = \frac{RT}{P}\sum_i n_i = \frac{nRT}{P}

The final pressure is still PP, because the total moles and total volume satisfy the same ideal gas law with no change in TT.

Step 3. Apply the expansion formula to each gas separately. Because ideal-gas molecules exert no forces on one another, each gas behaves exactly as if it alone were expanding into the full volume VV, oblivious to the presence of the others. The entropy change of gas ii is the entropy change of an isothermal free expansion from ViV_i to VV:

ΔSi=niRln⁡VVi\Delta S_i = n_i R \ln\frac{V}{V_i}

Step 4. Rewrite the volume ratio as a mole-fraction ratio. Since Vi/V=ni/n=xiV_i/V = n_i/n = x_i at fixed TT and PP, we have V/Vi=1/xiV/V_i = 1/x_i, so:

ΔSi=−niRln⁡xi\Delta S_i = -n_i R \ln x_i

Step 5. Sum over all components. Because the expansions are independent, the total entropy change is additive:

ΔmixS=∑iΔSi=−R∑iniln⁡xi\Delta_{mix}S = \sum_i \Delta S_i = -R\sum_i n_i \ln x_i

Factoring out total moles nn, using ni=nxin_i = n x_i:

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

Step 6. Check the sign. Every mole fraction satisfies 0<xi<10 < x_i < 1, so ln⁡xi<0\ln x_i < 0 for every term, making every −xiln⁡xi-x_i \ln x_i term strictly positive. Therefore ΔmixS>0\Delta_{mix}S > 0 for any genuine mixture of two or more distinguishable gases, vanishing only in the trivial limit where one component has xi→1x_i \to 1.

ΔmixS=−R∑iniln⁡xi=−nR∑ixiln⁡xi  >  0\boxed{\Delta_{mix}S = -R\sum_i n_i \ln x_i = -nR\sum_i x_i\ln x_i \; > \; 0}

Worked examples

Example 1 — Mixing two gases in equal amounts. Suppose 1.00 mol of N₂ and 1.00 mol of O₂, each initially in its own 22.4 L container at 273 K and 1.00 atm, are mixed by removing the partition between them. Find ΔmixS\Delta_{mix}S and ΔmixG\Delta_{mix}G at 273 K. Total moles: n=2.00n = 2.00 mol. Mole fractions: xN2=xO2=0.500x_{N_2} = x_{O_2} = 0.500.

ΔmixS=−nR∑ixiln⁡xi=−(2.00 mol)(8.314 J K−1mol−1)[0.500ln⁡0.500+0.500ln⁡0.500]\Delta_{mix}S = -nR\sum_i x_i \ln x_i = -(2.00\ \text{mol})(8.314\ \text{J K}^{-1}\text{mol}^{-1})\left[0.500\ln 0.500 + 0.500 \ln 0.500\right]

Evaluate the bracket: ln⁡0.500=−0.6931\ln 0.500 = -0.6931, so the bracket is 0.500(−0.6931)×2=−0.69310.500(-0.6931) \times 2 = -0.6931.

ΔmixS=−(2.00)(8.314)(−0.6931) J K−1=11.53 J K−1\Delta_{mix}S = -(2.00)(8.314)(-0.6931)\ \text{J K}^{-1} = 11.53\ \text{J K}^{-1}

At T=273T = 273 K:

ΔmixG=−TΔmixS=−(273 K)(11.53 J K−1)=−3.15×103 J=−3.15 kJ\Delta_{mix}G = -T\Delta_{mix}S = -(273\ \text{K})(11.53\ \text{J K}^{-1}) = -3.15\times10^{3}\ \text{J} = -3.15\ \text{kJ}

Sanity check: ΔmixS\Delta_{mix}S has the units J K⁻¹, matches Rln⁡2×n=(2.00)(8.314)(0.6931)=11.53R\ln 2 \times n = (2.00)(8.314)(0.6931) = 11.53 J K⁻¹ exactly as computed. The mixing is spontaneous, ΔmixG<0\Delta_{mix}G < 0, with no enthalpy change — the whole driving force is entropic.

Example 2 — Mixing three gases in unequal amounts (exam-level). A gas cylinder is divided into three compartments at the same T=298T = 298 K and P=1.00P = 1.00 bar, containing 3.00 mol He, 1.00 mol Ne, and 1.00 mol Ar. All partitions are removed. Compute ΔmixS\Delta_{mix}S, ΔmixG\Delta_{mix}G, and the mixing entropy per mole of mixture. Total moles: n=3.00+1.00+1.00=5.00n = 3.00 + 1.00 + 1.00 = 5.00 mol. Mole fractions:

xHe=3.005.00=0.600,xNe=1.005.00=0.200,xAr=1.005.00=0.200x_{He} = \frac{3.00}{5.00} = 0.600, \qquad x_{Ne} = \frac{1.00}{5.00} = 0.200, \qquad x_{Ar} = \frac{1.00}{5.00} = 0.200

Compute each xiln⁡xix_i \ln x_i term:

xHeln⁡xHe=0.600ln⁡(0.600)=0.600(−0.5108)=−0.3065x_{He}\ln x_{He} = 0.600 \ln(0.600) = 0.600(-0.5108) = -0.3065
xNeln⁡xNe=0.200ln⁡(0.200)=0.200(−1.6094)=−0.3219x_{Ne}\ln x_{Ne} = 0.200\ln(0.200) = 0.200(-1.6094) = -0.3219
xArln⁡xAr=0.200ln⁡(0.200)=−0.3219x_{Ar}\ln x_{Ar} = 0.200\ln(0.200) = -0.3219

Sum: −0.3065−0.3219−0.3219=−0.9503-0.3065 - 0.3219 - 0.3219 = -0.9503.

ΔmixS=−nR∑ixiln⁡xi=−(5.00 mol)(8.314 J K−1mol−1)(−0.9503)=39.51 J K−1\Delta_{mix}S = -nR\sum_i x_i \ln x_i = -(5.00\ \text{mol})(8.314\ \text{J K}^{-1}\text{mol}^{-1})(-0.9503) = 39.51\ \text{J K}^{-1}

Entropy per mole of mixture: 39.51/5.00=7.9039.51/5.00 = 7.90 J K⁻¹ mol⁻¹, comfortably below the maximum possible per-mole value Rln⁡3=9.13R\ln 3 = 9.13 J K⁻¹ mol⁻¹ for a three-component mixture at equal mole fractions — sensible, since this mixture is not equimolar. Gibbs energy of mixing at 298 K:

ΔmixG=−TΔmixS=−(298 K)(39.51 J K−1)=−1.178×104 J=−11.8 kJ\Delta_{mix}G = -T\Delta_{mix}S = -(298\ \text{K})(39.51\ \text{J K}^{-1}) = -1.178\times10^{4}\ \text{J} = -11.8\ \text{kJ}

Both numbers are physically reasonable: entropy rises, Gibbs energy falls, and the whole effect scales with how "spread out" the composition is across components.

Limiting cases & common traps

SituationBehavior of ΔmixS\Delta_{mix}SNote
Equimolar binary mixtureMaximum value nRln⁡2nR\ln 2 per mole pairLargest possible mixing entropy for two components
One component dominates (xi→1x_i \to 1)ΔmixS→0\Delta_{mix}S \to 0"Mixing" a trace impurity barely changes entropy
Mixing identical gasesNaive formula gives ΔmixS=nRln⁡2≠0\Delta_{mix}S = nR\ln 2 \neq 0This is the Gibbs paradox — physically wrong
More components at fixed nnΔmixS\Delta_{mix}S increases with number of componentsMaximum at equal mole fractions across all components
Mixing at constant VV instead of constant PPFormula does not apply directlyMust redefine initial partial volumes consistently

The chemist behind it

The entropy of mixing sits at the intersection of thermodynamics and the emerging statistical picture of matter in the late nineteenth century. Josiah Willard Gibbs, working largely in isolation at Yale, built the theoretical apparatus — free energy, chemical potential, phase rule — that made quantitative sense of mixing, solutions, and phase equilibria. His 1875–78 papers "On the Equilibrium of Heterogeneous Substances" contain, almost as an aside, the paradox that now bears his name: the observation that naive combinatorial counting of gas mixing entropy gives a nonzero, discontinuous answer when two samples of the same gas are combined, unless one treats identical particles as indistinguishable from the start. This single puzzle quietly foreshadowed the deep quantum-statistical distinction between identical and distinguishable particles, decades before quantum mechanics existed to justify it.

Origins · 1 minJosiah Willard Gibbs and how this was discovered
JW
Josiah Willard Gibbs
1839–1903 · American mathematical physicist who founded chemical thermodynamics and first posed the mixing paradox that bears his name

Ask the tutor: How does the N!N! correction in statistical mechanics formally resolve the Gibbs paradox, and how does it connect to the Sackur–Tetrode equation for gas entropy?

Why is there no enthalpy change when ideal gases mix

Ideal gas molecules are defined as having no intermolecular potential energy — they interact only through elastic collisions that do not affect internal energy on average. Since enthalpy for an ideal gas depends only on temperature, and mixing at constant TT changes neither temperature nor the energetic environment of any molecule, ΔmixH=0\Delta_{mix}H = 0 exactly. All of the spontaneity of mixing therefore comes from the entropy term; ΔmixG=−TΔmixS\Delta_{mix}G = -T\Delta_{mix}S is negative purely because ΔmixS\Delta_{mix}S is positive, not because of any energetic stabilization.

Does the entropy of mixing formula depend on which gases are being mixed

No — remarkably, the formula ΔmixS=−nR∑ixiln⁡xi\Delta_{mix}S = -nR\sum_i x_i\ln x_i depends only on the mole fractions of the components, never on their molar mass, polarizability, or chemical identity. This is a direct consequence of the ideal gas model: since ideal gases do not interact, the entropy gained by each gas depends only on how much its own volume expands, which is fixed purely by the mole ratios at constant TT and PP. Real gases show small deviations from this ideal formula due to intermolecular forces.

How does the Gibbs paradox get resolved in statistical mechanics

Classical statistical mechanics initially double-counts microstates that differ only by swapping identical particles, producing an entropy that fails to be extensive and predicts a nonzero mixing entropy even for identical gases. Gibbs showed that dividing the classical partition function by N!N!, one factor for each species, removes this overcounting and restores the correct extensive entropy with zero mixing entropy for identical gases. This correction is justified rigorously by quantum mechanics, where identical particles are truly indistinguishable, not merely difficult to tell apart — a deeper explanation that the statistical-entropy treatment develops further.

Is entropy of mixing the same thing as entropy of solution for liquids or solids

Not quite. The ideal entropy of mixing derived here strictly applies to ideal gases, where zero enthalpy change and pure volume-expansion behavior are guaranteed. Liquid and solid solutions often show an "ideal" mixing entropy of the same combinatorial form when interactions between different components are similar to those between like components, but real solutions typically also have a nonzero enthalpy of mixing and excess entropy from packing and structural effects. The gas-phase formula is the reference baseline against which real-solution deviations are measured.

What happens to Δmix S if you mix many components instead of just two

Adding more distinguishable components at fixed total moles increases the mixing entropy, because spreading the same number of particles over more distinguishable categories increases the combinatorial possibilities. The mixing entropy per mole is maximized when all components have equal mole fractions, reaching Rln⁡cR\ln c for cc equally-populated components; unequal mole fractions always give a smaller value, as seen in Worked Example 2 where the entropy per mole fell below the equal-fraction maximum for three components.

Before this

Where this leads