← All posts

Anion gap calculator, with potassium and albumin correction

By Firebird Systems, the makers of HealthViewer · Published October 23, 2026 · Last reviewed October 23, 2026

The anion gap is printed on most basic and comprehensive metabolic panels, but it isn’t measured. The lab subtracts the main negative ions from the main positive one. Blood has no real “gap”, so what’s left is the charge carried by everything the panel doesn’t measure, mostly albumin. A gap that is higher than usual can point to an acid the panel can’t see. Enter your electrolytes below. On a report, bicarbonate is often labeled CO2 or total CO2.

The formula

Anion gap = sodium − (chloride + bicarbonate)

All values are in mEq/L, which is the same as mmol/L for these ions, so the units on your report don’t matter. Some labs add potassium to the positive side:

Anion gap with potassium = (sodium + potassium) − (chloride + bicarbonate)

Potassium is small and steady, so this version reads about 4 mEq/L higher. Check which one your lab uses before comparing your result with its range.

What’s a normal anion gap

There is no single normal range. It depends on the lab’s analyzer. In a review, Kraut and Nagami note that normal values vary widely between labs. Labs that measure electrolytes with modern ion-selective electrodes often print about 3 to 11 mEq/L. Older methods gave higher ranges, up to about 16, and some labs still use them. The calculator reads a gap of 12 to 16 as high at some labs and normal at others. Your report’s own range decides it.

Correcting for albumin

Albumin is the biggest unmeasured anion. When albumin is low, as it often is in hospital patients and in liver or kidney disease, the gap shrinks, and it can look normal even when an extra acid is present. Figge and colleagues found the gap falls by about 2.5 mEq/L for each g/dL that albumin falls:

Corrected anion gap = anion gap + 2.5 × (4.0 − albumin in g/dL)

In g/L, that’s 0.25 × (40 − albumin). Figge’s paper used 4.4 g/dL as normal albumin. Most calculators use 4.0, as this one does. The choice moves the corrected gap by 1 mEq/L, which matters only near the top of the range.

GapAlbumin (g/dL)Corrected gap
104.010
103.012.5
102.015
81.514.3

All gaps in mEq/L.

What a high or low gap can mean

A high anion gap usually means an acid is present that the panel doesn’t measure. The common causes are lactic acid (from severe infection, poor circulation, or some medications), ketones (in diabetic ketoacidosis, starvation, or heavy alcohol use), and kidney failure, where the kidneys can’t clear the body’s daily acid load. Some poisonings, including methanol, ethylene glycol, and large doses of aspirin, also raise it.

A low anion gap is less common and is most often low albumin or a lab error. Some antibodies made in large amounts, as in multiple myeloma, carry a positive charge and lower the gap. Lithium and bromide can do the same.

The gap is a clue, not a diagnosis. It’s read with your bicarbonate, your blood pH if it was measured, and why the panel was ordered in the first place.

When the calculator differs from your report

Tracking electrolytes over time

A single anion gap is mostly useful in the moment. Over months, sodium, chloride, and bicarbonate are more informative charted on their own, and a gap that drifts with your albumin is the albumin, not a new acid. How to track your lab results over time covers how to read a series. The corrected calcium calculator uses the same albumin from the same panel.

The anion gap in HealthViewer

HealthViewer is a lab results tracker that runs on your own computer. It imports metabolic panels from lab report PDFs, MyChart downloads, and direct connections to your health system, and charts each test over time in Trends.

If your lab doesn’t print the gap, add a derived test in Settings. With A as sodium, B as chloride, C as carbon dioxide (bicarbonate), and a date window of 0 days so only results from the same draw are combined, the expression is A - (B + C). Add albumin as D for the corrected gap: A - (B + C) + 2.5 * (4 - D), with albumin in g/dL.

Everything stays in an encrypted file on your computer, with no account and no cloud service. Getting Started walks through the first import.


This calculator is for understanding your lab report, not for diagnosis or treatment. An abnormal anion gap needs a clinician’s interpretation alongside the rest of your results.