Medical Calculators

Medical Calculators

← Back to All Calculators
Laboratory Values
Anion Gap Calculator
Shortcode 105 — Laboratory

Anion Gap Calculator

Calculates standard & albumin-corrected anion gap, delta-delta ratio, and respiratory compensation — with MUDPILES/HARDUPS mnemonics.

mEq/L — normal 135–145 Enter a valid sodium value (100–180)
mEq/L — normal 98–106 Enter a valid chloride value (60–140)
mEq/L — normal 22–26 Enter a valid bicarbonate value (1–50)
g/dL — default 4.0; correct if hypoalbuminemic
mg/dL — for phosphate correction
mmHg — compare to Winter’s expected

Anion Gap
mEq/L (normal 8–12)
Corrected AG
mEq/L (albumin-adjusted)
Delta Gap
AG_corr − 12
Delta-Delta Ratio
(AG−12) / (24−HCO₃)
Expected PaCO₂
mmHg (Winter’s / Comp.)
Acid-Base Pattern
Primary diagnosis
Clinical Interpretation
Respiratory Compensation (Winter’s Formula / Metabolic Alkalosis)
MUDPILES — HAGMA Causes
  • M Methanol
  • U Uremia
  • D Diabetic ketoacidosis
  • P Propylene glycol / Paracetamol
  • I Isoniazid / Iron
  • L Lactic acidosis
  • E Ethylene glycol
  • S Salicylates
HARDUPS — NAGMA Causes
  • H Hyperalimentation
  • A Addison’s disease
  • R Renal tubular acidosis
  • D Diarrhea
  • U Ureteroenteric fistula
  • P Pancreatic fistula
  • S Spironolactone / Saline excess
Formulas Used
AG = Na - (Cl + HCO3)                      [Normal: 8-12 mEq/L]
AG_corr = AG + 2.5 x (4.0 - Albumin)       [Albumin correction]
Phosphate corr: AG_corr - 0.5 x (Phos_mmol - 1.0)  [if entered]
  where Phos_mmol = Phos(mg/dL) / 3.1
Delta gap = AG_corr - 12
Delta-delta = (AG_corr - 12) / (24 - HCO3)
  <0.4  => Pure NAGMA
  0.4-0.8 => Mixed HAGMA + NAGMA
  1.0-2.0 => Pure HAGMA
  >2.0  => HAGMA + Metabolic alkalosis

Winter's (metabolic acidosis, HCO3 <22):
  Expected PCO2 = 1.5 x HCO3 + 8 (+/-2)

Metabolic alkalosis comp. (HCO3 >26):
  Expected PCO2 = 0.7 x HCO3 + 21 (+/-2)
Medical Disclaimer This calculator is for educational and clinical decision-support purposes only. Values must be interpreted in the context of the full clinical picture. Always correlate with arterial blood gas results and consult appropriate medical references. Not a substitute for professional medical judgment.

News Category​

Contact Me for Any Query.

Have questions or need assistance? I am here to help! Reach me  for support, inquiries, or feedback—I’d love to hear from you.

Select a Template for your Cv