Formula

Urine Anion Gap Formula

The urine anion gap formula UAG = Urine Na⁺ + K⁺ − Cl⁻ is a bedside surrogate for urinary ammonium (NH₄⁺) excretion — the kidney's main route for eliminating acid. A negative UAG means appropriate NH₄⁺ excretion; a positive UAG points to impaired renal acid handling.

The urine anion gap equation

The urine anion gap (UAG) applies the same electroneutrality logic used for the serum anion gap formula, but to the urine. In any urine sample, total cations must equal total anions. The routinely measured urinary cations are sodium (Na⁺) and potassium (K⁺); the routinely measured urinary anion is chloride (Cl⁻). The "missing" anion that balances the equation is ammonium (NH₄⁺), which most laboratories do not measure directly. Rearranging electroneutrality gives the formula:

UAG = Urine Na⁺ + Urine K⁺ − Urine Cl⁻
≈ unmeasured anions − unmeasured cations ≈ −NH₄⁺ excretion

Because NH₄⁺ is the dominant unmeasured urinary cation during an acid load, the UAG moves inversely with it: as the kidney excretes more NH₄⁺ (paired with Cl⁻ to maintain electroneutrality), urinary chloride rises and the UAG becomes more negative. The UAG therefore functions as an indirect mirror of renal ammonium excretion, which is itself the principal index of the kidney's ability to respond to a metabolic acidosis.

Interpretation: negative vs positive

The UAG is used chiefly to separate the causes of a normal-anion-gap metabolic acidosis (NAGMA) into extra-renal (GI) versus renal origins.

Urine anion gap Renal NH₄⁺ excretion Interpretation
Negative (≤ −20) Appropriately high The kidney is excreting ammonium normally — the acidosis is extra-renal, most often diarrhea (GI bicarbonate loss).
Indeterminate (−20 to +20) Borderline Non-diagnostic — consider volume depletion, mixed disorders, or the urine osmolar gap for a direct NH₄⁺ estimate.
Positive (≥ +20) Inappropriately low The kidney is failing to excrete ammonium — points to renal tubular acidosis (RTA) or renal failure.

Worked example. A patient with a normal-anion-gap metabolic acidosis has urine Na⁺ 45, K⁺ 30, Cl⁻ 110 mEq/L. UAG = 45 + 30 − 110 = −35, a clearly negative value indicating appropriate NH₄⁺ excretion and pointing to a GI cause such as diarrhea. Contrast a patient with distal RTA whose urine shows Na⁺ 40, K⁺ 25, Cl⁻ 50: UAG = 40 + 25 − 50 = +15, a positive value consistent with impaired renal acid secretion. You can run both through the urine anion gap calculator to confirm.

Limitations and when the UAG fails

Do not trust the UAG when urine sodium is low.

If urine Na⁺ is below 25 mEq/L, the kidney is sodium-avid (volume depletion), and distal sodium delivery is too low to generate the voltage needed for NH₄⁺ excretion. The UAG will be falsely positive even though the kidney is not intrinsically at fault — the kidney is simply underperfused. In this setting, the urine anion gap cannot distinguish RTA from prerenal physiology.

A second failure mode is renal failure itself. In advanced chronic kidney disease the nephron mass is too reduced to generate a meaningful ammonium response regardless of tubular function, so the UAG loses discriminating power. The UAG is also invalidated when unusual anions appear in the urine — ketoacids (which pair with NH₄⁺ but are unmeasured), hippurate in toluene toxicity, or exogenous anions — because these disturb the simple "NH₄⁺ is the only unmeasured cation" assumption. In each of these settings the urine osmolar gap (calculated − measured urine osmolality) provides a more direct quantitative estimate of urinary NH₄⁺ and is the preferred tool.

Despite these caveats, the UAG remains the fastest available bedside test for localizing the cause of a normal-anion-gap metabolic acidosis when renal function is preserved and the patient is not profoundly volume-depleted. It is most powerful when paired with the serum anion gap and a careful history of GI losses.