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.Mean ± SD of UAG in 46 subjects with hyperchloremic acidosis — the primary study validating UAG as a rough index of urinary NH4+:
| Condition | Mean UAG (mEq/L) | Subjects |
|---|---|---|
| Normal subjects + oral NH4Cl for 3 days | −27 ± 9.8 | 7 |
| Diarrhea | −20 ± 5.7 | 8 |
| Classic (distal) RTA | +23 ± 4.1 | 11 |
| Hyperkalemic distal RTA | +30 ± 4.2 | 12 |
| Selective aldosterone deficiency | +39 ± 4.2 | 15 |
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.
UAG only gives a qualitative picture (negative/positive). When osmolality data is available, the urine osmolal gap gives a better quantitative estimate of urinary NH4+ — especially when UAG is invalid (ketoanions, hippurate, D-lactate).
Estimated urinary NH4+ (≈ UOG / 2)
Educational estimate, not a lab measurement. This method’s agreement with direct NH4+ measurement varies across studies; not valid when urine contains mannitol or alcohol.Walk through step by step. Every answer is educational — the final diagnosis is the physician’s responsibility.
Step 1 — Is there metabolic acidosis (low blood pH, low HCO3−)?
Step 2 — Is the serum anion gap normal (not high)?
Step 3 — Does the urine contain unmeasured anions (ketoacidosis, toluene/hippurate exposure, D-lactate, bicarbonate therapy, acetazolamide)?
Step 4 — Enter the UAG value (or take it from Tab 1):
Step 5 — Positive UAG: check urine pH and serum potassium.
This flow summarizes the standard NAGMA evaluation approach (MSD Manual; Batlle et al. 1988) in an educational interactive form.
| Condition | Typical UAG | Urine pH during acidosis | Serum potassium | Notes |
|---|---|---|---|---|
| Diarrhea (non-renal comparator) | Negative (−20 to −50) | < 5.5 | Hypokalemia | Intact renal response; NH4+ excreted with Cl− |
| Type 1 RTA (distal) | Positive | > 5.5 | Hypokalemia | Distal H+ secretion defect; Batlle mean +23 ± 4.1 |
| Type 2 RTA (proximal) | Can be negative during acidosis | < 5.5 | Hypokalemia | Proximal HCO3− reabsorption defect; distal acidification intact → adequate NH4+ |
| Type 4 RTA / hypoaldosteronism | Positive | Usually < 5.5 | Hyperkalemia | Aldosterone deficiency/resistance; Batlle mean +30 ± 4.2 (hyperkalemic), +39 ± 4.2 (selective aldosterone deficiency) |
The patterns above are typical pictures from the literature, not absolute rules — always interpret together with the full clinical picture and the treating physician.
The answers below are educational and not a diagnostic tool. Primary sources: Batlle et al. (NEJM 1988), Goldstein et al. (Am J Med Sci 1986), and the MSD Manual professional edition.
UAG = (urinary sodium + urinary potassium) − urinary chloride, all in mEq/L. Unlike the serum anion gap, bicarbonate is not included in the formula because acidic urine makes the urinary bicarbonate level negligible.
Serum anion gap = sodium − (chloride + bicarbonate) in serum, used to detect unmeasured anions in blood. Urine anion gap = (sodium + potassium − chloride) in urine, used as an indirect index of urinary ammonium (NH4+) excretion to distinguish causes of metabolic acidosis. They measure different things and do not substitute for each other — see also our serum anion gap calculator.
A negative UAG means urinary chloride exceeds urinary sodium + potassium, reflecting an excess of unmeasured cations — mainly ammonium (NH4+). This indicates adequate NH4+ excretion, i.e. an appropriate renal response to the acid load. In metabolic acidosis with a normal serum anion gap, this pattern points to bicarbonate loss through the gastrointestinal tract, e.g. diarrhea. In the Batlle et al. (1988) study, diarrhea patients averaged −20 mEq/L.
A positive UAG reflects low or impaired NH4+ excretion — the kidneys are not responding to the acid load as they should. In metabolic acidosis with a normal serum anion gap, this pattern points to renal causes, especially distal RTA (type 1) or hypoaldosteronism. In the Batlle et al. (1988) study, classic RTA averaged +23, hyperkalemic distal RTA +30, and selective aldosterone deficiency +39 mEq/L.
In people without acid-base disorders, UAG is usually around zero to positive (20–90 mEq/L on a Western diet) because sodium and potassium excretion exceeds chloride. That is why UAG is only meaningful when interpreted in the context of metabolic acidosis with a normal serum anion gap, not as a general screening test.
UAG is invalid when urine contains large amounts of unmeasured anions, because those anions raise UAG artificially even when NH4+ excretion is normal. Examples include ketoacidosis (beta-hydroxybutyrate and acetoacetate), toluene exposure (hippurate), D-lactate, bicarbonaturia (e.g. bicarbonate therapy or acetazolamide), and severe hypovolemia. In those situations use the urine osmolal gap as the NH4+ estimator.
Urine osmolal gap = measured urine osmolality − calculated urine osmolality, where calculated osmolality = 2×(sodium + potassium) + urea/2.8 + glucose/18 (urea and glucose in mg/dL). Because NH4+ plus its accompanying anions contribute about half of this gap, urinary NH4+ concentration can be estimated as half the urine osmolal gap. The NH4+ Estimation tab on this page uses that method.
A spot urine sample is the most commonly used in practice and underlies most published interpretation thresholds. A 24-hour collection can be used to assess daily electrolyte excretion, but the UAG formula and interpretation are generally applied to spot samples in mEq/L.
In type 2 RTA, the defect is in the proximal tubule (bicarbonate reabsorption), while distal acidification capacity remains intact. Once acidosis has occurred, the kidneys can still excrete NH4+ adequately, so UAG can be negative as in diarrhea. Clinical distinguishing features include urine pH that can still fall below 5.5 during acidosis.
No. UAG is a rough, indirect index — it only gives an additional clue about renal ammonium handling. Correct interpretation requires the full clinical context (acid-base status, serum anion gap, urine pH, serum potassium) and a physician's authority. This calculator is educational, not a diagnostic tool.
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
Explore similar health tools and calculators. 100% free, accurate, and runs completely in your browser without sign-up.
2 taps, no typing needed — diagnostics are sent automatically.