BYTETOOLS

Anion Gap Calculator

Calculate the serum anion gap, the potassium-inclusive variant, the albumin-corrected gap and the delta ratio, with editable reference ranges.

Serum electrolytes (mmol/L, numerically identical to mEq/L for these monovalent ions)

Albumin correction and reference values

12.0
Anion gap
16.0
With potassium
12.0
Albumin-corrected
Delta ratio

Result

12.0 mmol/L

Anion gap within the entered rangeSits inside the 8–12 range you entered.
Na − (Cl + HCO₃)140 − (104 + 24) = 12.0
Albumin correction, +2.5 per g/dL below normal12.0 + 2.5 × (4.0 − 4.0) = 12.0

Delta ratio (ΔAG ÷ ΔHCO₃)

Δ anion gap (measured − baseline)0.0
Δ bicarbonate (baseline − measured)0.0
Delta ratio

The delta ratio only means anything when the gap is raised and the bicarbonate has fallen below its baseline. With the numbers entered there is no high-gap acidosis to apportion, so no ratio is shown rather than a divide-by-zero.

Estimates only, not medical advice — always check against your local laboratory ranges and protocol. The anion gap is an arithmetic construct, not a measurement: it moves with albumin (roughly 2.5 mmol/L per g/dL, which is why the correction exists), with paraproteins, with severe hyperlipidaemia and with the analyser method itself, so the “normal” range differs between hospitals. Reference ranges of 8–16 were typical of older flame-photometry chloride assays; ion-selective electrodes usually give 8–12. The delta ratio is a bedside heuristic derived from small case series and performs poorly when the bicarbonate has been altered by fluids, so treat it as a prompt to look harder, never as a diagnosis.

What is the Anion Gap Calculator?

The anion gap is sodium minus the sum of chloride and bicarbonate. A potassium-inclusive variant adds potassium to the sodium, and the albumin-corrected gap adds 2.5 mmol/L for every g/dL that albumin sits below normal, because albumin is the largest unmeasured anion.

  • Standard, potassium-inclusive and albumin-corrected anion gaps side by side
  • Delta ratio with the mixed-disorder interpretation bands
  • Editable normal range, baseline bicarbonate and baseline gap
  • Albumin entered in g/dL or g/L with automatic conversion
  • Shows the full substitution for every step, never just a bare number
  • Runs entirely offline in your browser — laboratory values never leave your device

How to use the Anion Gap Calculator

  1. 1

    Enter sodium, chloride and bicarbonate in mmol/L (numerically identical to mEq/L for these monovalent ions), plus potassium if you want the K-inclusive variant.

  2. 2

    Tick the potassium-inclusive and albumin-correction options you want applied to the headline figure.

  3. 3

    Set the albumin units, the measured albumin and the normal-albumin constant your laboratory uses.

  4. 4

    Adjust the normal anion gap range, and the baseline bicarbonate and gap the delta ratio compares against.

  5. 5

    Read the gap, the corrected gap and the delta ratio, each with its interpretation band and the arithmetic shown underneath.

About the Anion Gap Calculator

The ByteTools Anion Gap Calculator takes a basic metabolic panel and returns the anion gap four ways: the standard Na − (Cl + HCO₃), the potassium-inclusive form, the albumin-corrected value, and the delta ratio that separates a pure high-gap acidosis from a mixed picture. Every threshold is a field you can edit rather than a number baked into the page.

It is aimed at clinicians, students and anyone revising acid-base physiology who wants the working shown rather than just an answer. The tool prints the substitution it performed for each step, converts albumin between g/dL and g/L, and refuses to divide when the bicarbonate has not actually fallen, showing a dash and an explanation instead of a meaningless ratio.

Everything runs in JavaScript inside your browser — no laboratory value is uploaded, logged or stored anywhere. These are estimates for education and cross-checking only, not medical advice, and every result should be read against your own laboratory's reference range and your local protocol.

Frequently asked questions

What is a normal anion gap?

On modern ion-selective analysers most laboratories quote 8–12 mmol/L. Older flame-photometry chloride methods gave higher values, which is why textbooks written before the 1990s often say 8–16. Because the range genuinely differs between hospitals, this calculator lets you type in the one your laboratory reports.

Why do you correct the anion gap for albumin?

Albumin is the biggest unmeasured anion in plasma, so a low albumin lowers the gap and can hide a genuine high-gap acidosis. The usual correction adds about 2.5 mmol/L to the gap for every 1 g/dL that albumin falls below 4 g/dL. In critically ill patients with an albumin of 2 g/dL, that is a five-point difference.

What does the delta ratio tell you?

It compares how far the anion gap has risen with how far the bicarbonate has fallen. Roughly, below 0.4 suggests a normal-gap hyperchloraemic acidosis, 0.8 to 2.0 fits a pure high-gap acidosis, and above 2.0 suggests a coexisting metabolic alkalosis or a chronic respiratory acidosis. It is a heuristic, not a test.

Should potassium be included in the anion gap?

Both forms are in use. Including potassium raises the gap by roughly 4 mmol/L and shifts the reference range with it, so the two versions are not interchangeable. Use whichever your laboratory and local protocol quote, and be consistent when you compare results over time.

What causes a high anion gap?

The GOLD MARK mnemonic covers the usual suspects: glycols, oxoproline, L-lactate, D-lactate, methanol, aspirin, renal failure and ketoacidosis. A high gap is a prompt to look for an unmeasured acid, not a diagnosis in itself, and the clinical context usually narrows it quickly.

How accurate is this calculator?

The arithmetic is exact, but the gap is a derived number, not a measurement. It inherits error from each electrolyte assay, moves with albumin and paraproteins, and varies with the analyser method. Treat it as one input into a clinical picture rather than an answer on its own.

Related tools