Calculators & Tools

Urine Anion Gap Calculator

UAG — Distal RTA Workup

1 What is the Urine Anion Gap Calculator?

The Urine Anion Gap Calculator estimates urinary ammonium excretion from spot urine electrolytes to help classify a normal-anion-gap metabolic acidosis (NAGMA) as renal versus gastrointestinal in origin. It computes UAG = Urine Na⁺ + Urine K⁺ − Urine Cl⁻, with a positive result suggesting impaired renal ammonium excretion (renal tubular acidosis) and a negative result suggesting gastrointestinal bicarbonate loss. The app attributes the original description of this test to Goldstein, American Journal of Nephrology 1986.

2 When to use it

  • Differentiating renal tubular acidosis from gastrointestinal bicarbonate loss in a child with normal-anion-gap metabolic acidosis
  • Working up unexplained NAGMA (e.g. in a patient without obvious diarrhoea) to decide whether a renal acidification defect is likely
  • Supporting a work-up for distal (Type 1), proximal (Type 2), or hypoaldosteronism-related (Type 4) RTA when the UAG is positive
  • Corroborating a clinical diagnosis of diarrhoea-, fistula-, or ileostomy-related bicarbonate loss when the UAG is negative
  • Guiding follow-up testing (urine pH, serum/urine potassium, ABG) once the UAG points toward a renal cause

3 Formula & method

UAG = Na + K − Cl, calculated from spot urine sodium, potassium, and chloride. The app interprets a UAG greater than 5 as positive ('suggests RTA'), a UAG less than −5 as negative ('suggests GI bicarb loss'), and values in between as indeterminate — for which it suggests calculating a urine osmolar gap instead, quoted as 'Urine osm − 2[Na+K] − Urea/2.8 − Glu/18'.
  • Goldstein, Am J Nephrol 1986

4 Frequently asked questions

What does a positive urine anion gap mean?

The app states a UAG greater than 5 suggests impaired NH4⁺ excretion, pointing toward distal (Type 1) RTA, hypoaldosteronism (Type 4), or proximal (Type 2) RTA with bicarbonaturia.

What does a negative urine anion gap mean?

A UAG below −5 indicates appropriate ammonium excretion, meaning the acidosis is most likely from gastrointestinal bicarbonate loss such as diarrhoea, fistula, or ileostomy.

What if the urine anion gap is close to zero?

The app labels values between −5 and 5 as indeterminate and suggests calculating the urine osmolar gap as a surrogate marker instead.

When is the urine anion gap unreliable?

The app's reference notes the UAG is unreliable in the presence of a urinary tract infection (urease-producing organisms), volume depletion, or high levels of unmeasured urine anions.

What inputs does the calculator need?

Spot urine sodium, potassium, and chloride, all in mEq/L.

For qualified clinicians. This page and the PediAid app are a clinical aid only. Calculations and reference data must be verified against the patient's clinical context, the source guideline and your local protocols before any treatment decision is made.