Urine Anion Gap Calculator
Calculate urine anion gap to differentiate causes of normal anion gap metabolic acidosis and diagnose renal tubular acidosis.
Enter urine sodium, potassium, and chloride concentrations to compute the urine anion gap and interpret acid-base disorders.
Urine Anion Gap Calculator
Calculate urine anion gap to differentiate causes of normal anion gap metabolic acidosis and diagnose renal tubular acidosis.
About the Urine Anion Gap Calculator
The urine anion gap (UAG) is a simple but powerful tool used to differentiate between the two main categories of normal anion gap metabolic acidosis: those caused by gastrointestinal bicarbonate loss (most commonly diarrhea) and those caused by impaired renal acid excretion (renal tubular acidosis). Understanding this distinction is clinically important because the management of each condition differs substantially.
Metabolic acidosis with a normal serum anion gap — also called hyperchloremic metabolic acidosis — occurs when the body loses bicarbonate or fails to excrete acid. In both situations, chloride replaces lost bicarbonate in the extracellular fluid, raising serum chloride while the anion gap remains normal. The challenge lies in identifying the source. The kidney normally responds to metabolic acidosis by increasing the excretion of ammonium (NH4+) in the urine. Because ammonium is a cation that is not routinely measured in clinical chemistry panels, the urine anion gap serves as a surrogate marker for urinary ammonium excretion.
The formula UAG = Na+ + K+ − Cl− works because ammonium is typically accompanied in the urine by chloride as its anion. When ammonium excretion is high (as in an appropriate renal response to acidosis), urinary chloride is also elevated — so much so that it exceeds the sum of sodium and potassium, producing a negative UAG. When ammonium excretion is low or absent (as in renal tubular acidosis, where the kidney cannot properly acidify the urine), chloride is not elevated and UAG is positive.
A negative UAG (typically below −20 mEq/L in the context of metabolic acidosis) supports intact renal ammonium handling and points toward an extra-renal source of acid or bicarbonate loss — most commonly diarrhea, laxative abuse, or small bowel fistulae. A positive UAG suggests that the kidney is the culprit, and prompts consideration of distal (type 1) RTA, type 4 RTA (associated with hypoaldosteronism), or chronic kidney disease. Proximal (type 2) RTA may have a variable UAG depending on the phase of the disease.
The urine anion gap has important limitations. It is unreliable when urine osmolality is very low (dilute urine), when there is significant ketonuria (because ketoacids carry negative charge that mimics the role of NH4-Cl), or when urinary sodium is less than 25 mEq/L (because very low sodium limits the reliability of the measurement as a proxy). In cases where UAG is unreliable, the urine osmolal gap can be used as an alternative to estimate ammonium excretion. This calculator is designed as an educational tool; UAG must be interpreted in the full clinical context by a qualified healthcare provider.
Urine anion gap examples
The following examples show how urine electrolyte values map to UAG and clinical interpretation.
| Na+ / K+ / Cl− (mEq/L) | UAG | Interpretation |
|---|---|---|
| 20 / 15 / 80 mEq/L | −45 mEq/L | Strongly negative — high NH4+ excretion consistent with GI bicarbonate loss (e.g., diarrhea). |
| 50 / 20 / 30 mEq/L | +40 mEq/L | Strongly positive — impaired NH4+ excretion consistent with distal renal tubular acidosis (type 1 RTA). |
| 50 / 20 / 65 mEq/L | +5 mEq/L | Near zero — borderline result; clinical context required for interpretation. |
| 30 / 25 / 90 mEq/L | −35 mEq/L | Negative UAG — renal acid excretion intact; extra-renal cause of acidosis suspected. |
How to use the Urine Anion Gap Calculator
- Collect a spot urine sample; simultaneous serum electrolytes and blood gas analysis are recommended to confirm metabolic acidosis.
- Enter the urine sodium (Na+) concentration in mEq/L from the urine electrolyte panel.
- Enter the urine potassium (K+) concentration in mEq/L.
- Enter the urine chloride (Cl−) concentration in mEq/L.
- Click Calculate Urine Anion Gap, then interpret the result in context — a negative UAG points toward extra-renal causes, while a positive UAG suggests impaired renal ammonium excretion.
Urine anion gap FAQ
What does the urine anion gap measure?
The urine anion gap (Na+ + K+ − Cl−) estimates urinary ammonium excretion indirectly. Because NH4+ travels with Cl− in the urine, high chloride (producing a negative UAG) implies high ammonium excretion, indicating a normal renal response to acidosis. A positive UAG implies low ammonium excretion, suggesting impaired renal acid handling.
What is a normal urine anion gap?
In healthy individuals without acid-base disturbance, the UAG can be mildly positive or close to zero. In the context of metabolic acidosis, a strongly negative UAG (below −20 mEq/L) indicates appropriate renal compensation, while a positive or only slightly negative value indicates insufficient renal ammonium excretion.
How does diarrhea cause a negative urine anion gap?
Diarrhea causes metabolic acidosis by causing bicarbonate loss in stool. In response, the kidneys increase ammonia production and urinary NH4+ excretion, which carries chloride out in the urine. This raises urinary chloride above Na+ + K+, producing a negative UAG and confirming that the kidneys are functioning correctly.
What causes a positive urine anion gap with acidosis?
A positive UAG during metabolic acidosis means the kidneys are not excreting adequate amounts of ammonium. Common causes include distal (type 1) renal tubular acidosis, type 4 RTA (associated with hypoaldosteronism or aldosterone resistance), and advanced chronic kidney disease with impaired ammonium production.
When is the urine anion gap unreliable?
UAG is unreliable when urinary sodium is very low (below 25 mEq/L), when there is significant ketonuria (ketoacids add unmeasured anions), when urine is very dilute, or in proximal (type 2) RTA where ammonium excretion may be variable. In these settings, the urine osmolal gap may be a better marker of urinary ammonium.
Is the urine anion gap the same as the serum anion gap?
No. The serum anion gap (Na+ − Cl− − HCO3−) identifies whether unmeasured anions are accumulating in the blood, helping to classify metabolic acidosis as high anion gap versus normal anion gap. The urine anion gap is a separate calculation using urine electrolytes to evaluate the kidney's acid-excretion response, and is specifically useful in normal anion gap (hyperchloremic) metabolic acidosis.