Anion Gap Calculator
Use this anion gap calculator to find your serum anion gap from basic metabolic panel values, a screening step for metabolic acidosis.
Updated October 22, 2026
Medical Disclaimer: This calculator gives a general estimate for education only and cannot diagnose a condition. Share your result with your doctor or the clinician who ordered your test, and do not start, stop or change any medicine based on it. Read our full Medical Disclaimer.
How Anion Gap Is Calculated
Blood contains a mix of positively and negatively charged particles that must balance overall, but routine lab panels only measure some of them directly. The anion gap is a calculated stand-in for the unmeasured anions, mostly proteins, phosphates, and sulfates, and a gap outside the expected range is one of the first clues used to narrow down the cause of a metabolic acidosis¹.
What This Calculator Measures
This calculates the anion gap from your basic metabolic panel values, and optionally corrects it for albumin. It's a screening calculation used to help categorize the cause of a metabolic acidosis, not a diagnosis on its own.
The Formula
Anion gap = Sodium − (Chloride + Bicarbonate)
Some labs instead use Anion gap = Sodium + Potassium − (Chloride + Bicarbonate). Neither is universally "the" correct version. This calculator states clearly which formula was used rather than presenting one as the only correct number.
Albumin-corrected anion gap = Anion gap + 2.5 × (4.0 − measured albumin), since low albumin is itself an unmeasured anion, and low albumin can mask what would otherwise be an elevated gap².
How This Calculator Computes Your Result
Enter sodium, chloride, and bicarbonate, plus potassium if you want the potassium-inclusive version. If you enter albumin, we also show the albumin-corrected gap alongside the standard one.
Why the Reference Range Has Shifted Over Time
Reference ranges for the anion gap aren't fixed the way some lab values are. Older textbooks and teaching materials commonly cite a wider range, roughly 8 to 16 mEq/L, reflecting the older lab methods (like flame photometry) that were standard when the anion gap concept became widely used.
Many modern labs, using newer ion-selective electrode methods, now report a narrower range, often closer to 3 to 11 mEq/L. This is a genuine methodological shift, not just noise, which is why comparing your result to your own lab's reported reference range matters more than comparing it to a single fixed number quoted online.
A Worked Example
Say your panel shows sodium 138, chloride 104 and bicarbonate 22 mEq/L. The standard gap is 138 − (104 + 22) = 12 mEq/L. If you tick the potassium option and enter 4.0, the result becomes 138 + 4.0 − (104 + 22) = 16 mEq/L. That is why a potassium-inclusive result needs a potassium-inclusive reference range³.
Now add an albumin of 2.0 g/dL. The corrected gap is 12 + 2.5 × (4.0 − 2.0) = 17 mEq/L. A gap of 12 can look unremarkable, but once the low albumin is accounted for it may point to a high anion gap acidosis that would otherwise be missed³. The calculator applies the correction to any albumin you enter, so an albumin above 4.0 g/dL lowers the corrected gap slightly. Results are shown to one decimal place. Low albumin also affects total calcium, which the Corrected Calcium Calculator adjusts for.
What a High Anion Gap Can Point To
An elevated gap most often reflects a metabolic acidosis, but it can also come from a lab error, metabolic alkalosis, a high phosphate level or an abnormal blood protein (paraproteinemia)⁴. In a high anion gap metabolic acidosis, acids such as lactate, ketones or toxic metabolites build up and add unmeasured anions. The main causes clinicians consider include³:
Lactic acidosis, for example from shock or sepsis, or linked to drugs such as metformin
Ketoacidosis: diabetic, alcoholic or starvation
Kidney failure, which retains sulfate, phosphate and other acids, and rhabdomyolysis
Toxic alcohols such as methanol, ethylene glycol and propylene glycol
Salicylate (aspirin) poisoning
5-oxoproline (pyroglutamic acid), linked to chronic acetaminophen use, and D-lactic acidosis in short bowel syndrome
A gap above 18 mEq/L almost always means an organic acid is present, while kidney failure on its own rarely pushes the gap that high³. When toxic alcohol poisoning is a concern, clinicians often check the osmolar gap as well³.
Normal and Low Anion Gap Results
A metabolic acidosis with a normal gap is also called hyperchloremic acidosis, because chloride rises as bicarbonate falls and the gap stays the same³. Diarrhea and renal tubular acidosis are the main causes, and large volumes of IV normal saline are another common one³.
A low gap most often points to a lab error or low albumin. Less often it reflects a paraproteinemia, as in multiple myeloma, or intoxication with lithium, bromide or iodide⁴.
Comparing the Gap With Bicarbonate
When the gap is high, clinicians often compare the rise in the gap with the fall in bicarbonate, called the delta ratio, to look for a second acid-base disorder at the same time³. Kraut and Madias note that this ratio varies between patients, so it cannot be relied on alone to detect a mixed disorder⁴. This calculator does not compute the delta ratio.
A Note on Accuracy
Reference ranges have shifted over recent decades as lab measurement methods changed. Older textbooks cite a wider normal range than many modern labs now report, so check your own lab's reported range rather than a single fixed number. This uses the numbers on your lab report. It cannot diagnose a condition. It is built for use alongside a clinician. Ask the clinician who ordered the test what your result means for you.
Frequently Asked Questions
What is the anion gap used for?
It's a standard screening step for identifying the cause of a metabolic acidosis, calculated from sodium, chloride, and bicarbonate on a basic metabolic panel¹.
Should potassium be included in the formula?
Some labs use Na − (Cl + HCO3), others use Na + K − (Cl + HCO3). Neither is universally "the" correct formula. This calculator states clearly which version it used.
What is the albumin-corrected anion gap?
Low albumin can make the anion gap look artificially normal, since albumin is itself an unmeasured anion. The correction adds 2.5 × (4.0 − measured albumin) to account for this².
Is a normal or elevated anion gap diagnostic on its own?
No. This is a screening calculation. An elevated or a normal gap both need to be read alongside the full clinical picture, not as a standalone conclusion.
Sources
Clinical Use of the Anion Gap, Emmett & Narins, Medicine (Baltimore), 1977
Anion Gap and Hypoalbuminemia, Figge et al., Critical Care Medicine, 1998
Anion Gap and Non-Anion Gap Metabolic Acidosis, Kharsa et al., StatPearls, 2025
Serum Anion Gap: Its Uses and Limitations in Clinical Medicine, Kraut & Madias, Clinical Journal of the American Society of Nephrology, 2007