The anion gap measures the difference between blood cations and anions to identify metabolic acidosis. Enter your electrolyte values below for instant clinical interpretation.
Enter your electrolyte values to get instant results with clinical interpretation and visual feedback.
All values in mEq/L (mmol/L)
Enter values and click Calculate to see your results
The anion gap formula is straightforward. You need three lab values from a basic metabolic panel.
This is the most widely used version. It subtracts the two major measured anions (chloride and bicarbonate) from the major measured cation (sodium). Most labs and textbooks default to this formula.
Some clinicians include potassium. Because potassium levels are small (3.5–5.0 mEq/L) and tightly regulated, this version rarely changes the clinical picture. The normal range shifts to 10–20 mEq/L when potassium is included.
This updates in real-time as you change the electrolyte values in the calculator above.
The anion gap is a calculated value from routine blood work that tells clinicians about the balance of charged particles in the blood.
The anion gap represents the difference between positively charged ions (cations) and negatively charged ions (anions) that are routinely measured in the blood. In a healthy person, this gap is made up of unmeasured anions — proteins like albumin, phosphate, sulfate, and organic acids.
The body always maintains electrical neutrality. Total cations must equal total anions. But standard lab panels only measure some of them. The anion gap fills in what the labs don't directly report.
Doctors order the anion gap when they suspect acid-base problems. It helps answer a specific question: is there an excess of unmeasured acids in the blood? A high anion gap points to conditions like diabetic ketoacidosis, lactic acidosis, or toxic ingestions. A normal anion gap with acidosis suggests chloride-related problems like diarrhea or renal tubular acidosis.
Normal values depend on the formula used and can vary slightly between laboratories.
The standard anion gap (without potassium) normally falls between 8 and 12 mEq/L. When potassium is included in the corrected formula, the normal range is 10 to 20 mEq/L.
These numbers assume a normal serum albumin of about 4 g/dL. Each 1 g/dL drop in albumin lowers the anion gap by roughly 2.5 mEq/L. So a patient with an albumin of 2 g/dL might have a "normal" AG of only 3–7 mEq/L — which could mask a true elevation.
Different labs may report slightly different reference ranges based on their analyzers and local population data. Some institutions quote 4–12 mEq/L, others 8–16 mEq/L. Always check your lab's specific reference range.
Ion-selective electrode technology in modern analyzers tends to produce slightly different values than older flame photometry methods. When comparing results over time, make sure the same methodology was used.
| Electrolyte | Symbol | Normal Range | Unit | Role in AG |
|---|---|---|---|---|
| Sodium | Na⁺ | 136 – 145 | mEq/L | Primary measured cation |
| Potassium | K⁺ | 3.5 – 5.0 | mEq/L | Included in corrected formula |
| Chloride | Cl⁻ | 98 – 106 | mEq/L | Primary measured anion |
| Bicarbonate | HCO₃⁻ | 22 – 28 | mEq/L | Acid-base buffer anion |
| Anion Gap (Standard) | AG | 8 – 12 | mEq/L | Na⁺ − (Cl⁻ + HCO₃⁻) |
| Anion Gap (Corrected) | AGc | 10 – 20 | mEq/L | (Na⁺ + K⁺) − (Cl⁻ + HCO₃⁻) |
This gauge shows your current anion gap value from the calculator. Change the electrolyte values above to see the needle move.
What different anion gap values mean and what conditions to consider.
When the anion gap is elevated, clinicians use mnemonics to recall the differential diagnosis.
An alternative to MUDPILES that some clinicians prefer:
A 45-year-old with diabetes presents with nausea and rapid breathing. Labs show Na⁺ 138, Cl⁻ 100, HCO₃⁻ 10. The anion gap is 138 − (100 + 10) = 28 mEq/L — significantly elevated. Combined with high blood glucose and positive urine ketones, this points to diabetic ketoacidosis.
A 70-year-old with sepsis arrives in shock. Labs show Na⁺ 140, Cl⁻ 102, HCO₃⁻ 14. AG = 140 − (102 + 14) = 24 mEq/L. Serum lactate is 8 mmol/L. The elevated anion gap is driven by lactic acidosis from poor tissue perfusion.
Click a scenario to auto-fill the calculator with real-world lab values and see how the anion gap changes.
When and why clinicians order an anion gap calculation.
The anion gap should be calculated whenever you have a basic metabolic panel (BMP) or comprehensive metabolic panel (CMP) and suspect an acid-base disorder. Common scenarios include:
This flowchart highlights the active path based on your current lab values from the calculator.
The physiology behind electrolyte balance and why the anion gap changes in disease.
Blood must stay electrically neutral. Every positive charge has a matching negative charge. Standard lab panels measure sodium and potassium on the cation side, and chloride and bicarbonate on the anion side. But they miss many other charged particles — albumin, phosphate, sulfate, and organic acids on the anion side, and calcium, magnesium, and gamma globulins on the cation side.
Because unmeasured anions normally outweigh unmeasured cations, the measured cations always appear to exceed the measured anions. That difference is the anion gap.
When the body produces excess acid (like lactate or ketoacids), these acids release hydrogen ions. The hydrogen ions consume bicarbonate as a buffer, lowering the HCO₃⁻ level. But the conjugate base (lactate, ketoanion) remains — it becomes an unmeasured anion. The result: bicarbonate drops, unmeasured anions rise, and the anion gap increases.
In non-anion gap acidosis, the story is different. Bicarbonate is lost directly (through the gut or kidneys), and chloride rises to maintain electrical neutrality. The anion gap stays normal because no new unmeasured anions appear.
Watch how the unmeasured anion column (the anion gap) grows or shrinks as you change the electrolyte values in the calculator.
Answers to common clinical and technical questions about the anion gap.