# Equilibrium Constant Calculator

> Computes the concentration equilibrium constant Kc of a reaction aA + bB ⇌ cC + dD from equilibrium concentrations raised to their stoichiometric coefficients, converts it to Kp with Kp = Kc·(RT)^Δn for gas-phase reactions, and reports log K, the standard Gibbs energy ΔG° = −RT·ln K and which side the equilibrium favours.

- Calculator id: `equilibrium-constant` · Category: Chemistry (`chemistry`) · Tool name: `calculate_equilibrium_constant`
- Canonical page: https://tttkmbb.com/chemistry/equilibrium-constant · This document: https://tttkmbb.com/chemistry/equilibrium-constant.md · JSON definition: https://tttkmbb.com/chemistry/equilibrium-constant.json

## Purpose

Computes the concentration equilibrium constant Kc of a reaction aA + bB ⇌ cC + dD from equilibrium concentrations raised to their stoichiometric coefficients, converts it to Kp with Kp = Kc·(RT)^Δn for gas-phase reactions, and reports log K, the standard Gibbs energy ΔG° = −RT·ln K and which side the equilibrium favours.

**Use when:** You have equilibrium concentrations of the species of a balanced reaction with up to two reactants and two products and need Kc, Kp, ΔG° or a statement of whether products or reactants are favoured.

**Do not use when:** You need to predict equilibrium concentrations from a known K and initial amounts (an ICE-table problem), the pH of a weak acid (use weak-acid-ph), or K from a cell potential (use nernst-equation).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `coefficient_a` | integer |  | optional, default 1 | Stoichiometric coefficient of reactant A. (min 1, max 20) |
| `concentration_a` | number | mol/L | required | Equilibrium concentration of reactant A (omit pure solids, liquids and the solvent from the expression by not entering them). (> 0, max 1000000) |
| `coefficient_b` | integer |  | optional, default 0 | Stoichiometric coefficient of reactant B; 0 when there is no second reactant. (min 0, max 20) |
| `concentration_b` | number | mol/L | optional, default 0 | Equilibrium concentration of reactant B (required when coefficient_b > 0). (min 0, max 1000000) |
| `coefficient_c` | integer |  | optional, default 1 | Stoichiometric coefficient of product C. (min 1, max 20) |
| `concentration_c` | number | mol/L | required | Equilibrium concentration of product C. (> 0, max 1000000) |
| `coefficient_d` | integer |  | optional, default 0 | Stoichiometric coefficient of product D; 0 when there is no second product. (min 0, max 20) |
| `concentration_d` | number | mol/L | optional, default 0 | Equilibrium concentration of product D (required when coefficient_d > 0). (min 0, max 1000000) |
| `temperature_k` | number | K | optional, default 298.15 | Absolute temperature used for Kp = Kc(RT)^Δn and ΔG° = −RT ln K (298.15 K = 25 °C). (> 0, max 100000) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `kc` | number |  | [C]^c [D]^d / ([A]^a [B]^b) with concentrations in mol/L (dimensionless by convention). |
| `kc_scientific` | string |  | Kc in scientific notation. |
| `kp` | number |  | Kc × (R·T)^Δn with R = 0.082057 L·atm/(mol·K): the pressure-based constant with partial pressures in atm (equal to Kc when Δn = 0). |
| `kp_scientific` | string |  | Kp in scientific notation. |
| `delta_n_gas` | integer |  | c + d − a − b: change in moles of gas per reaction as written. |
| `rt_l_atm_per_mol` | number | L·atm/mol | 0.082057 × temperature_k, the factor raised to Δn. |
| `log_kc` | number |  | Base-10 logarithm of Kc. |
| `delta_g_kj_mol` | number | kJ/mol | −R·T·ln Kc with R = 8.314 J/(mol·K), standard state 1 mol/L; negative when products are favoured. |
| `delta_g_kp_kj_mol` | number | kJ/mol | −R·T·ln Kp (standard state 1 atm), the value to use for gas-phase reactions; identical to delta_g_kj_mol when Δn = 0. |
| `reaction_direction` | string |  | Whether products or reactants are favoured (K > 1, K < 1 or K ≈ 1). |
| `reaction_text` | string |  | The reaction as interpreted, e.g. 1 A + 3 B ⇌ 2 C. |

## Formula

`Kc = concentration_c^c × concentration_d^d / (concentration_a^a × concentration_b^b); Δn = c + d − a − b; Kp = Kc × (R × T)^Δn with R = 0.082057 L·atm/(mol·K); ΔG° = −R × T × ln K with R = 8.314 J/(mol·K); log_kc = log10 Kc`

Concentrations are used in place of activities, so K is dimensionless relative to the 1 mol/L (Kc) or 1 atm (Kp) standard state; species with coefficient 0 are omitted, as pure solids, liquids and the solvent should be. K is temperature-dependent: the entered temperature only converts Kc to Kp and to ΔG°, it does not extrapolate K to another temperature (that needs ΔH° via the van 't Hoff equation).

## Data Sources

- Wikipedia – Equilibrium constant — https://en.wikipedia.org/wiki/Equilibrium_constant (reference, retrieved 2026-09-24)
- OpenStax Chemistry 2e – 13.2 Equilibrium Constants — https://openstax.org/books/chemistry-2e/pages/13-2-equilibrium-constants (textbook, retrieved 2026-09-24)
- IUPAC Gold Book – equilibrium constant — https://goldbook.iupac.org/terms/view/E02177 (standard, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/equilibrium-constant?concentration_a=…&concentration_c=…`
- `POST https://tttkmbb.com/api/v1/calculate/equilibrium-constant` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/equilibrium-constant · OpenAPI operationId `calculate_equilibrium_constant` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "equilibrium-constant", "inputs": {…}}`

## Example

- H2 + I2 ⇌ 2 HI with [H2] 0.1, [I2] 0.1, [HI] 0.7 mol/L at 298.15 K: inputs `{"coefficient_a":1,"concentration_a":0.1,"coefficient_b":1,"concentration_b":0.1,"coefficient_c":2,"concentration_c":0.7}` → `{"kc":49,"kp":49,"delta_n_gas":0,"log_kc":1.6902,"delta_g_kj_mol":-9.648,"reaction_direction":"K > 1: products favoured at equilibrium","reaction_text":"1 A + 1 B ⇌ 2 C"}`
- N2 + 3 H2 ⇌ 2 NH3 at 500 K with Kc = 0.5 ([N2] 1, [H2] 1, [NH3] 0.70711): inputs `{"coefficient_a":1,"concentration_a":1,"coefficient_b":3,"concentration_b":1,"coefficient_c":2,"concentration_c":0.70711,"temperature_k":500}` → `{"kc":0.5,"delta_n_gas":-2,"kp":0.00029703,"kp_scientific":"2.970e-4","rt_l_atm_per_mol":41.0287,"delta_g_kj_mol":2.881,"delta_g_kp_kj_mol":33.764,"reaction_direction":"K < 1: reactants favoured at equilibrium","reaction_text":"1 A + 3 B ⇌ 2 C"}`

```
GET https://tttkmbb.com/api/v1/calculate/equilibrium-constant?coefficient_a=1&concentration_a=0.1&coefficient_b=1&concentration_b=0.1&coefficient_c=2&concentration_c=0.7
```

## Limitations

You need to predict equilibrium concentrations from a known K and initial amounts (an ICE-table problem), the pH of a weak acid (use weak-acid-ph), or K from a cell potential (use nernst-equation). Concentrations are used in place of activities, so K is dimensionless relative to the 1 mol/L (Kc) or 1 atm (Kp) standard state; species with coefficient 0 are omitted, as pure solids, liquids and the solvent should be. K is temperature-dependent: the entered temperature only converts Kc to Kp and to ΔG°, it does not extrapolate K to another temperature (that needs ΔH° via the van 't Hoff equation). All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**How do I enter a reaction with a solid or the solvent?**

Leave it out: pure solids, pure liquids and water as solvent have activity 1 and do not appear in K. Set the unused coefficient to 0 (B or D) or renumber the species so A and C are the ones that appear.

**Kp in atm or bar?**

Kp here uses partial pressures in atm (R = 0.082057 L·atm/(mol·K)). For the IUPAC 1 bar standard state multiply by 1.01325^Δn, or equivalently use R = 0.083145 L·bar/(mol·K).

**How does K change with temperature?**

This calculator does not extrapolate K. Use the van 't Hoff equation ln(K2/K1) = −(ΔH°/R)(1/T2 − 1/T1): K rises with temperature for endothermic reactions and falls for exothermic ones.

## Related

- [Nernst Equation Calculator](https://tttkmbb.com/chemistry/nernst-equation.md) — Equilibrium constant and ΔG° from a standard cell potential.
- [Ideal Gas Law Calculator](https://tttkmbb.com/chemistry/ideal-gas-law.md) — Convert between gas concentrations and partial pressures.
- [Weak Acid pH Calculator](https://tttkmbb.com/chemistry/weak-acid-ph.md) — Ka is the equilibrium constant of acid dissociation.
