Anion Gap Calculator
Enter serum sodium, chloride and bicarbonate in mEq/L and the calculator returns the anion gap — the difference between the main measured cation and the main measured anions. The classic formula is AG = Na⁺ − (Cl⁻ + HCO₃⁻). The anion gap helps separate the causes of metabolic acidosis into high-gap and normal-gap groups, which points toward very different underlying problems. This tool is a quick teaching and study aid; it runs entirely in your browser and is not a diagnostic device.
How the anion gap is calculated
-
1
Enter sodium
Type the serum sodium (Na⁺) in mEq/L. A typical value is around 140 mEq/L.
-
2
Enter chloride and bicarbonate
Add serum chloride (Cl⁻) and bicarbonate (HCO₃⁻), both in mEq/L. Bicarbonate is often reported as total CO₂ on a basic metabolic panel.
-
3
Read the gap
The calculator applies AG = Na⁺ − (Cl⁻ + HCO₃⁻) and displays the result in mEq/L, ready to compare against a reference range.
The formula
The serum anion gap estimates the unmeasured anions in plasma using routinely measured electrolytes:
AG = Na⁺ − (Cl⁻ + HCO₃⁻)
All three inputs are in milliequivalents per litre (mEq/L). Some labs and textbooks include potassium — AG = (Na⁺ + K⁺) − (Cl⁻ + HCO₃⁻) — which shifts the reference range up by roughly 4 mEq/L. This calculator uses the more common potassium-free version.
Worked example
Suppose a basic metabolic panel reports Na⁺ = 140, Cl⁻ = 104 and HCO₃⁻ = 24 mEq/L:
AG = 140 − (104 + 24) = 140 − 128 = 12 mEq/L
A value near 12 sits in the usual reference band. Now suppose the bicarbonate falls to 10 with chloride unchanged: AG = 140 − (104 + 10) = 26 mEq/L → a high anion gap, suggesting added acid.
Reference ranges
| Anion gap (mEq/L) | Interpretation (educational) |
|---|---|
| < 6 | Low gap — recheck; consider low albumin or lab error |
| 6 – 12 | Normal range (potassium-free formula) |
| > 12 | High anion gap — investigate added acids |
The common high-gap causes are often taught with the mnemonic GOLD MARK (glycols, oxoproline, lactate, D-lactate, methanol, aspirin, renal failure, ketoacidosis).
Pitfalls
- Albumin matters. Albumin is the dominant unmeasured anion, so low albumin lowers the gap; a corrected gap adds about 2.5 mEq/L for every 1 g/dL drop below 4 g/dL.
- Units must be mEq/L. Mixing mmol/L conventions or entering total CO₂ as something else skews the result.
- A “normal” gap is not reassuring on its own — a normal-gap (hyperchloraemic) acidosis still needs a cause.
- Lab variation. Reference ranges differ between analysers and between the K⁺-inclusive and K⁺-free formulas, so always read your own lab’s range.
Frequently Asked Questions
With the potassium-free formula used here, the normal range is roughly 6 to 12 mEq/L, though it varies by analyser. If potassium is included, the range shifts up by about 4 mEq/L. Always check the reference range printed by your own laboratory.
No. This calculator uses AG = Na⁺ − (Cl⁻ + HCO₃⁻), the most widely taught version. Some labs add potassium as (Na⁺ + K⁺) − (Cl⁻ + HCO₃⁻); if yours does, expect a slightly higher value and reference range.
No. The calculation runs entirely in your browser. The sodium, chloride and bicarbonate values you type are never sent to a server or saved, so nothing is uploaded or retained.
No. This calculator is for educational use only and is not a substitute for professional medical advice, diagnosis or treatment. Always rely on a qualified clinician and your laboratory’s reference ranges for real patient decisions.
Related Tools
BMI Calculator
Calculate body mass index from height and weight. Shows WHO category, healthy-weight range and limitations of BMI.
GPA Calculator
Calculate grade point average from letter grades and credit hours. Supports US 4.0 and 5.0 honors scales with the standard A/B/C/D letter table.
Inflation Calculator
Calculate the equivalent purchasing power of a dollar across any two years using historical CPI data from 1913 to today.
Scientific Calculator
Full scientific calculator with trig, log, exponents, factorial, memory, parentheses and DEG/RAD toggle. Runs in your browser.
Binomial Probability Calculator
Compute exact, cumulative and tail probabilities for a binomial distribution. Enter n trials, p success rate and k successes.
Calorie Calculator
Estimate daily calorie needs for your goal using Mifflin-St Jeor BMR and activity factors. Includes deficit and surplus targets.