Anion Gap Calculator Formula

Understand the math behind the anion gap calculator. Each variable explained with a worked example.

Formulas Used

Anion Gap

anion_gap_val = sodium - chloride - bicarbonate

Albumin-Corrected AG

corrected_ag = (sodium - chloride - bicarbonate) + 2.5 * (4.0 - albumin)

Delta Ratio (if AG elevated)

delta_delta = (sodium - chloride - bicarbonate - 12) / (24 - bicarbonate)

Variables

VariableDescriptionDefault
sodiumSodium (Na+)(mEq/L)140
chlorideChloride (Cl-)(mEq/L)104
bicarbonateBicarbonate (HCO3-)(mEq/L)24
albuminAlbumin(g/dL)4

How It Works

Anion Gap Formula

AG = Na+ - Cl- - HCO3-

Normal Range

Normal anion gap: 8-12 mEq/L (without potassium)

Albumin Correction

Corrected AG = AG + 2.5 x (4.0 - Albumin)

Low albumin can mask an elevated anion gap.

Common Causes of Elevated Anion Gap (MUDPILES)

Methanol, Uremia, Diabetic ketoacidosis, Propylene glycol, Iron/Isoniazid, Lactic acidosis, Ethylene glycol, Salicylates

Worked Example

Na 140, Cl 104, HCO3 24, Albumin 4.0.

sodium = 140chloride = 104bicarbonate = 24albumin = 4
  1. 01AG = 140 - 104 - 24 = 12 mEq/L
  2. 02Corrected AG = 12 + 2.5 x (4.0 - 4.0) = 12
  3. 03Normal anion gap (8-12)

Frequently Asked Questions

What is the anion gap?

The anion gap represents the difference between measured cations and anions in the blood. It helps identify the cause of metabolic acidosis.

What causes a high anion gap?

Common causes include diabetic ketoacidosis (DKA), lactic acidosis, kidney failure, and toxic ingestions like methanol or ethylene glycol.

Why correct for albumin?

Albumin is a negatively charged protein. Low albumin levels reduce the anion gap, potentially masking an acidosis. The correction adds 2.5 for each g/dL albumin is below 4.0.

Ready to run the numbers?

Open Anion Gap Calculator