
The urine anion gap (UAG) is a calculated value used mainly during normal-anion-gap metabolic acidosis to estimate whether the kidneys are increasing ammonium excretion. It is calculated from urine sodium, potassium, and chloride: urine sodium + urine potassium − urine chloride. During metabolic acidosis caused by diarrhea or another gastrointestinal bicarbonate loss, healthy kidneys usually increase ammonium chloride excretion, making urine chloride relatively high and the UAG more negative. In distal or type 4 renal tubular acidosis, ammonium excretion may be impaired and the UAG may stay positive. This classic interpretation is useful, but it is not exact. Modern evidence shows that UAG is influenced by diet, nonsteady-state electrolyte balance, kidney function, and unmeasured urinary ions, so it may correlate poorly with directly measured ammonium in some patients. When available, direct urine ammonium is more informative. UAG remains a practical bedside clue, not a definitive diagnosis.
- Urine anion gap = urine sodium + urine potassium − urine chloride, usually reported in mmol/L or mEq/L.
- A negative UAG during normal-anion-gap metabolic acidosis often supports increased ammonium excretion and an extrarenal cause such as diarrhea.
- A positive or insufficiently negative UAG can support impaired kidney ammonium excretion, including distal or type 4 RTA.
- Direct urine ammonium measurement is preferred when available because the UAG is an imperfect surrogate.
- UAG should not be interpreted without serum bicarbonate, blood anion gap, potassium, kidney function, urine pH, and clinical history.
Table of Contents
- What the Urine Anion Gap Is
- How UAG Relates to Urine Ammonium
- Negative, Positive, and Near-Zero UAG Results
- UAG in Renal Tubular Acidosis
- Limitations and Common Interpretation Mistakes
- UAG Versus Direct Ammonium and the Urine Osmolal Gap
- Collection, Follow-Up, and Safety
What the Urine Anion Gap Is
The UAG is not a laboratory measurement of a hidden “gap.” It is arithmetic based on three measured urine electrolytes:
UAG = urine sodium (Na⁺) + urine potassium (K⁺) − urine chloride (Cl⁻)
If urine sodium is 40 mmol/L, urine potassium is 30 mmol/L, and urine chloride is 100 mmol/L:
UAG = 40 + 30 − 100 = −30 mmol/L
The calculation relies on electroneutrality. Urine must contain equal total positive and negative charges, but routine electrolyte panels measure only some ions. Ammonium is an important unmeasured cation. During metabolic acidosis, healthy kidneys increase ammonium excretion, much of it accompanied by chloride as NH₄Cl. As urine chloride rises because of this unmeasured ammonium, the calculated UAG often becomes negative.
The UAG is mainly useful after blood tests have established a normal-anion-gap metabolic acidosis (NAGMA). It is not the first test for acid-base disease.
The blood anion gap is typically calculated as:
Serum anion gap = serum sodium − (serum chloride + serum bicarbonate)
An elevated blood anion gap points toward accumulation of unmeasured acids such as lactate, ketoacids, toxins, or acids retained in kidney failure. A normal blood anion gap with low bicarbonate instead raises possibilities such as gastrointestinal bicarbonate loss or renal tubular acidosis.
A bicarbonate blood test and serum electrolytes therefore come before UAG interpretation.
How UAG Relates to Urine Ammonium
The classic bedside idea is an inverse relationship: more ammonium chloride excretion means higher urine chloride and a more negative UAG.
This is easiest to understand in diarrhea. Bicarbonate is lost through stool, causing hyperchloremic metabolic acidosis. If kidney function is intact, renal ammonium production should rise. NH₄⁺ is not included in the UAG formula, but its accompanying chloride is. The large chloride concentration pulls the UAG below zero.
In contrast, if the kidneys cannot increase ammonium excretion, urine chloride may not rise enough to make the gap negative. A positive UAG in a patient with NAGMA can therefore support a renal acidification defect.
This relationship is useful but not exact. The UAG also reflects the balance of dietary sodium, potassium, and chloride and any selective losses outside the urine. Other unmeasured urinary cations and anions alter the calculation. The patient may also not be in a steady state.
For that reason, a UAG is better described as a qualitative clue to ammonium excretion than a quantitative estimate.
The related urine ammonium test measures the substance of interest directly and avoids many of these assumptions.
Negative, Positive, and Near-Zero UAG Results
There is no universal “normal range” for UAG because interpretation depends on acid-base status and diet.
| UAG pattern | Traditional interpretation | Common clinical setting |
|---|---|---|
| Clearly negative | Ammonium excretion is increased | Diarrhea or other extrarenal bicarbonate loss |
| Positive | Ammonium excretion may be impaired | Distal RTA, type 4 RTA, reduced kidney function |
| Near zero | Indeterminate | Mixed physiology, mild acidosis, diet/medication effects |
A negative number such as −30 or −50 mmol/L during established NAGMA often supports a strong renal ammonium response. Exact cutoffs vary, and there is no magic point below which the diagnosis is proven.
A positive number such as +20 or +40 mmol/L can support impaired ammonium excretion when the patient is acidotic and the kidneys should be increasing acid elimination. But the UAG can be positive for reasons unrelated to RTA.
A value near zero provides little discrimination. The underlying disease, degree of acidosis, kidney function, and urine pH become more important.
A positive UAG is not automatically abnormal
Outside metabolic acidosis, a positive UAG can be physiologically normal. Typical diets can create a positive difference between measured urinary cations and chloride. The test only gains diagnostic meaning when there is a reason for ammonium excretion to be markedly increased.
This is a common source of confusion: the UAG is not analogous to a blood anion gap with a fixed reference range and a general “high is bad” interpretation.
UAG in Renal Tubular Acidosis
The UAG is commonly taught as a tool for distinguishing diarrhea from renal tubular acidosis.
Distal, or type 1, RTA
Distal RTA impairs acid secretion in the collecting duct. During systemic acidosis, urine pH often remains above about 5.3–5.5 and ammonium excretion is inadequate. The UAG may therefore be positive.
Patients can develop hypokalemia, nephrocalcinosis, calcium phosphate stones, and bone disease. A persistently alkaline urine is suggestive only after urinary tract infection and other causes have been considered. The urine pH test complements UAG but does not directly measure total acid excretion.
Proximal, or type 2, RTA
In proximal RTA, bicarbonate reabsorption is impaired. After serum bicarbonate falls below the reduced renal threshold, distal acid secretion can still function. Ammonium excretion may rise appropriately, so the UAG can become negative.
This is why a negative UAG does not rule out proximal RTA. Other clues include glucosuria without hyperglycemia, phosphate wasting, urate wasting, aminoaciduria, or a medication associated with proximal tubular dysfunction.
Type 4 RTA
Type 4 RTA is commonly associated with hyperkalemia and reduced aldosterone effect. Hyperkalemia suppresses renal ammonium generation, so ammonium excretion falls and UAG can remain positive despite NAGMA.
Diabetes, chronic kidney disease, renin-angiotensin system blockers, mineralocorticoid receptor antagonists, and other causes of hypoaldosteronism are common contexts.
The TTKG has historically been used to assess distal potassium secretion in this setting, but modern practice recognizes significant limitations in that calculation as well.
Limitations and Common Interpretation Mistakes
Modern reviews emphasize that UAG should not be treated as a precise ammonium assay.
Assuming a fixed inverse relationship
The original clinical studies showed an inverse association between UAG and ammonium in selected acidotic patients. Later analyses showed that this relationship does not hold consistently across diet, kidney disease, and nonsteady-state conditions.
Ignoring unmeasured urinary anions
When ammonium is excreted with anions other than chloride, the UAG may not become negative even if ammonium excretion is high. Ketoacid anions, drug anions, bicarbonate, and other organic anions can matter.
Using UAG when urine sodium is extremely low
Severe volume depletion can lower urine sodium so much that distal sodium delivery limits acid and potassium handling. The urine electrolyte pattern may be difficult to interpret.
Ignoring kidney function
CKD reduces total ammonium excretory capacity. A positive UAG may reflect limited nephron mass rather than a discrete RTA. A reduced eGFR changes the expected response.
Using UAG in high-anion-gap acidosis without a specific reason
The UAG is mainly a tool for NAGMA. In diabetic ketoacidosis, lactic acidosis, toxic alcohol exposure, and other high-gap states, diagnosis and treatment focus on the accumulated acid and underlying emergency.
Confusing urine pH with ammonium excretion
A low urine pH does not guarantee adequate net acid excretion. Type 4 RTA can have urine pH below 5.5 yet low ammonium production. Conversely, high urine pH can occur with urease-producing urinary infection.
The practical lesson is to use UAG as one clue inside a larger acid-base assessment.
UAG Versus Direct Ammonium and the Urine Osmolal Gap
If direct urine ammonium is available, it is usually preferred because it answers the clinical question directly.
A direct result can be expressed as concentration or daily excretion. During significant metabolic acidosis, an appropriately functioning kidney should increase ammonium substantially. An inappropriately low value supports impaired renal acid excretion.
The urine osmolal gap is another indirect method. A common calculated urine osmolality uses sodium, potassium, urea, and glucose. Measured osmolality includes additional particles, including ammonium salts. The difference between measured and calculated osmolality can therefore provide an estimate of unmeasured osmoles and, under suitable conditions, ammonium.
The osmolal gap may be more useful than UAG when ammonium is excreted with non-chloride anions. However, mannitol, alcohols, radiographic agents, high glucose, ketoacid salts, and other unmeasured substances can enlarge the gap.
A urine osmolal gap test therefore remains an estimate, not a replacement for direct NH₄⁺ measurement.
Which test should be used?
A practical sequence is:
- Confirm metabolic acidosis and calculate the serum anion gap.
- If it is a normal-anion-gap acidosis, review gastrointestinal losses, medications, potassium, and kidney function.
- Measure urine ammonium directly if available.
- If direct ammonium is unavailable, use UAG or urine osmolal gap as supporting estimates.
- Interpret urine pH alongside, not instead of, ammonium handling.
No calculation should override a clear clinical history such as profuse diarrhea with an otherwise appropriate renal response.
Collection, Follow-Up, and Safety
UAG requires a spot urine sodium, potassium, and chloride measured from the same sample. Blood electrolytes and bicarbonate should be obtained near the same time because the acid-base state can change with treatment.
No fasting is usually needed. Do not intentionally change salt, potassium, alkali, or fluid intake unless instructed. IV saline, sodium bicarbonate, diuretics, vomiting, diarrhea, and potassium therapy can all alter urine electrolytes quickly.
If UAG is negative and gastrointestinal bicarbonate loss is likely, treatment focuses on the cause and on replacing fluid and electrolytes appropriately. If UAG is positive with NAGMA, clinicians may investigate RTA, CKD, hypoaldosteronism, medications, or urinary obstruction depending on potassium and other findings.
A renal function panel can provide bicarbonate, creatinine, potassium, and other key data. Persistent unexplained acidosis may require blood gas testing and nephrology evaluation.
Urgent care is appropriate for severe weakness, confusion, shock, very rapid or deep breathing, dangerous potassium abnormalities, severe dehydration, or markedly reduced urine output. The severity of metabolic acidosis is determined from blood pH and bicarbonate, not from UAG.
Used carefully, the urine anion gap is a convenient physiologic shortcut. Its best role is to suggest whether ammonium chloride excretion is robust or impaired during NAGMA when direct ammonium is unavailable.
Practical examples of UAG use
Diarrhea: A patient has bicarbonate of 15 mmol/L, a normal serum anion gap, and ongoing watery diarrhea. If the kidneys are functioning appropriately, urinary ammonium chloride excretion should rise. Urine chloride may exceed the sum of urine sodium and potassium, making the UAG clearly negative. This supports an extrarenal source of bicarbonate loss, although direct urine ammonium is more definitive when available.
Distal RTA: A patient with non-anion-gap acidosis, hypokalemia, urine pH above 5.5, and recurrent calcium phosphate stones has a positive UAG. The combined pattern supports impaired renal acidification. The diagnosis still requires exclusion of urinary infection and other causes of alkaline urine and should be interpreted with kidney function and medication history.
Type 4 RTA: A patient with diabetes, chronic kidney disease, hyperkalemia, bicarbonate of 18 mmol/L, and a positive UAG may have reduced ammonium generation related to hypoaldosterone physiology. Here the potassium result is a major clue. The UAG supports reduced ammonium excretion but does not determine whether the cause is low renin, low aldosterone, medication effect, or aldosterone resistance.
Ketoacidosis during recovery: Ammonium may be excreted with ketoanions rather than chloride. In that case, ammonium excretion can be high without making the UAG strongly negative. Applying the diarrhea-versus-RTA rule mechanically can therefore produce a wrong conclusion.
Why a “positive” UAG is not automatically abnormal
The UAG is a balance of measured urine cations and chloride, not a direct measurement with a fixed population reference range. In a person who is not acidotic, a positive value can be entirely normal because there is no requirement for the kidney to excrete a large ammonium chloride load.
The test becomes clinically meaningful when the body is asking the kidney to excrete more acid. During metabolic acidosis, particularly a normal-anion-gap acidosis, failure of the UAG to become negative can suggest that ammonium excretion is not increasing as expected. Even then, diet, kidney function, urine sodium delivery, and unmeasured ions can alter the relationship.
Check the serum anion gap first
UAG is primarily a tool for normal-anion-gap metabolic acidosis. If the serum anion gap is elevated, the priority is usually to identify the unmeasured acid—such as lactate, ketones, retained acids in kidney failure, or a toxin—rather than use UAG to divide the problem into diarrhea versus RTA.
Albumin also matters because low albumin lowers the expected serum anion gap. A patient can have an important high-anion-gap process that appears “normal” unless the serum gap is interpreted with albumin in mind.
When the UAG and clinical picture disagree, direct urine ammonium should be favored if available. The osmolal gap can provide another estimate, but it is also indirect. The most reliable diagnosis comes from combining the blood acid-base pattern, potassium, kidney function, urine pH, medication exposure, and history with an appropriately chosen urine test.
A simple checklist before using the UAG
Before calculating or interpreting the UAG, confirm that the patient truly has metabolic acidosis rather than an isolated low bicarbonate from respiratory alkalosis or a laboratory artifact. Then determine whether the serum anion gap is normal after considering albumin. Only after those steps does the UAG become a useful way to think about ammonium excretion in a typical hyperchloremic acidosis.
Next, check whether the urine sample contains sodium, potassium, and chloride from the same collection and whether treatment had already begun. Very low urine sodium, alkali therapy, ketoanion excretion, unusual drug anions, or changing kidney function can undermine the usual assumptions.
This short checklist prevents the most common error: treating a positive or negative UAG as a diagnosis rather than as a context-dependent surrogate for an unmeasured urinary ion.
References
- The Concept, Usefulness, and Limitations of the Urine Anion Gap 2025 (Review)
- Urinary Ammonium in Clinical Medicine: Direct Measurement and the Urine Anion Gap as a Surrogate Marker During Metabolic Acidosis 2023 (Review)
- Beyond the Urine Anion Gap: In Support of the Direct Measurement of Urinary Ammonium 2022 (Review)
- Demystifying normal-anion-gap metabolic acidosis: pathophysiology, aetiology, evaluation and diagnosis 2024 (Review)
- The pathophysiology of distal renal tubular acidosis 2023 (Review)
- The Urine Anion Gap: Common Misconceptions 2021 (Review)
Disclaimer
The urine anion gap is an indirect estimate of renal ammonium handling and can be misleading in several clinical settings. It should be interpreted with serum acid-base tests, potassium, kidney function, urine pH, medications, and clinical history. Severe metabolic acidosis requires prompt medical evaluation regardless of the UAG result.





