Labs
Anion gap calculator
Calculate the serum anion gap — Na⁺ − (Cl⁻ + HCO₃⁻) — from sodium, chloride, and bicarbonate, and see the full worked subtraction behind the number, plus whether it lands in the commonly cited normal range. Free, no signup, runs in your browser.
Interactive calculator
Anion gap calculator
Enter serum sodium, chloride, and bicarbonate — all in mEq/L — to calculate the anion gap and see the worked setup below. Results update as you type.
Result
Enter sodium, chloride, and bicarbonate to see the anion gap and the worked setup.
For education and practice only. The anion gap must be interpreted alongside the full clinical picture, the reporting lab’s own reference range, and — where relevant — an albumin correction.
How it works
The anion gap formula
The anion gap is a simple subtraction that estimates the unmeasured anions in the serum. It is most useful when working up a metabolic acidosis, where an elevated gap points toward the buildup of unmeasured acids.
Anion gap (mEq/L)
AG = Na⁺ − (Cl⁻ + HCO₃⁻)
Add chloride and bicarbonate, then subtract that sum from serum sodium. The result is in mEq/L. A commonly cited normal range is about 8–12 mEq/L, though it varies by lab and assay.
Albumin correction (context)
corrected AG = AG + 2.5 × (4.0 − albumin g/dL)
Albumin is the largest unmeasured anion, so a low albumin lowers the measured gap and can hide a true high-gap acidosis. This calculator reports the uncorrected gap; correction factors vary by source.
Worked examples
An anion gap calculation, step by step
Normal gap
Serum Na 140, Cl 104, HCO₃ 24 mEq/L. What is the anion gap?
The setup
- 1. Add the anions: 104 + 24 = 128.
- 2. Subtract from sodium: 140 − 128 = 12.
Answer: 12 mEq/L — the upper end of the normal 8–12 range.
High gap
Serum Na 140, Cl 100, HCO₃ 12 mEq/L. What is the anion gap?
The setup
- 1. Add the anions: 100 + 12 = 112.
- 2. Subtract from sodium: 140 − 112 = 28.
Answer: 28 mEq/L — elevated, consistent with a high-anion-gap metabolic acidosis.
Reading the result
A gap of 12 mEq/L sits at the top of the commonly cited normal range, while 28 mEq/L is clearly elevated — the kind of value that, with a metabolic acidosis, prompts a search for unmeasured acids (the MUDPILES causes). Enter each set of numbers in the calculator above to see the same worked subtraction returned. Because the normal range varies by lab, always compare against the reporting lab’s own reference interval.
Common questions
The anion gap, explained
The anion gap is a calculated value that estimates the difference between the measured cations and the measured anions in the serum. It is used mainly to work up a metabolic acidosis: a high gap points toward the buildup of unmeasured acids, so it helps narrow down the cause and guide further testing. It is one piece of an acid–base assessment, never read in isolation.
Anion gap (mEq/L) = Na⁺ − (Cl⁻ + HCO₃⁻) — serum sodium minus the sum of chloride and bicarbonate. Some formulas add potassium (Na⁺ + K⁺ − (Cl⁻ + HCO₃⁻)); the potassium-free version above is the one most commonly taught and used because serum potassium changes little.
A commonly cited normal range is about 8–12 mEq/L, though some labs report roughly 3–11 mEq/L. The exact reference range varies by laboratory and assay, so always compare a result against the reporting lab's own reference interval rather than a single fixed number.
A high (elevated) anion gap acidosis, above about 12 mEq/L, reflects added unmeasured acids — the causes are often remembered with the mnemonic MUDPILES (methanol, uremia, diabetic ketoacidosis, propylene glycol, iron/isoniazid, lactic acidosis, ethylene glycol, salicylates). A normal-gap (non-anion-gap) acidosis instead reflects a loss of bicarbonate with a rise in chloride, as in diarrhea or renal tubular acidosis. MUDPILES is a study memory aid, not a diagnostic tool.
Albumin is the largest unmeasured anion, so a low serum albumin lowers the measured gap and can mask a true high-gap acidosis. A commonly taught adjustment is: corrected anion gap = measured gap + 2.5 × (4.0 − albumin in g/dL). This calculator reports the uncorrected gap; in a patient with low albumin, the corrected value is worth considering. Ranges and correction factors vary by source.
The gap represents unmeasured anions — mostly albumin, phosphate, sulfate, and organic acids — that are not captured by the routine sodium, chloride, and bicarbonate measurements. This calculator is completely free, needs no account, and runs in your browser. It is a study and practice aid only, not a diagnostic tool or a substitute for clinical judgment and the full clinical picture.
Keep going
From lab values to the whole picture
The anion gap is one lab in a bigger acid–base and renal workup. Check kidney function with the creatinine clearance calculator, review the medical-surgical study questions, or explore the other free calculators.
This calculator and all study material on this site are provided for practice and study only. Reference ranges vary by laboratory; verify every value against the reporting lab.
More free tools
Related calculators
Reach for these alongside this one — the calculations that most often come up together on the wards and in practice questions.
Creatinine Clearance Calculator
Cockcroft-Gault creatinine clearance for renal dosing and drug safety.
Mean Arterial Pressure (MAP) Calculator
MAP from a blood pressure reading to judge organ perfusion.
Glasgow Coma Scale (GCS) Calculator
Score eye, verbal, and motor response to grade level of consciousness.
Practice these — free questions
Apply it on real NCLEX-style questions
A calculator hands you the number; the exam makes you reach it under pressure and defend it. Drill Medical-Surgical questions that put this calculation inside a realistic clinical scenario — each one with a written rationale, so you learn why the answer is right, not just what it is. That explained-rationale practice is what sets us apart from a bare calculator.
Free · no spam
Get a free high-yield NCLEX question every week
One carefully written practice question plus a short study tip, emailed weekly. Unsubscribe anytime — we never share your address.