Urine Anion Gap (UAG) Calculator

Calculate UAG = (UNa + UK) − UCl, interpret its meaning in metabolic acidosis with normal serum anion gap (NAGMA), estimate urinary ammonium (NH4+) excretion, walk through the diagnostic decision tree, and compare with the Batlle et al. (1988) study data.

Educational content — not a diagnostic tool. This calculator helps explain the urine anion gap concept. Interpreting a patient’s lab results is the physician’s responsibility.

Urine Anion Gap Calculator

UAG = (UNa + UK) − UCl All in mEq/L, from the same urine sample (usually a spot sample). Bicarbonate is excluded because acidic urine makes its level negligible.
Quick examples:

Compare with the Batlle et al. (NEJM 1988) study data

Mean ± SD of UAG in 46 subjects with hyperchloremic acidosis — the primary study validating UAG as a rough index of urinary NH4+:

ConditionMean UAG (mEq/L)Subjects
Normal subjects + oral NH4Cl for 3 days−27 ± 9.87
Diarrhea−20 ± 5.78
Classic (distal) RTA+23 ± 4.111
Hyperkalemic distal RTA+30 ± 4.212
Selective aldosterone deficiency+39 ± 4.215

Source: Batlle DC et al., The use of the urinary anion gap in the diagnosis of hyperchloremic metabolic acidosis. N Engl J Med. 1988;318:594–9.

Primary Sources

  1. Batlle DC, Hizon M, Cohen E, Gutterman C, Gupta R. The use of the urinary anion gap in the diagnosis of hyperchloremic metabolic acidosis. N Engl J Med. 1988;318(10):594–599.
  2. Goldstein MB, Bear R, Richardson RMA, et al. The urine anion gap: a clinically useful index of ammonium excretion. Am J Med Sci. 1986;292(4):198–202.
  3. MSD Manual Professional Edition — Metabolic Acidosis: urinary anion gap calculated as urinary [sodium] + [potassium] − [chloride] with a normal serum anion gap.
  4. Dyck RF et al. — modified urine osmolal gap to estimate urinary NH4+ (summarized in the Karger 2025 review).

Literature-acknowledged limitations are also listed honestly in the FAQ (e.g. the quantitative critique in the review The Urine Anion Gap: Common Misconceptions and the 2025 cohort study showing UAG is less accurate in chronic kidney disease).

Free tool by NRTechStudio