Use this anion gap calculator to calculate AG from sodium, chloride, and bicarbonate (HCO3), with optional potassium when your lab includes it.
Last reviewed: February 26, 2026
Most labs report the anion gap without potassium unless specified.
The anion gap estimates unmeasured anions by comparing measured cations and anions in serum. The standard formula excludes potassium:
AG = Na - (Cl + HCO3). Some labs include potassium: AG = Na + K - (Cl + HCO3).
Anion gap reference ranges differ by lab and assay method. Mild elevations may reflect laboratory variation, while higher values can suggest unmeasured anions (for example, lactate or ketones) in the appropriate clinical setting.
This calculator does not adjust for albumin or lactate. If you need corrected values, compute them separately and document the correction method.
Most labs report the anion gap without potassium. If your lab includes K+ in the reported anion gap, toggle it on here so your calculation matches the lab reference range.
Use the serum bicarbonate (total CO2) reported on a BMP/CMP. Do not use arterial pH values or calculated bicarbonate from ABG unless that is how your lab reports it.
Reference ranges vary by lab and age. Many labs list an anion gap around 8-12 mEq/L when potassium is excluded; including K+ raises the range by roughly 3-5 mEq/L. Always use your local lab reference.
Hypoalbuminemia lowers the anion gap. A common correction is: corrected AG = AG + 2.5 x (4 - albumin g/dL) when albumin is below 4 g/dL.
Document formula convention (K included or excluded), lab timestamp, key differential considerations, and planned recheck timing. This makes serial interpretation safer across shifts.