Anion Gap Calculator
Compute the anion gap and the albumin-corrected anion gap from sodium, chloride, bicarbonate and albumin.
Sodium minus the measured anions
Enter sodium, chloride and bicarbonate in mmol/L. The anion gap is Na − (Cl + HCO3). The page also prints the albumin-corrected gap, AG + 2.5 × (4.0 − albumin in g/dL), using 4.0 g/dL as the reference albumin and 2.5 as the correction slope.
All four fields must be above zero; a zero or negative albumin is refused rather than replaced, because the correction assumes a real measured value. The page prints the two numbers and does not label either as high or low. This is arithmetic aid for a qualified reader, not a diagnosis or medical advice.
The arithmetic is three subtractions and one multiplication on the values in the form. The same inputs give the same gap after a reload, and the page keeps no record of what you entered.
The page computes the anion gap as AG = Na − (Cl + HCO3), all three in mmol/L, and then the albumin-corrected gap as AG + 2.5 × (4.0 − albumin), with albumin in g/dL. The 2.5 and the 4.0 g/dL reference albumin are the usual correction constants and are printed with the answer.
Both figures are shown: the raw subtraction and the corrected value, so you can see exactly how much the albumin term moved it.
How to use it
Enter sodium, chloride and bicarbonate in mmol/L and albumin in g/dL, then press Run. Each input must be above zero. The output prints the anion gap, the albumin-corrected gap, and both substitutions with your numbers in place.
The arithmetic
With sodium 140, chloride 104 and bicarbonate 24, the sum inside the bracket is 128 and the gap is 12 mmol/L. The correction adds 2.5 for every g/dL the albumin sits below 4.0, so an albumin of 3.0 g/dL adds 2.5 mmol/L to the gap and an albumin of 4.0 leaves it unchanged. The two constants are part of the correction, not readings.
Where the page stops
The page never labels the gap, never calls a value raised or reduced, and carries no reference interval. It computes the two figures the formula defines and stops. A non-numeric or non-positive box is refused by name.
What to Expect
Best for
- Reproducing the anion gap subtraction and its albumin correction from electrolytes already on screen.
What this tool keeps
- Both the uncorrected and corrected gap are printed with their substitutions.
What may need cleanup
- Nothing: the four inputs and two results are the whole page.
Sample input
Na 140, Cl 104, HCO3 24 mmol/L, albumin 4 g/dL
Sample output
Anion gap = 12 mmol/L Albumin-corrected anion gap = 12 mmol/L AG = Na − (Cl + HCO3) = 140 − (104 + 24) = 12 mmol/L Corrected = AG + 2.5 × (4.0 − albumin) = 12 + 2.5 × 0 = 12 mmol/L
Frequently asked questions
How do I use the anion gap calculator?
Enter sodium, chloride and bicarbonate in mmol/L and albumin in g/dL, then press Run. The output shows the anion gap, the albumin-corrected gap, and both lines of arithmetic with your values in them.
Is anything uploaded when I press Run?
No. The arithmetic runs in this tab with JavaScript: nothing is posted to a server, nothing is stored, and reloading the page discards both the input and the result.
What does the albumin correction actually change?
It adds 2.5 mmol/L for each g/dL the albumin is below the 4.0 g/dL reference the correction is written against. Both the uncorrected and corrected gaps are printed, so the size of that shift is visible rather than assumed.
Is this a diagnosis or medical advice?
No. It is an arithmetic aid for a qualified reader: the page prints the formula's output and the numbers behind it, and leaves interpretation, and any decision taken from it, to someone qualified to make it. It is not a diagnosis and not medical advice.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.