Advanced

Urine Anion Gap Calculator — UAG

Enter urine sodium, potassium, and chloride concentrations to calculate the Urine Anion Gap (UAG) and get an interpretation of whether the acidosis is renal or gastrointestinal in origin.

mmol/L

Spot urine or 24-hour urine sodium concentration

mmol/L

Spot urine or 24-hour urine potassium concentration

mmol/L

Spot urine or 24-hour urine chloride concentration
Urine Anion Gap (UAG)
-20mmol/L

UAG = (Na⁺ + K⁺) − Cl⁻

Urine Na⁺
40 mmol/L
Urine K⁺
20 mmol/L
Total cations (Na⁺ + K⁺)
60 mmol/L
Urine Cl⁻
80 mmol/L
UAG = cations − Cl⁻
-20 mmol/L
UAG interpretation: Negative — GI loss (normal NH₄⁺)
Step by step
  1. 1

    Sum cations (Na⁺ + K⁺)

    40 + 20 = 60
  2. 2

    Urine Anion Gap (UAG)

    60 − 80 = -20
    A negative value suggests appropriate NH₄⁺ excretion (GI cause); a positive value suggests impaired renal acid excretion (RTA).
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. This is not medical, health or fitness advice; consult a qualified healthcare professional. Read the full disclaimer.
Quick answer

How does this calculator work?

UAG = (urine Na⁺ + K⁺) − urine Cl⁻ (mmol/L). A negative UAG (below −20) suggests appropriate renal NH₄⁺ excretion — pointing to a gastrointestinal cause of acidosis. A positive UAG suggests impaired NH₄⁺ excretion and renal tubular acidosis. Always interpret with full clinical and laboratory context.

Formula
UAG = (Urine Na⁺ + Urine K⁺) − Urine Cl⁻ (all in mmol/L or mEq/L)
How this is calculated

The Urine Anion Gap (UAG) is a clinical tool used to evaluate hyperchloremic (normal anion gap) metabolic acidosis by estimating urinary ammonium (NH₄⁺) excretion. NH₄⁺ is the main way the kidney excretes acid; when NH₄⁺ excretion is high, it is accompanied by chloride (Cl⁻) to maintain electrical neutrality, driving Cl⁻ above the sum of Na⁺ and K⁺ and making the UAG negative. A negative UAG therefore implies the kidney is appropriately excreting acid — pointing to an extra-renal cause such as gastrointestinal bicarbonate loss (diarrhea, ileostomy, fistula). A positive UAG suggests the kidney cannot excrete enough NH₄⁺, implicating renal tubular acidosis (Type I distal RTA or Type IV hyperkalemic RTA) or other renal defects.

The UAG is calculated as (Na⁺ + K⁺) − Cl⁻ in a spot or 24-hour urine sample. A value below −20 mmol/L is generally considered negative (normal or elevated NH₄⁺ excretion); values above 0 are positive (impaired excretion). Values between −20 and 0 are borderline.

Important limitations: the UAG is unreliable when urine sodium is below 20 mmol/L (volume depletion) because low urine flow concentrates all electrolytes. It is also unreliable in the presence of high urinary ketoanions or hippurate (as in toluene poisoning), which widen the urine anion gap independent of NH₄⁺. Always interpret UAG in the full clinical context and alongside serum electrolytes, blood gas, and clinical history.

Frequently asked questions

A negative UAG (usually below −20 mmol/L) means Cl⁻ is much higher than Na⁺ + K⁺, which occurs when large amounts of NH₄Cl are excreted. High NH₄⁺ excretion indicates the kidney is working correctly to excrete acid, so the acidosis is likely coming from outside the kidney — most commonly from gastrointestinal bicarbonate loss (diarrhea, intestinal fistulas).

A positive UAG means Na⁺ + K⁺ exceeds Cl⁻, implying low NH₄⁺ excretion. This is the signature of renal tubular acidosis (RTA): Type I (distal) RTA cannot acidify the urine; Type IV RTA (hypoaldosteronism) is associated with hyperkalemia and impaired NH₄⁺ production. A positive UAG in the context of hyperchloremic metabolic acidosis is a strong pointer toward a renal cause.

The UAG is unreliable when urine Na⁺ is below 20 mmol/L (poor urine flow dilutes NH₄⁺ detection), in diabetic ketoacidosis or starvation ketosis (ketoanions act as unmeasured anions and can falsely reduce the UAG), or in toluene poisoning (hippurate excretion). In these situations, directly measuring urine ammonium or using urine osmolal gap is more informative.

Also known as

urine anion gap calculator
UAG calculator
renal tubular acidosis diagnosis
urinary ammonium excretion estimate
hyperchloremic acidosis workup
urine sodium potassium chloride gap

APA

TG we-Calculate Editorial Team. (2026). Urine Anion Gap Calculator — UAG [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/urine-anion-gap-calculator

Chicago

TG we-Calculate Editorial Team. "Urine Anion Gap Calculator — UAG." TG we-Calculate. 2026. https://we-calculate.com/calculator/urine-anion-gap-calculator.

IEEE

TG we-Calculate Editorial Team, "Urine Anion Gap Calculator — UAG," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/urine-anion-gap-calculator

BibTeX

@misc{wecalculate_urine_anion_gap_calculator, title = {Urine Anion Gap Calculator — UAG}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/urine-anion-gap-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?