Last verified · v1.0
Calculator · health
Urine Anion Gap Calculator
Calculate urine anion gap (Na+ + K+ - Cl-) to differentiate renal tubular acidosis from non-renal causes of metabolic acidosis.
Inputs
Urine Anion Gap
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
Urine Anion Gap: Formula, Derivation, and Clinical Interpretation
The urine anion gap (UAG) is a calculated index that estimates urinary ammonium (NH4+) excretion — the kidney's principal mechanism for eliminating excess acid. Clinicians apply the UAG to distinguish renal from non-renal causes of normal anion gap (hyperchloremic) metabolic acidosis, making it a cornerstone tool in the diagnosis of renal tubular acidosis (RTA) and unexplained acidemia.
The UAG Formula
UAG = (Na+ + K+) − Cl−
All three variables are measured in milliequivalents per liter (mEq/L), which is numerically identical to mmol/L for monovalent ions. A standard urine electrolyte panel ordered from any clinical laboratory provides these values from a single urine specimen.
Variable Definitions
- Urine Sodium (Na+) — The dominant measured urinary cation. Concentration varies with dietary sodium intake and renal tubular handling. Values below 20 mEq/L suggest volume depletion.
- Urine Potassium (K+) — The second major measured cation. Included because potassium contributes meaningfully to total cation load, particularly in patients taking diuretics or with hyperaldosteronism.
- Urine Chloride (Cl−) — The primary measured urinary anion and the most diagnostically critical variable. As ammonium excretion rises, chloride rises proportionally to maintain urinary electroneutrality, driving the UAG negative.
Physiological Basis: Why UAG Reflects Ammonium
Urine must remain electrically neutral — total cations equal total anions. The measured cations (Na+ + K+) and the measured anion (Cl−) leave a gap that represents unmeasured ions. In clinical practice, the most important unmeasured cation is ammonium (NH4+), which the proximal tubule synthesizes from glutamine and the collecting duct secretes into the urine.
When systemic acid load rises, healthy kidneys dramatically increase NH4+ output. Because NH4+ is excreted paired with Cl−, urinary chloride climbs, shrinking — and eventually reversing — the gap. A strongly negative UAG therefore signals intact renal acidification. Impaired NH4+ secretion, as occurs in distal RTA, leaves Cl− low relative to Na+ and K+, yielding a positive UAG. This mechanism is detailed in Kaplan LJ et al., The Urine Anion Gap in Context (PMC/NIH, 2018).
Interpreting the Result
Negative UAG (typically −20 to −50 mEq/L)
A negative UAG confirms robust NH4+ excretion and an intact renal response. Causes of normal anion gap acidosis with a negative UAG include:
- Severe diarrhea with bicarbonate loss — the most common scenario globally
- Proximal (Type 2) RTA with preserved distal acidification
- Exogenous acid ingestion (e.g., ammonium chloride, acetazolamide)
- Urinary diversion procedures (e.g., ileal conduit)
Positive UAG (greater than 0 mEq/L)
A positive UAG in the setting of confirmed metabolic acidosis indicates defective renal ammonium excretion. Key diagnoses include:
- Distal (Type 1) RTA — inability to acidify urine below pH 5.5; UAG often exceeds +20 mEq/L
- Type 4 RTA (hyporeninemic hypoaldosteronism) — commonly seen with diabetes mellitus, ACE-inhibitor use, or chronic kidney disease
- Advanced chronic kidney disease — reduced nephron mass limits NH4+ synthesis
According to StatPearls: Biochemistry, Anion Gap (NCBI Bookshelf), a UAG persistently above +20 mEq/L carries high specificity for distal RTA when serum pH is below 7.35 and the serum anion gap is normal. The UCSF Hospitalist Handbook Algorithm for Acid-Base Disorders incorporates UAG as a branch-point decision in evaluating non-anion gap acidosis.
Worked Example
Case 1 — Distal RTA: A 34-year-old woman has serum pH 7.28, serum HCO3− 14 mEq/L, serum anion gap 10 mEq/L, and urine pH 6.2. Urine electrolytes: Na+ = 45 mEq/L, K+ = 22 mEq/L, Cl− = 18 mEq/L. UAG = (45 + 22) − 18 = +49 mEq/L. This strongly positive result with high urine pH confirms distal RTA.
Case 2 — Diarrhea: A 19-year-old man has serum pH 7.30, HCO3− 17 mEq/L after three days of profuse diarrhea. Urine: Na+ = 35 mEq/L, K+ = 30 mEq/L, Cl− = 95 mEq/L. UAG = (35 + 30) − 95 = −30 mEq/L. The negative UAG confirms appropriate renal NH4+ excretion and a GI bicarbonate loss etiology.
Limitations
The UAG loses reliability when urinary Na+ falls below 20 mEq/L (volume depletion), as sodium avidity limits chloride delivery independent of ammonium. It is also distorted by ketonuria, hippurate excretion (toluene ingestion), and heavy proteinuria — all of which add unmeasured anions. In these scenarios, the urine osmol gap provides a more accurate surrogate for NH4+ excretion.
Reference