The anion gap is one of medicine’s most widely used bedside calculations. Three numbers from a basic metabolic panel — sodium, chloride and bicarbonate — reveal whether the blood’s acid-base chemistry is normal or hiding a dangerous metabolic acidosis. This calculator does the arithmetic instantly, adds an albumin correction when serum albumin is low, computes the delta ratio to classify mixed disorders, and optionally calculates the osmolar gap to screen for toxic alcohol ingestion. Everything runs in your browser — no patient data is ever transmitted.
How it works
Standard anion gap
Plasma is electrically neutral: total cations equal total anions. The major measured cation is sodium (Na+). The major measured anions are chloride (Cl-) and bicarbonate (HCO3-). The remaining anions — albumin, phosphate, sulfate and organic acids — are “unmeasured” and make up the gap:
AG = Na+ - (Cl- + HCO3-)
Normal value: 8–12 mEq/L (assuming albumin ~4.0 g/dL). A value above 12 indicates an accumulation of unmeasured anions — the hallmark of high-AG metabolic acidosis (HAGMA).
Albumin-corrected anion gap (Figge correction)
Albumin is negatively charged and contributes approximately 2.5 mEq/L per g/dL to the anion gap. When albumin is low (e.g. 2.0 g/dL in a critically ill patient), the raw AG falls by ~5 mEq/L and can mask a HAGMA entirely. The correction restores the AG to what it would be at a normal albumin of 4.0 g/dL:
AG_corrected = AG + 2.5 x (4.0 - albumin)
Delta ratio (delta-delta)
When HAGMA is present, the delta ratio asks whether the bicarbonate fell by exactly as much as the anion gap rose — as expected in a pure HAGMA. It is defined as:
Delta ratio = (AG - 12) / (24 - HCO3-)
| Delta ratio | Interpretation |
|---|---|
| Less than 0.4 | Pure hyperchloraemic (normal-AG) acidosis |
| 0.4 to 1.0 | Mixed HAGMA and normal-AG acidosis |
| 1.0 to 2.0 | Pure HAGMA with appropriate compensation |
| Greater than 2.0 | HAGMA plus concurrent metabolic alkalosis |
Calculated osmolality and osmolar gap
Calculated Osm = 2 x Na + Glucose/18 + BUN/2.8
The osmolar gap is the measured osmolality minus the calculated osmolality. A gap above 10 mOsm/kg is elevated and, alongside a high anion gap, raises strong suspicion for toxic alcohol ingestion (methanol or ethylene glycol).
Worked example
A 42-year-old presents confused with vomiting. ABG and labs show:
- Na+ = 140, Cl- = 100, HCO3- = 12 mEq/L
- Albumin = 2.5 g/dL
- Glucose = 90 mg/dL, BUN = 14 mg/dL
- Measured osmolality = 310 mOsm/kg
Step 1 — Raw AG: 140 - (100 + 12) = 28 mEq/L (markedly elevated)
Step 2 — Albumin correction: 28 + 2.5 x (4.0 - 2.5) = 28 + 3.75 = 31.75 mEq/L (even higher — the low albumin was partially masking the gap)
Step 3 — Delta ratio: (31.75 - 12) / (24 - 12) = 19.75 / 12 = 1.65 (pure HAGMA — the bicarbonate fell proportionally to the AG rise)
Step 4 — Osmolar gap: Calculated Osm = 2 x 140 + 90/18 + 14/2.8 = 280 + 5 + 5 = 290. Gap = 310 - 290 = 20 mOsm/kg (elevated — suspect toxic alcohol or other osmole)
The combination of a very high anion gap and an elevated osmolar gap in this context is a medical emergency requiring urgent toxicology review.
This calculator is for educational use only. It does not constitute medical advice and should never replace clinical assessment, laboratory reference ranges or professional judgement.