The anion gap is a quick screening calculation from a basic metabolic panel — sodium minus the sum of chloride and bicarbonate — that flags whether unmeasured acids or other anions have accumulated in the blood. This calculator computes the standard and potassium-inclusive versions and classifies the result against normal ranges.
How the anion gap works
The anion gap is calculated as AG = Na − (Cl + HCO3), using values from a routine basic metabolic panel. Emmett M and Narins RG formalized its clinical use in a landmark 1977 paper, building on the principle of electroneutrality: total measured cations should roughly equal total measured anions plus a gap made up of unmeasured anions (mostly serum albumin).
A normal anion gap is roughly 8 to 12 mEq/L (or 12 to 16 mEq/L if potassium is included in the formula). When the anion gap rises above normal, it signals that an unmeasured acid — such as ketoacids, lactate, or a toxic alcohol — has displaced bicarbonate, a pattern known as high-anion-gap metabolic acidosis.
Inputs and what they mean
Sodium (Na) and chloride (Cl) are the major measured cation and anion, both in mEq/L. Bicarbonate (HCO3) is the buffering anion and the value most directly affected by metabolic acidosis.
Potassium (K) is optional. Including it in the numerator raises the calculated gap by roughly the potassium concentration, which is why the potassium-inclusive normal range sits about 4 mEq/L higher than the standard range. Either convention is acceptable as long as it is applied consistently and the corresponding normal range is used.
Limits and edge cases
The anion gap is a screening tool, not a diagnosis. Serum albumin is the largest unmeasured anion, so hypoalbuminemia lowers the anion gap independent of acid-base status — an albumin-corrected anion gap (adding roughly 2.5 mEq/L per 1 g/dL that albumin is below normal) is more accurate in patients with low albumin, such as those who are critically ill or malnourished. Lab measurement variability, unmeasured cations (e.g. lithium, IgG paraproteins in multiple myeloma), and bromide intoxication can also shift the gap. A normal anion gap does not rule out metabolic acidosis — normal-anion-gap (hyperchloremic) acidosis is a distinct, common pattern.