About Anion Gap Calculator
7 min read
Anion Gap Calculator: Evaluate Metabolic Acidosis With Standard, Extended, and Albumin-Corrected Formulas
TL;DR: Sodium of 140, chloride of 100, and bicarbonate of 24 give a standard anion gap of 16 mEq/L. If the patient has low albumin, the corrected gap may be several points higher than the raw number suggests. Enter your electrolytes above to get the standard AG, the extended AG (with potassium), and the albumin-corrected value with an automatic interpretation and MUDPILES differential.
Table of Contents
- What Three Electrolytes Reveal About Acid-Base Balance
- Six Clinical Scenarios That Call for an Anion Gap Check
- The Formulas Behind Standard, Extended, and Albumin-Corrected AG
- How to Calculate Your Anion Gap Step by Step
- See How the Numbers Play Out: Two Worked Examples
- Six Errors That Throw Off Your Anion Gap Results
- FAQ
- Assumptions and Notes
- Your Next Step
- Further Reading
What Three Electrolytes Reveal About Acid-Base Balance
Most of the ions dissolved in your blood are accounted for by sodium on the positive side and chloride plus bicarbonate on the negative side. The anion gap is the numerical difference between these measured cations and measured anions. It represents unmeasured anions circulating in serum, primarily albumin, phosphate, sulfate, and organic acids.
A normal standard anion gap falls between 8 and 12 mEq/L. When that gap widens, something is producing or introducing excess acid into the bloodstream. Diabetic ketoacidosis (DKA) floods the blood with beta-hydroxybutyrate and acetoacetate. Lactic acidosis from sepsis or shock generates lactate. Toxic ingestions like methanol or ethylene glycol produce formic acid and glycolic acid respectively. In each case the unmeasured anions rise, bicarbonate drops as it buffers the acid load, and the anion gap climbs.
The clinical mnemonic MUDPILES organizes the major causes: Methanol, Uremia, DKA, Propylene glycol, INH/Iron, Lactic acidosis, Ethylene glycol, Salicylates. Genetic variation in renal tubular acid handling means some individuals run a baseline AG closer to 6 while others sit near 12, both within normal limits. That baseline variability is one reason albumin correction matters: hypoalbuminemia (common in hospitalized patients) masks a true elevation by lowering the apparent gap by roughly 2.5 mEq/L for every 1 g/dL of albumin below 4.0.
Plug in your electrolyte values above and skip the manual arithmetic.
Six Clinical Scenarios That Call for an Anion Gap Check
-
Emergency department workup of altered mental status. Roughly 5% of ED presentations for confusion in adults over 65 have a metabolic cause detectable through basic electrolytes. Running an anion gap takes under 30 seconds once the BMP results are back and can redirect the workup toward DKA, toxic ingestion, or uremia before imaging is even ordered.
-
Monitoring a patient with known type 1 diabetes during illness. Sick-day physiology drives ketone production up by 200–400% in type 1 diabetics with intercurrent infection. Checking the anion gap every 4–6 hours during an acute illness episode catches the transition from compensated ketosis to frank DKA before the pH drops below 7.2.
-
Evaluating a suspected toxic ingestion. Methanol and ethylene glycol poisoning both produce an elevated anion gap with an osmolal gap. In a patient presenting within 12 hours of ingestion, an AG above 20 mEq/L alongside an osmolal gap above 10 mOsm/kg strongly suggests toxic alcohol exposure requiring fomepizole or hemodialysis.
-
Assessing acid-base status in critically ill ICU patients with low albumin. Up to 40% of ICU patients have albumin levels below 2.5 g/dL. Without the albumin correction, the raw AG can appear normal at 10 mEq/L while the corrected AG sits at 14 or higher, changing the clinical interpretation entirely.
-
Differentiating non-anion-gap from anion-gap metabolic acidosis. A patient with metabolic acidosis (bicarbonate of 16 mEq/L) could have diarrheal losses producing a normal-gap acidosis or early DKA producing an elevated-gap acidosis. The anion gap value separates these two pathways within seconds and determines whether the next step is fluid replacement or insulin.
-
Trending the anion gap during DKA treatment to gauge resolution. The AG should close by 3–5 mEq/L per hour on adequate insulin and fluid therapy. If it fails to narrow after 6 hours, the treatment protocol needs reassessment. Serial AG measurements every 2–4 hours are standard in most DKA management protocols.
The Formulas Behind Standard, Extended, and Albumin-Corrected AG
The anion gap is simply measured cations minus measured anions.
Standard Anion Gap:
AG = Na - (Cl + HCO3)
Normal range: 8-12 mEq/L
Extended Anion Gap (includes potassium):
AG = (Na + K) - (Cl + HCO3)
Normal range: 10-20 mEq/L
Albumin-Corrected Anion Gap:
Corrected AG = AG + 2.5 x (4.0 - Albumin)
Adds ~2.5 mEq/L per 1 g/dL albumin below 4.0
Normal Ranges by Formula Type
| Formula | Normal Range (mEq/L) | Source | When to Use |
|---|---|---|---|
| Standard AG | 8–12 | Emmett & Narins, 1977 | Default for most clinical settings |
| Extended AG | 10–20 | Winter et al. | When potassium is significantly abnormal |
| Albumin-Corrected AG | 8–12 (after correction) | Figge et al., 1998 | Hospitalized patients, low albumin states |
MUDPILES Differential for Elevated Anion Gap
| Letter | Cause | Typical AG Range (mEq/L) | Key Diagnostic Clue |
|---|---|---|---|
| M | Methanol | 20–40 | Osmolal gap, visual symptoms |
| U | Uremia | 15–25 | BUN > 60 mg/dL, creatinine elevated |
| D | DKA | 20–35 | Glucose > 250 mg/dL, ketonuria |
| P | Propylene glycol | 15–30 | IV lorazepam or phenobarbital infusion |
| I | INH / Iron | 15–25 | Ingestion history, seizures |
| L | Lactic acidosis | 15–30 | Lactate > 4 mmol/L, shock |
| E | Ethylene glycol | 20–40 | Osmolal gap, calcium oxalate crystals |
| S | Salicylates | 15–25 | Tinnitus, respiratory alkalosis mixed |
Albumin Correction Factor Table
| Albumin (g/dL) | Correction Added (mEq/L) | Clinical Context |
|---|---|---|
| 4.0 | 0 | Normal albumin, no correction needed |
| 3.5 | +1.25 | Mild hypoalbuminemia |
| 3.0 | +2.5 | Moderate, common in hospitalized patients |
| 2.5 | +3.75 | Significant, ICU populations |
| 2.0 | +5.0 | Severe, hepatic failure or nephrotic syndrome |
A limitation worth noting: the standard formula assumes normal concentrations of unmeasured cations (calcium, magnesium) and unmeasured anions. In patients with severe hypercalcemia or paraproteinemia (as in multiple myeloma), the anion gap can be falsely low because unmeasured cations rise.
How to Calculate Your Anion Gap Step by Step
-
Obtain a basic metabolic panel (BMP) or a full metabolic panel (CMP). The BMP provides sodium, chloride, and bicarbonate (reported as total CO2 on most lab panels). If your lab reports total CO2, treat that value as bicarbonate for this calculation.
-
Note the sodium value in mEq/L. Normal range is 136–145 mEq/L. Severe hyponatremia below 125 mEq/L can produce a falsely low AG that does not reflect the true acid-base picture.
-
Record chloride and bicarbonate. Normal chloride is 98–106 mEq/L. Normal bicarbonate is 22–26 mEq/L. A bicarbonate below 22 already suggests metabolic acidosis before you even calculate the gap.
-
Apply the standard formula: AG = Na minus (Cl + HCO3). With Na = 140, Cl = 100, HCO3 = 24, the result is 140 minus 124 = 16 mEq/L. A result above 12 mEq/L warrants clinical attention.
-
If potassium is available and relevant, apply the extended formula. Add potassium to sodium before subtracting. A K of 4.0 shifts the example to (140 + 4) minus (100 + 24) = 20 mEq/L. Compare against the extended normal range of 10–20 mEq/L.
-
Check albumin and apply the correction if albumin is below 4.0 g/dL. For albumin of 2.5 g/dL, add 2.5 x (4.0 minus 2.5) = 3.75 mEq/L to the calculated AG. This step is the single most overlooked adjustment in clinical practice, and skipping it misclassifies roughly 30% of ICU anion gap calculations.
-
Enter all values into the calculator above. Select Standard or Extended mode, input albumin if known, and review the output: raw AG, corrected AG, and the interpretation text.
See How the Numbers Play Out: Two Worked Examples
Example 1: 27-Year-Old College Student With DKA
A 27-year-old woman with type 1 diabetes presents to the ED after two days of vomiting during a stomach virus. Her BMP shows Na = 132, Cl = 90, HCO3 = 10, K = 5.2, albumin = 3.8 g/dL.
Standard AG: 132 minus (90 + 10) = 32 mEq/L. This is markedly elevated (normal 8–12).
Extended AG: (132 + 5.2) minus (90 + 10) = 37.2 mEq/L. Also well above the extended normal range of 10–20.
Albumin correction: 32 + 2.5 x (4.0 minus 3.8) = 32.5 mEq/L. Minimal correction because albumin is nearly normal.
| Parameter | Value | Reference Range |
|---|---|---|
| Standard AG | 32 mEq/L | 8–12 mEq/L |
| Extended AG | 37.2 mEq/L | 10–20 mEq/L |
| Corrected AG | 32.5 mEq/L | 8–12 mEq/L |
What to do with this result: An AG of 32 in the context of hyperglycemia and ketonuria confirms DKA. The treatment protocol calls for IV insulin, aggressive fluid resuscitation with normal saline, and AG checks every 2–4 hours. The gap should begin closing within the first 4–6 hours. If it remains above 20 after 8 hours, reassess insulin dosing and look for a concurrent source of acidosis.
Example 2: 71-Year-Old Retired Mechanic in the ICU, Day 3 Post-Surgery
A 71-year-old man is recovering from emergency bowel surgery. Labs show Na = 138, Cl = 108, HCO3 = 22, K = 3.6, albumin = 2.0 g/dL. The standard AG appears unremarkable at first glance.
Standard AG: 138 minus (108 + 22) = 8 mEq/L. Normal range. No alarm bells from the raw number.
Albumin correction: 8 + 2.5 x (4.0 minus 2.0) = 13 mEq/L. The corrected value now sits above the normal range.
Extended AG: (138 + 3.6) minus (108 + 22) = 11.6 mEq/L. Corrected extended: 11.6 + 5.0 = 16.6 mEq/L.
| Parameter | Value | Reference Range |
|---|---|---|
| Standard AG (raw) | 8 mEq/L | 8–12 mEq/L |
| Albumin-Corrected AG | 13 mEq/L | 8–12 mEq/L |
| Extended AG (raw) | 11.6 mEq/L | 10–20 mEq/L |
| Corrected Extended AG | 16.6 mEq/L | 10–20 mEq/L |
What to do with this result: The raw AG of 8 looks innocent. The corrected AG of 13 reveals a hidden anion gap metabolic acidosis masked by severe hypoalbuminemia. The ICU team should check a lactate level (post-surgical lactic acidosis is the most common cause in this setting), reassess perfusion status, and consider whether an occult infection is driving acid production. Without albumin correction, this patient's acidosis would go undetected.
Six Errors That Throw Off Your Anion Gap Results
Using total CO2 and bicarbonate interchangeably without checking the lab. Most labs report total CO2, which includes dissolved CO2 in addition to bicarbonate. The difference is typically 1–2 mEq/L. In a borderline case where the AG is 12 or 13, that 1–2 mEq/L error determines whether the result reads as normal or elevated. Always confirm which value your lab reports.
Ignoring albumin in hospitalized patients. For every 1 g/dL drop in albumin below 4.0, the measured AG falls by approximately 2.5 mEq/L. A patient with albumin of 2.0 has a built-in 5 mEq/L underestimate. Studies show this error reclassifies about 30% of ICU anion gap results from apparently normal to clinically elevated.
Forgetting that the normal range shifts with the extended formula. The extended formula (including potassium) has a normal range of 10–20 mEq/L, not 8–12. Applying the standard cutoffs to an extended calculation produces false positives. A result of 16 mEq/L is elevated on the standard scale but normal on the extended scale.
Calculating the AG with a hemolyzed sample. Hemolysis releases intracellular potassium, which artificially raises the extended AG by 1–3 mEq/L per degree of hemolysis, and can also affect chloride readings. If the lab flags a specimen as hemolyzed, request a redraw before acting on the AG.
Not accounting for lithium or bromide interference. Lithium adds to unmeasured cations and can lower the AG by 2–4 mEq/L at therapeutic levels. Bromide causes some analyzers to overestimate chloride, falsely lowering the gap. Patients on lithium therapy or those exposed to bromide-containing compounds need this context applied to their AG interpretation.
Treating a single AG as definitive without trending. A spot AG of 14 mEq/L could be that patient's baseline or could represent a rising trend from 9 to 14 over 12 hours. The delta matters more than the absolute number. Serial measurements spaced 4–6 hours apart during acute illness provide the trajectory that a single value cannot.
Assumptions and Notes
- Margin of error. The anion gap calculation is only as accurate as the underlying electrolyte measurements. Ion-selective electrode analyzers have a coefficient of variation of 1–2% for sodium and chloride, which translates to an AG uncertainty of approximately plus or minus 2–3 mEq/L. Borderline results (AG of 12–14) should be interpreted with repeat measurement, not treated as definitive.
- Professional disclaimer. This calculator is an educational and screening tool. It does not replace clinical judgment, arterial blood gas analysis, or physician evaluation. If you suspect metabolic acidosis, toxic ingestion, or DKA, seek immediate medical attention. Abnormal anion gap results in a clinical setting should be interpreted by a qualified healthcare provider in the context of the patient's full clinical picture.
Your Next Step
The anion gap is a screening number, not a diagnosis. It tells you that unmeasured anions are elevated, but it does not tell you which ones. A result above 12 on the standard formula (or above the corrected threshold if albumin is low) is a prompt to investigate further: check lactate, glucose, ketones, renal function, and toxicology as indicated. If your gap is normal and you arrived here out of curiosity, record the result and revisit it the next time you have a metabolic panel drawn. Trends over time carry more weight than any single calculation.