At dynamic equilibrium, the forward and reverse reactions run at the same rate and the concentrations stop changing. Experiments show something striking: whatever amounts you start with, one particular combination of the equilibrium concentrations always comes out the same at a given temperature. That number is the equilibrium constant.
🔑 Key idea
For $a\mathrm{A} + b\mathrm{B} \rightleftharpoons c\mathrm{C} + d\mathrm{D}$,
$$K_c = \frac{[\mathrm{C}]^c[\mathrm{D}]^d}{[\mathrm{A}]^a[\mathrm{B}]^b}$$
using equilibrium concentrations: products over reactants, each raised to its coefficient. Pure solids and pure liquids are left out. $K$ depends only on temperature.
💡 Why it works
For one elementary step, $\mathrm{A + B \rightleftharpoons C}$, equilibrium means $k_\text{f}[\mathrm{A}][\mathrm{B}] = k_\text{r}[\mathrm{C}]$, so $\dfrac{[\mathrm{C}]}{[\mathrm{A}][\mathrm{B}]} = \dfrac{k_\text{f}}{k_\text{r}}$, a constant. Thermodynamics shows the same form holds for any balanced equation, whatever the mechanism. Solids and pure liquids drop out because $K$ really uses activities: concentration relative to $1\ \text{M}$ for solutes, pressure relative to $1\ \text{bar}$ for gases, and exactly 1 for a pure solid or liquid, whose "concentration" cannot change. That is also why $K$ has no units.
Nitrogen and hydrogen approaching equilibrium. Q climbs until it equals K, and then the concentrations hold steady.
Worked examples
✏️ Worked example: Writing K
Write $K_c$ for $\mathrm{N_2(g) + 3H_2(g) \rightleftharpoons 2NH_3(g)}$ and for $\mathrm{CaCO_3(s) \rightleftharpoons CaO(s) + CO_2(g)}$.
Ammonia: products over reactants, with the coefficients as powers: $K_c = \dfrac{[\mathrm{NH_3}]^2}{[\mathrm{N_2}][\mathrm{H_2}]^3}$.
Limestone: both solids are left out, so $K_c = [\mathrm{CO_2}]$. At a given temperature the $\mathrm{CO_2}$ concentration over the solids is fixed, however much solid is there.
Answer: $K_c = \dfrac{[\mathrm{NH_3}]^2}{[\mathrm{N_2}][\mathrm{H_2}]^3}$ and $K_c = [\mathrm{CO_2}]$.
✏️ Worked example: A value from data
At $703\ \text{K}$, an equilibrium mixture of $\mathrm{H_2(g) + I_2(g) \rightleftharpoons 2HI(g)}$ has $[\mathrm{H_2}] = [\mathrm{I_2}] = 0.0100\ \text{M}$ and $[\mathrm{HI}] = 0.0737\ \text{M}$. Find $K_c$.
In water, the solvent is a pure liquid too, so $\mathrm{H_2O(l)}$ is left out of expressions such as $K_a$. But water vapor, $\mathrm{H_2O(g)}$, is a gas and stays in.
A value of $K$ belongs to one balanced equation at one temperature. Write the equation differently and $K$ changes (see manipulating K); change the temperature and $K$ changes too. For gases, $K$ can also be written with partial pressures, as Kp.
⚠️ Common mistake
Putting solids or pure liquids into $K$, or forgetting the powers. $\mathrm{CaCO_3(s)}$ does not belong in its own decomposition constant, and $[\mathrm{H_2}]$ must be cubed in the ammonia expression. Check: every term in $K$ is an (aq) or (g) species, with its coefficient as the exponent.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.