This anion gap calculator computes the anion gap from a basic metabolic panel — the accounting check that classifies metabolic acidosis — with the potassium option and the albumin correction that unmasks hidden gaps.

Anion Gap–
Albumin-Corrected Gap–

Reference range for the standard gap is roughly 8–16 mEq/L (lab-dependent; modern analyzers often run 3–11 lower). A high gap in acidosis points to added acids (the MUDPILES family: methanol, uremia, DKA, propylene glycol/isoniazid, lactate, ethylene glycol, salicylates). Albumin is the main “unmeasured anion” — every 1 g/dL it falls hides ~2.5 mEq/L of gap, which is why the correction matters in critical illness.

AG = Na⁺ − (Cl⁻ + HCO₃⁻)

Blood is electrically neutral; the routine panel measures only some ions, so the gap is the unmeasured anions (albumin, phosphate, sulfate, organic acids) made visible by subtraction. When an acid accumulates (lactate, ketones, toxins), bicarbonate falls buffering it and the gap widens — turning a chemistry panel into a differential diagnosis. The companion gap: our Serum Osmolality Calculator. Part of our Health Calculators collection.

Worked Example (Verified)

  • Na 140, Cl 104, HCO₃ 24 (defaults): AG = 140 − 128 = 12 mEq/L — textbook normal; with potassium included it would read 16, which is why you must know which convention a reference range assumes
  • The masked gap: same electrolytes but albumin 2.0 (critically ill) → corrected AG = 12 + 2.5 × 2 = 17 — a real gap hiding behind low albumin, unmasked only by the correction
  • DKA sketch: Na 138, Cl 100, HCO₃ 10 → AG 28 — ketones have consumed the bicarbonate; the gap quantifies the acid load and its closure tracks treatment
  • Normal-gap acidosis contrast: HCO₃ 16 with Cl 112 keeps AG at 12 — the chloride rose to replace bicarbonate (diarrhea, saline, RTA): same low bicarbonate, completely different differential

Using the Gap Like a Clinician

  • Always sanity-check against your lab’s reference range and whether K⁺ is included.
  • Delta ratio / delta-delta comparisons (gap rise vs bicarbonate fall) hunt mixed disorders — the next layer after this arithmetic.
  • Albumin correction is not optional in the ICU, nephrotic syndrome, cirrhosis or malnutrition: uncorrected gaps undercall acidosis there.
  • A negative gap is usually lab artifact (halide interference, lithium, paraproteins) — repeat before theorizing.

Related Tools

Frequently Asked Questions

How do you calculate the anion gap?

AG = sodium − (chloride + bicarbonate), all in mEq/L. The standard panel (140, 104, 24) gives 12. Some formulas add potassium to the cation side; the correction for albumin adds 2.5 × (4.0 − albumin g/dL) to the result.

What is a normal anion gap?

Roughly 8–16 mEq/L without potassium on traditional ranges, though many modern analyzers reference lower (about 3–11). Because ranges are method-dependent, compare against your own lab’s printed reference — and never mix the with-K and without-K conventions.

What does a high anion gap mean?

Unmeasured anions have accumulated — in acidosis, that means added acids: lactic acid, ketoacids (diabetic, alcoholic, starvation), kidney failure’s retained acids, or toxins (methanol, ethylene glycol, salicylates). The mnemonic MUDPILES organizes the differential; the gap quantifies severity and tracks resolution.

Why correct for albumin?

Albumin is the dominant normal unmeasured anion. When it falls (critical illness, liver disease, nephrotic syndrome), the baseline gap falls with it — so a “normal” 12 in a patient with albumin 2.0 is really a corrected 17, a significant gap in disguise. The correction adds 2.5 per gram below 4.0.

What is a normal-gap metabolic acidosis?

Acidosis where bicarbonate loss is matched by chloride gain, keeping the gap unchanged — gastrointestinal bicarbonate loss (diarrhea), renal tubular acidoses, or large-volume saline. The gap’s normality is itself the diagnostic clue, which is the entire point of computing it.

Is this anion gap calculator free?

Yes — free, instant, no sign-up. Clinical arithmetic for reference; patient decisions belong to treating clinicians.