Health Calculator
Anion Gap Calculator
Calculate the serum anion gap from sodium, chloride and bicarbonate, with the option to include potassium or correct for a low albumin. Every result is interpreted against the reference range that matches the formula you chose, with the full arithmetic shown step by step.
Anion Gap Calculator
Serum anion gap with optional potassium and albumin correction
Reference range: 8–12 mEq/L (without K⁺) — the range shifts with the method.
Normal 135–145
Normal 98–107
Normal 22–29
Anion gap: 12 mEq/L
Results
Enter the electrolyte values, then click Calculate Anion Gap
Understanding the Anion Gap
Blood is electrically neutral: the total positive charge and the total negative charge are always equal. A routine chemistry panel, however, measures only some of those charges — sodium on one side, chloride and bicarbonate on the other. Subtracting what is measured leaves an apparent surplus of cations, and that surplus is the anion gap.
The gap is not a real imbalance. It is the size of the unmeasured anion pool — predominantly albumin, together with phosphate, sulphate and organic acids. When acids such as lactate or ketoacids accumulate, they consume bicarbonate and take its place, so bicarbonate falls while the gap widens. That single number is what makes it possible to separate a high-gap acidosis from a normal-gap one at the bedside.
Because albumin dominates the gap, anything that lowers albumin lowers the measured gap with it. This is why the albumin correction matters in the acutely unwell, where an apparently reassuring number can conceal a significant acidosis.
Anion Gap Formulas
Three formulas cover every case this calculator handles. All electrolytes are entered in mEq/L, which is numerically identical to mmol/L for these monovalent ions.
1. Standard Anion Gap
The conventional formula, excluding potassium:
2. Anion Gap Including Potassium
Potassium is added to the cation side, which raises every result by roughly 4 mEq/L:
3. Albumin-Corrected Anion Gap
Applied on top of either formula above when albumin is below the reference of 4.0 g/dL:
Each 1 g/dL fall in albumin removes about 2.5 mEq/L of negative charge from the unmeasured pool, so the correction adds that charge back. The corrected value is then compared against the same reference range as the uncorrected one.
Why the Reference Range Must Match the Formula
This is the single most common way an anion gap is misread. Including potassium adds about 4 mEq/L to every result, so the reference range has to move up by the same amount. Judging a with-potassium result against the 8–12 range will flag almost every healthy patient as abnormal.
The effect is easiest to see on one set of values. Take a patient with sodium 140, chloride 103, bicarbonate 24 and potassium 3.0:
| Method | Gap | Range | Reads As |
|---|---|---|---|
| Without K⁺ — 140 − (103 + 24) | 13 | 8–12 | High |
| With K⁺ — (140 + 3) − (103 + 24) | 16 | 12–16 | Normal |
Same patient, same blood sample, two different classifications — and neither is wrong, because each is being read against its own range. This calculator switches the range with the method automatically, so the two can never fall out of step.
Reference Ranges and Interpretation
How results are classified under each method. Laboratory ranges vary, so these are typical values rather than universal ones:
| Classification | Without K⁺ | With K⁺ | Typical Meaning |
|---|---|---|---|
| Low | < 8 | < 12 | Usually hypoalbuminaemia; check albumin first |
| Normal | 8–12 | 12–16 | Does not exclude a normal-gap acidosis |
| High | 13–20 | 17–24 | Unmeasured anions accumulating |
| Markedly High | > 20 | > 24 | Substantial accumulation; urgent assessment |
Causes of an Abnormal Anion Gap
A raised gap points to an unmeasured anion that should not be there. A low gap almost always points back to albumin.
| Direction | Cause | Unmeasured Anion Involved |
|---|---|---|
| High | Lactic acidosis — sepsis, shock, hypoxia | Lactate |
| High | Ketoacidosis — diabetic, alcoholic, starvation | Ketoacids |
| High | Renal failure | Phosphate, sulphate |
| High | Toxic ingestion — methanol, ethylene glycol, salicylate | Formate, oxalate, salicylate |
| Low | Hypoalbuminaemia — the commonest cause by far | Reduced albumin |
| Low | Paraproteinaemia, lithium, severe hypercalcaemia | Extra unmeasured cations |
| Normal | Diarrhoea, renal tubular acidosis, saline infusion | None — chloride replaces bicarbonate |
The last row is the reason a normal gap never closes the question. In a hyperchloraemic acidosis the bicarbonate falls and the chloride rises to match it, so the gap stays exactly where it was while the patient is meaningfully acidotic.
Benefits of Using the Anion Gap Calculator
Example Calculations
Three worked examples, one for each formula:
Example Scenario 1 — Standard Anion Gap
Sodium 140, Chloride 104, Bicarbonate 24 mEq/L. Potassium excluded.
Formula: Anion Gap = Na⁺ − (Cl⁻ + HCO₃⁻)
Anions = Cl⁻ + HCO₃⁻ = 104 + 24 = 128 mEq/L
Anion Gap = 140 − 128 = 12 mEq/L
Reference range without K⁺: 8–12 mEq/L
Result: 12 mEq/L — Normal, sitting right at the upper limit
Example Scenario 2 — Anion Gap Including Potassium
Sodium 138, Potassium 4, Chloride 102, Bicarbonate 22 mEq/L.
Formula: Anion Gap = (Na⁺ + K⁺) − (Cl⁻ + HCO₃⁻)
Cations = 138 + 4 = 142 mEq/L
Anions = 102 + 22 = 124 mEq/L
Anion Gap = 142 − 124 = 18 mEq/L
Reference range with K⁺: 12–16 mEq/L
Result: 18 mEq/L — High, suggesting unmeasured anions
Example Scenario 3 — Albumin-Corrected Gap
Measured anion gap 10 mEq/L with a serum albumin of 2.0 g/dL.
Formula: Corrected AG = AG + 2.5 × (Normal Albumin − Measured Albumin)
Correction = 2.5 × (4.0 − 2.0) = 5 mEq/L
Corrected Anion Gap = 10 + 5 = 15 mEq/L
Uncorrected, 10 mEq/L reads as Normal against the 8–12 range
Corrected, 15 mEq/L reads as High
Result: hypoalbuminaemia masked a genuinely elevated gap
Clinical Context Note
The anion gap is one input among many and is never interpreted alone. Reference ranges differ between laboratories and assay methods — particularly for chloride, where a change of method can shift the whole range — so always use the range printed on your own report. A gap only becomes meaningful alongside the bicarbonate, the blood gas and the clinical picture. This calculator is an educational and reference tool; it does not provide medical advice or replace clinical assessment.
Frequently Asked Questions
- What is the anion gap?
- The anion gap is the difference between the measured cations and measured anions in serum. Because blood is electrically neutral overall, the gap represents anions that a routine panel does not measure — chiefly albumin, along with phosphate, sulphate and organic acids. It is calculated as sodium minus the sum of chloride and bicarbonate, and is used mainly to narrow the cause of a metabolic acidosis.
- How do you calculate the anion gap?
- Subtract the anions from the cations. The standard formula is Anion Gap = Na⁺ − (Cl⁻ + HCO₃⁻). For example, with a sodium of 140, chloride of 104 and bicarbonate of 24, the gap is 140 − (104 + 24) = 12 mEq/L. All values are entered in mEq/L, which is equivalent to mmol/L for these monovalent ions.
- What is a normal anion gap?
- Without potassium, the usual reference range is 8–12 mEq/L. When potassium is included in the formula the range shifts up to 12–16 mEq/L, because serum potassium sits at roughly 4 mEq/L. Ranges also vary by laboratory and assay method, so always defer to the range printed on your own report.
- Should potassium be included in the anion gap?
- Both conventions are in use and both are valid, provided the matching reference range is applied. Most clinical practice omits potassium because it varies little and the narrower range is easier to interpret. What matters is consistency — using the with-potassium formula against the 8–12 range will make almost every normal result look elevated.
- Why does the reference range change when potassium is added?
- Adding potassium to the cation side adds roughly 4 mEq/L to every result, so the entire range moves up by about the same amount. A gap of 14 is elevated under the 8–12 range but perfectly normal under the 12–16 range. This calculator switches the range automatically with the method so the two can never be mismatched.
- What causes a high anion gap?
- An elevated gap reflects accumulated unmeasured anions. The common causes are lactic acidosis, ketoacidosis (diabetic, alcoholic or starvation), renal failure with retained phosphate and sulphate, and certain toxic ingestions such as methanol, ethylene glycol or salicylates. These are often recalled through the GOLD MARK or MUDPILES mnemonics.
- What causes a low anion gap?
- A low gap is much less common than a high one and is most often caused by hypoalbuminaemia, since albumin is the dominant unmeasured anion. Other causes include laboratory error, severe hypercalcaemia or hypermagnesaemia, lithium therapy, and paraproteinaemia such as in multiple myeloma. A genuinely low gap usually warrants checking the albumin first.
- Why correct the anion gap for albumin?
- Albumin is negatively charged and accounts for the bulk of the normal anion gap, so a low albumin lowers the measured gap and can hide a real high-gap acidosis. The correction adds 2.5 mEq/L for every 1 g/dL that albumin falls below the reference of 4.0 g/dL. In a critically ill patient with an albumin of 2.0, an apparently normal gap of 10 corrects to 15 — a genuinely high result.
- Does a normal anion gap rule out acidosis?
- No. A normal-gap metabolic acidosis, also called hyperchloraemic acidosis, is entirely possible and is typically caused by diarrhoea, renal tubular acidosis or large-volume saline infusion. In these cases bicarbonate falls but chloride rises to match, leaving the gap unchanged. The bicarbonate value and the clinical picture matter alongside the gap.
- Is the anion gap measured in mEq/L or mmol/L?
- Either — for sodium, potassium, chloride and bicarbonate the two units are numerically identical, because all four are monovalent. A sodium of 140 mmol/L is also 140 mEq/L, so no conversion is needed. Albumin is the exception: it is entered in g/dL here, and a value reported in g/L should be divided by 10.