The formula
How to calculate anion gap
The anion gap is the difference between measured cations and measured anions in serum. It does not represent a real charge imbalance — it reflects the unmeasured anions, and a raised gap points towards specific causes of metabolic acidosis.
Albumin is the largest unmeasured anion, so a low albumin lowers the gap and can mask an acidosis. The correction adds roughly 2.5 mmol/L for every 10 g/L that albumin falls below normal.
Here is what each field means:
- Sodium (mmol/L)
- Chloride (mmol/L)
- Bicarbonate (mmol/L)
- Albumin (g/L)
The result updates on every keystroke. The URL updates too, which makes the filled-in version easy to bookmark or send to someone else.
If an exact figure for one of the fields is not available, a careful estimate is a reasonable starting point, since the calculator recomputes instantly the moment a more accurate number is available — nothing here depends on getting every field exact on the first pass.
Why anion gap matters
The formula behind anion gap comes from published research rather than being invented for this page, and it is presented here exactly as it appears in the literature it is drawn from — the value of a calculator is applying it correctly and instantly, not reinventing it.
This tends to get checked before or after a change in routine — a new training block, a change in diet, a different stage of a pregnancy — as a way of putting a figure on something that would otherwise only be felt rather than measured.
None of the figures produced on this page are intended to replace a proper assessment, and nothing here should be read as a diagnosis or a treatment recommendation. What a calculator like this is good for is preparation — arriving at an appointment with an actual number already in hand, rather than a vague sense of a change, tends to make that conversation more useful for everyone involved.
Where a result depends on more than one measurement, small errors in each input tend to compound rather than cancel out — a slightly mismeasured waist and a slightly mismeasured height, taken together, can shift a derived figure more than either error would on its own. Taking each measurement carefully, and ideally twice, is worth the extra minute it takes.
Worked example
Work through the defaults on this page:
- Sodium: 140 mmol/L
- Chloride: 104 mmol/L
- Bicarbonate: 24 mmol/L
- Albumin: 32 g/L
That gives:
- Anion gap: 12 mmol/L
- Albumin-corrected anion gap: 14 mmol/L
- Correction applied: 2 mmol/L
Those starting figures exist only to show the calculation working, not as a target or a reference value to compare yourself against — replace them with your own measurements in the calculator above and the same formula applies exactly as shown.
Reading the result
A normal gap is around 8–12 mmol/L with modern analysers. A raised gap suggests lactate, ketones, renal failure or toxic alcohols; a normal gap in the presence of acidosis points towards bicarbonate loss.
Where this goes wrong. Reference ranges differ between laboratories and between the versions that include potassium. This page is a clinical reference aid — interpretation belongs with the treating clinician and the full picture, not with a number alone.
As with any general-purpose formula, the result here is an estimate derived from population averages, not a measurement specific to you — a reasonable starting point for a conversation with a qualified professional, not a replacement for one. Nothing on this page is medical advice.
Both versions exist. Including it raises the gap by roughly 4 mmol/L and shifts the reference range accordingly. Most UK laboratories quote the version without potassium.
Classically lactic acidosis, ketoacidosis, renal failure and ingestions such as methanol or ethylene glycol. The mnemonic GOLDMARK is the modern replacement for MUDPILES.
The answer it gives you is anion gap. With 140 mmol/L sodium, 104 mmol/L chloride and 24 mmol/L bicarbonate, that comes to 12 mmol/L. Change any field and the figure moves with it.
It uses a published formula applied exactly as defined, so the arithmetic itself is precise — but the formula is a population-level estimate, and individual results can vary from it for reasons the formula has no way to account for. Treat the output as a reasonable estimate rather than a measured or diagnostic value.
For most people, yes — a single reading is a snapshot, while the same measurement repeated consistently over weeks or months shows a trend, which is generally more informative than any one figure taken in isolation.
Small differences between calculators usually come down to which published formula or reference dataset each one uses — several equations in this area exist in more than one accepted version. This page states the specific formula used in the section above, so it is possible to check directly whether another source is using the same one.