Article — Equilibrium Constant Calculator
How the equilibrium constant calculator works
The equilibrium constant K describes the ratio of product to reactant activities (or concentrations, pressures) at equilibrium for a balanced chemical reaction. A large K means products are favored; a small K means reactants dominate. This calculator handles up to four reactants and four products, returns K, log K, ln K, and the Gibbs free energy ΔG° = −RT ln K at the temperature you set.
K is the bridge between thermodynamics and analytical chemistry. From a single number you can predict reaction direction, equilibrium composition, pH of weak acid solutions, and solubility of sparingly soluble salts.
What is the equilibrium constant
Chemical equilibrium is the state where the forward and reverse rates of a reversible reaction are equal. Concentrations stop changing, but the reaction has not stopped — it is dynamic. K is the ratio that the system arrives at, fixed by temperature alone.
For aA + bB ↔ cC + dD with all species in solution:
K = [C]c[D]d / ([A]a[B]b)
Pure solids and pure liquids do not appear in the expression because their activities are 1. This is why dissolution and decomposition equilibria like CaCO3(s) ↔ CaO(s) + CO2(g) reduce to K = P(CO2).
Types of equilibrium constants
Different reactions need different K subscripts. They all share the same mathematical form but differ in which quantities go in.
Kc molar concentrationsKp partial pressures (gas)Ksp solubility productKa, Kb weak acid / base dissociationKw water autoionization (10−14)Kf complex ion formationConvert Kc to Kp using Kp = Kc(RT)Δn, where Δn is the change in moles of gas (products minus reactants). For reactions with no net gas change, Kc and Kp are numerically equal.
The equilibrium constant formula
The calculator builds the expression from your stoichiometric coefficients automatically. For the Haber process N2 + 3 H2 ↔ 2 NH3:
K = [NH3]2 / ([N2] · [H2]3)
With [N2] = 0.1 M, [H2] = 0.2 M, [NH3] = 0.4 M, the numerator is 0.16 and the denominator is 0.1 × 0.008 = 0.0008. K = 200. Log K = 2.3 and ΔG° at 298 K is about −13 kJ/mol — comfortably product-favored at the operating temperature.
The Haber-Bosch process for industrial ammonia synthesis runs at 450 °C and 150–300 atm. The high pressure shifts equilibrium toward NH3 (Le Chatelier); the high temperature is needed to make the reaction fast despite the unfavorable shift at high T. The compromise is one of the great engineering achievements of the 20th century.
Temperature and the equilibrium constant
K changes only with temperature. Concentration, pressure, and catalysts all shift the position of equilibrium but never change K itself. The van 't Hoff equation describes the temperature dependence:
ln(K2/K1) = −(ΔH°/R)(1/T2 − 1/T1)
For an exothermic reaction (ΔH° < 0), K decreases with rising T. For an endothermic reaction K increases. The relation gives you K at any T2 once you know K at T1 and the enthalpy of reaction.
The ICE table method
ICE stands for Initial, Change, and Equilibrium. It is the standard technique for solving equilibrium problems when you start with non-equilibrium concentrations and want to find the equilibrium state.
- Initial row — the starting concentrations of every species
- Change row — the algebraic change, with x as the unknown extent of reaction. Reactants change by −coef · x, products by +coef · x.
- Equilibrium row — initial + change. These go into the K expression.
You solve the resulting polynomial for x (often quadratic, occasionally cubic), then plug back to get all equilibrium concentrations. Once you have those concentrations, this calculator returns K instantly.
Equilibrium constant vs reaction quotient
The reaction quotient Q is calculated with the same formula as K but using current (not necessarily equilibrium) concentrations. Comparing Q to K tells you which way the reaction will shift:
Q < K reaction proceeds forwardQ > K reaction proceeds backwardQ = K already at equilibriumThis is operationally how Le Chatelier's principle is justified. Add more reactant, Q drops below K, reaction shifts forward until Q catches up. Remove product, same outcome. Change temperature, K itself moves, and the system relaxes to the new K.
Weak acid equilibrium constants
Weak acids partially dissociate in water. The dissociation constant Ka measures how partial: acetic acid has Ka = 1.75 × 10−5 (pKa = 4.76), so a 0.1 M solution dissociates only about 1.3% into ions. Stronger weak acids like HF (Ka = 6.6 × 10−4, pKa = 3.18) dissociate 7% at the same concentration; weaker ones like HCN (Ka = 6.2 × 10−10, pKa = 9.21) barely ionize at all.
The pH of a weak acid solution drops out of the equilibrium expression. For monoprotic HA with initial concentration c, applying the small-x approximation gives [H+] ≈ √(Ka × c). A 0.1 M acetic acid solution has pH around 2.87. The same logic applies to weak bases through Kb, with the pH lying above 7.
Common equilibrium constant mistakes
Strictly K is a ratio of activities (dimensionless). In practice we use concentrations or partial pressures and the K value carries implicit units that depend on the stoichiometry. Comparing K values across reactions with different Δn requires care — convert to a common reference (often Kp at 1 atm or Kc at 1 M).
- Including pure solids or liquids — their activity is 1 and they drop out of K
- Wrong sign of Δn when converting Kc to Kp — Δn = moles gas products − moles gas reactants
- Forgetting that K only changes with T — concentration changes shift position, not K
- Using initial concentrations instead of equilibrium concentrations in the K expression
- Mixing up Ka and pKa — pKa = −log Ka; small Ka means large pKa
For weak acids with Ka below about 10−4, the x produced by dissociation is small compared with the initial acid concentration. Approximate (HA − x) ≈ HA and skip the quadratic. The error is usually under 5% and saves the algebra.
For solubility-product problems involving sparingly soluble salts, the Ksp form follows the same pattern. AgCl dissolves to give Ag+ and Cl−; Ksp = [Ag+][Cl−] = 1.8 × 10−10. From that you can compute molar solubility in pure water as √Ksp = 1.34 × 10−5 M. Adding a common ion (NaCl) reduces solubility by Le Chatelier; adding a complexing agent (NH3) can shift K and increase solubility dramatically.