HomeMedical & Clinical › Anion Gap Calculator

Anion Gap Calculator

Computes the serum anion gap from sodium, chloride and bicarbonate, optionally including potassium, and the albumin-corrected gap (Figge) for hypoalbuminaemia.

When to use

You have a basic metabolic panel and want the anion gap to classify a metabolic acidosis or check for unmeasured anions.

Do not use when: Electrolytes come from different samples or times, or you need a full acid-base interpretation (pH, pCO2, delta ratio), which this calculator does not perform.

Formula

anion_gap = sodium − (chloride + bicarbonate); with potassium: sodium + potassium − (chloride + bicarbonate); albumin-corrected gap = anion_gap + 2.5 × (4.0 − albumin_g_dl)

Reference ranges depend on the analyser (traditional 8–16 mEq/L; ion-selective electrodes often give 3–11), so compare with the local laboratory range; each 1 g/dL fall in albumin lowers the expected gap by about 2.5 mEq/L (Figge 1998). Results are informational only and not a substitute for clinical judgement or medical advice.

Inputs

ParameterTypeUnitRequiredDescription
sodium_mmol_lnumbermmol/LyesSerum sodium (mmol/L = mEq/L). Range: ≥ 100, ≤ 200
chloride_mmol_lnumbermmol/LyesSerum chloride. Range: ≥ 50, ≤ 160
bicarbonate_mmol_lnumbermmol/LyesSerum bicarbonate (total CO2). Range: ≥ 1, ≤ 60
potassium_mmol_lnumbermmol/LnoOptional serum potassium; adds the gap variant that includes K. Range: ≥ 1, ≤ 12
albumin_g_dlnumberg/dLnoOptional serum albumin in g/dL (g/L ÷ 10); enables the albumin-corrected gap. Range: > 0, ≤ 7

Outputs

OutputTypeUnitDescription
anion_gapnumbermEq/LNa − (Cl + HCO3).
anion_gap_with_potassiumnumbermEq/LNa + K − (Cl + HCO3); only when potassium is given (reference range about 4 mEq/L higher).
albumin_corrected_anion_gapnumbermEq/LGap + 2.5 × (4 − albumin g/dL); only when albumin is given.
interpretationstringLow / normal / elevated against the traditional 8–16 mEq/L range (corrected gap when albumin is given).

Example

Na 140, Cl 104, HCO3 24, K 4.0, albumin 3.0: {"sodium_mmol_l":140,"chloride_mmol_l":104,"bicarbonate_mmol_l":24,"potassium_mmol_l":4,"albumin_g_dl":3}{"anion_gap":12,"anion_gap_with_potassium":16,"albumin_corrected_anion_gap":14.5,"interpretation":"Normal (8–16 mEq/L, albumin-corrected)"}

Na 135, Cl 100, HCO3 10: {"sodium_mmol_l":135,"chloride_mmol_l":100,"bicarbonate_mmol_l":10}{"anion_gap":25,"interpretation":"Elevated (>16 mEq/L): pattern of a high anion gap metabolic acidosis"}

GET https://tttkmbb.com/api/v1/calculate/anion-gap?sodium_mmol_l=140&chloride_mmol_l=104&bicarbonate_mmol_l=24&potassium_mmol_l=4&albumin_g_dl=3

Machine access

Sources

FAQ

Should potassium be included?

Most laboratories and textbooks omit potassium (normal about 8–16 mEq/L); including it raises the value by roughly 4 mEq/L, so use the matching reference range (about 12–20).

Why correct for albumin?

Albumin is the main unmeasured anion; in hypoalbuminaemia a 'normal' gap can hide an excess of other anions such as lactate or ketoacids.

Related calculators