Formula

Anion Gap Formula Explained

The anion gap formula AG = Na⁺ − (Cl⁻ + HCO₃⁻) is derived from the principle of electroneutrality. Here is the full derivation, the potassium-inclusive variant, albumin correction, and worked examples with real numbers.

The anion gap equation

The anion gap formulaAG = Na⁺ − (Cl⁻ + HCO₃⁻) — is one line of arithmetic, but it rests on a deep physiological law: the principle of electroneutrality. In any body-fluid compartment, total positive charge must equal total negative charge. Serum cations are dominated by sodium (Na⁺) plus small contributions from potassium (K⁺), calcium, and magnesium; serum anions are dominated by chloride (Cl⁻) and bicarbonate (HCO₃⁻) plus "unmeasured" anions such as albumin, phosphate, sulfate, and organic anions (lactate, ketones).

Anion gap charge balance diagram showing sodium minus chloride and bicarbonate equals the unmeasured anion gap
The anion gap is the difference between measured cations (Na⁺) and measured anions (Cl⁻ + HCO₃⁻), representing unmeasured anions like albumin, lactate, and ketones.

Writing electroneutrality out and grouping the measured from the unmeasured ions gives the anion gap equation. The cation side minus the anion side must balance, so:

AG = Na⁺ − (Cl⁻ + HCO₃⁻)
equivalently: Na⁺ − Cl⁻ − HCO₃⁻ = Unmeasured Anions − Unmeasured Cations

By convention we drop the minor cations (K⁺, Ca²⁺, Mg²⁺) from the daily clinical formula because they are small and relatively constant. What remains is the gap between the major measured cation (sodium) and the two major measured anions (chloride and bicarbonate). That gap is not empty space — it is filled by the unmeasured anions. When those unmeasured anions accumulate (lactate in shock, ketoacids in DKA, uremic toxins in renal failure, organic acids from toxic alcohols), the calculated anion gap rises. This is why the formula is such an effective screen for metabolic acidosis.

Step-by-step calculation

To calculate the anion gap by hand, follow three steps:

  1. Add the measured anions: Cl⁻ + HCO₃⁻.
  2. Subtract from sodium: Na⁺ − (Cl⁻ + HCO₃⁻).
  3. Compare to the reference interval (conventionally 8–12 mEq/L).

Example A — normal result. A routine panel returns Na⁺ 140, Cl⁻ 104, HCO₃⁻ 24 mEq/L. Sum the anions: 104 + 24 = 128. Subtract from sodium: 140 − 128 = 12 mEq/L, sitting at the top of the normal range.

Example B — elevated result. A septic patient's panel returns Na⁺ 138, Cl⁻ 101, HCO₃⁻ 18 mEq/L. Sum the anions: 101 + 18 = 119. Subtract from sodium: 138 − 119 = 19 mEq/L, a mildly elevated gap consistent with a high-anion-gap metabolic acidosis such as lactic acidosis. You can confirm both results in the anion gap calculator, which also applies the albumin correction automatically.

The potassium-inclusive variant

Some laboratories and textbooks add potassium to the cation side, giving AG = (Na⁺ + K⁺) − (Cl⁻ + HCO₃⁻). Because serum K⁺ is small relative to Na⁺ and tightly regulated, including it shifts the normal range upward to roughly 10–20 mEq/L. Most modern practice omits potassium for simplicity, reserving the K⁺-inclusive equation for specific settings (hyperkalemic acidosis, renal physiology teaching). The full derivation and clinical indications are covered on the dedicated formula with potassium page.

Reference ranges and why labs differ

The conventional reference interval quoted for the anion gap is 8–12 mEq/L, the value most clinicians carry in their heads. Modern autoanalyzers using ion-selective electrodes, however, often report a tighter 3–11 mEq/L range. The discrepancy comes down to how chloride is measured: newer assays report slightly higher Cl⁻ values, which shrinks the calculated gap. Each laboratory prints its own reference interval, and the clinically correct move is to interpret your result against that lab's range rather than a universal number. The normal anion gap range page breaks this down lab by lab and by age group.

Albumin correction

Albumin is the dominant unmeasured anion.

Albumin contributes roughly 75% of the "normal" anion gap, so when it falls, the expected gap falls with it. Each 1 g/dL decrease in albumin lowers the normal anion gap by about 2.5 mEq/L. The albumin-corrected formula restores comparability: corrected AG = observed AG + 2.5 × (4.0 − albumin g/dL). Without it, a hypoalbuminemic ICU patient can have a frankly elevated acidosis hidden behind a deceptively "normal" raw gap.

For worked case examples showing each variant of the formula in action — from straightforward HAGMA to mixed disorders resolved with the delta ratio — see the HAGMA guide and the clinical case studies.