Urine anion gap: telling diarrhea from RTA
Two patients can share the same normal anion gap acidosis, one from the gut and one from the kidney. The blood can't tell them apart, but the urine anion gap can.
Chapters (11)
Use the urine anion gap as an estimate of urine ammonium to tell a gut cause (such as diarrhea) from a kidney cause (such as distal renal tubular acidosis) of a normal anion gap (hyperchloremic) metabolic acidosis.
The short version
- The urine anion gap is urine Na⁺ plus K⁺, minus Cl⁻, and it estimates urine ammonium.
- In a normal anion gap acidosis, a negative urine anion gap usually means the gut lost the bicarbonate.
- A zero or positive urine anion gap points to a kidney that is failing to excrete acid, as in distal RTA.
- Urine pH can rise above 5.5 in diarrhea with low potassium, so for ammonium trust the gap over the pH.
- Ketoacids, hippurate and a urine sodium below about 25 mEq/L can mislead the gap, and it is only an estimate.
Normal anion gap acidosis: gut or kidney?
Two patients have the same blood results: bicarbonate 14 mEq/L, chloride high and a normal anion gap. One has diarrhea. The other has a kidney that can't get rid of acid. The blood can't tell them apart, but the urine can. The urine anion gap is the tool that tells gut from kidney in a normal gap acidosis.
the serum gap is checked first; the urine gap is used only when it is normal
When the body loses bicarbonate, chloride rises to take its place, so the gap stays normal. That is a normal anion gap, or high-chloride, hyperchloremic metabolic acidosis.[1][11]
It has two big sources. The gut loses bicarbonate, with diarrhea or a fistula, or the kidney fails to handle acid, as in renal tubular acidosis (RTA).[1][4]
Ammonium: how the kidney gets rid of acid
The kidney gets rid of acid mainly as ammonium (NH₄⁺). For every ammonium it excretes, it adds one new bicarbonate to the blood. In acidosis, a healthy kidney can raise its ammonium excretion several-fold.[4][5]
That link is why ammonium matters here. A kidney that responds to acidosis by excreting more ammonium is also making new bicarbonate. If the acidosis persists while ammonium output is high, the bicarbonate is usually being lost somewhere else, most often the gut.[4][6]
So the key question in a normal gap acidosis is: is this kidney pumping out ammonium?
- Yes: the kidney is responding, so the bicarbonate was lost elsewhere, usually the gut.[4][6]
- No: the kidney is the problem.[4][6]
There is a catch: urine ammonium isn't part of a routine urine test. So it is estimated.[9]
The urine anion gap formula
Urine, like blood, is electrically neutral. The lab measures sodium and potassium, the positive ions, and chloride, the negative one. Ammonium is a positive ion the lab doesn't measure, and it leaves mostly with chloride.[4][12]
mEq/L; ammonium is the unmeasured cation, carried out with chloride
More ammonium means more chloride, which outweighs sodium plus potassium, so the gap turns negative. With good ammonium excretion, it is typically about −20 to −50 mEq/L.[4][12]
| Urine anion gap | Ammonium excretion | Where the problem is |
|---|---|---|
| Negative | Good: the kidney is excreting ammonium | Usually the gut (diarrhea) |
| Zero or positive | Little ammonium | The kidney, as in distal RTA |
Worked examples: urine anion gap in diarrhea vs RTA
- (30 + 10) − 80 = −40
- Negative: the kidney is excreting ammonium
- So the gut lost the bicarbonate: the diarrhea
- (45 + 30) − 60 = +15
- Positive: little ammonium
- So the kidney is failing, as in distal RTA
Same blood, opposite urine. Patient 1's gap of −40 sits inside the −20 to −50 range of good ammonium excretion; patient 2's is positive. In both cases the urine sodium is above 25 mEq/L, so the gap can be read (see the limits below).[4][12]
Urine pH: why it can mislead
In distal RTA, the distal tubule can't secrete enough acid, so urine pH stays above 5.5.[3]
But with diarrhea and low potassium, so much ammonia buffers the urine that its pH can rise above 5.5 too. A high urine pH alone does not prove the kidney is failing to excrete ammonium.[4][5]
Two limits: when the gap misleads
- Unmeasured urinary anions. Ketoacids, or hippurate from toluene, carry ammonium out without chloride, so the gap can look positive even when the kidney works.[4][8]
- A very dry patient. With a urine sodium below about 25 mEq/L, low distal sodium delivery blunts acid excretion, so a positive gap can mislead.[4][10]
And the urine anion gap tracks measured ammonium only loosely, so it is an estimate, not a measurement.[8][9]
Putting it together, step by step
- Confirm a normal serum anion gapNa⁺ − (Cl⁻ + HCO₃⁻) is normal, so this is a hyperchloremic metabolic acidosis.[1]
- Check the gap can be readUrine sodium above about 25 mEq/L and no ketoacids or hippurate in the urine.[4]
- Calculate the urine anion gap(urine Na⁺ + urine K⁺) − urine Cl⁻.[12]
- Read the signNegative: the kidney is excreting ammonium, so the gut usually lost the bicarbonate. Zero or positive: the kidney is failing to excrete acid, as in distal RTA.[6]
- Don't let the urine pH overrule itA urine pH above 5.5 can occur with diarrhea and low potassium.[4]
Practice question
Original · USMLE styleA 24-year-old woman comes to the physician because of fatigue and muscle weakness for 3 months. She says she has had no vomiting or diarrhea and takes no medications. She is 165 cm (5 ft 5 in) tall and weighs 46 kg (101 lb); BMI is 17 kg/m². Pulse is 92/min and blood pressure is 104/66 mm Hg. Examination shows no other abnormalities. Laboratory studies show:
| Serum Na⁺ | 136 mEq/L |
|---|---|
| Serum K⁺ | 2.9 mEq/L |
| Serum Cl⁻ | 114 mEq/L |
| Serum HCO₃⁻ | 14 mEq/L |
| Serum urea nitrogen | 18 mg/dL |
| Serum creatinine | 0.8 mg/dL |
| Serum glucose | 88 mg/dL |
| Arterial pH (room air) | 7.31 |
| Arterial PCO₂ | 29 mm Hg |
| Urine Na⁺ | 35 mEq/L |
| Urine K⁺ | 10 mEq/L |
| Urine Cl⁻ | 70 mEq/L |
| Urine pH | 6.0 |
| Urine ketones | negative |
Common questions
How do you calculate the urine anion gap?
Add urine sodium and urine potassium, then subtract urine chloride: (Na⁺ + K⁺) − Cl⁻. It estimates urine ammonium, which the lab doesn't measure routinely.
What does a negative urine anion gap mean?
In a normal anion gap acidosis, a negative gap means the kidney is excreting ammonium, so the bicarbonate was usually lost through the gut, as in diarrhea. With good ammonium excretion it is typically about −20 to −50 mEq/L.
What does a positive urine anion gap mean?
Little ammonium is being excreted, so the kidney is failing to get rid of acid, as in distal renal tubular acidosis. Ketoacids, hippurate or a urine sodium below about 25 mEq/L can also make it look positive.
Why use the urine anion gap instead of urine pH?
Urine pH stays above 5.5 in distal RTA, but with diarrhea and low potassium, ammonia can buffer the urine so its pH rises above 5.5 too. For ammonium, trust the gap over the pH.
Why is ammonium carried with chloride?
Urine is electrically neutral, and ammonium, a positive ion, leaves mostly with chloride. More ammonium therefore means more chloride, which outweighs sodium plus potassium and turns the gap negative.
Transcript
Read the full narration, by chapter691 words
0:00Two patients, the same blood results
Two patients have the same blood results: bicarbonate 14, chloride high, and a normal anion gap. One has diarrhea. The other has a kidney that can't get rid of acid. The blood can't tell them apart. But the urine can. Today, the urine anion gap tells gut from kidney in a normal gap acidosis.
0:21The serum anion gap and normal-gap acidosis
The serum anion gap is sodium minus, in brackets, chloride plus bicarbonate. When the body loses bicarbonate, chloride rises to take its place, so the gap stays normal. That's a normal anion gap, or high-chloride, metabolic acidosis.
0:39Two sources: gut or kidney
Two big sources: the gut loses bicarbonate, with diarrhea or a fistula, or the kidney fails to handle acid, as in renal tubular acidosis.
0:49Ammonium: how the kidney gets rid of acid
Now, from episode 5: the kidney gets rid of acid mainly as ammonium. And for every ammonium it excretes, it adds one new bicarbonate to the blood. In acidosis, a healthy kidney can raise its ammonium excretion several-fold. So the key question is: is this kidney pumping out ammonium? If yes, the bicarbonate was lost elsewhere, usually the gut. If not, the kidney is the problem. But there's a catch: urine ammonium isn't part of a routine urine test. So we estimate it.
1:24The urine anion gap formula
Urine, like blood, is electrically neutral. The lab measures sodium and potassium, the positives, and chloride, the negative. Ammonium is a positive ion the lab doesn't measure, and it leaves mostly with chloride. So the urine anion gap is urine sodium plus urine potassium, minus urine chloride. More ammonium means more chloride, which outweighs sodium plus potassium, so the gap turns negative. With good ammonium excretion, it's typically about minus 20 to minus 50.
1:58Testing the two patients (−40 vs +15)
Let's test our two patients. Patient one: urine sodium 30, potassium 10, chloride 80. That's minus 40. Negative: the kidney is excreting ammonium, so the gut lost the bicarbonate. That's the diarrhea. Patient two: sodium 45, potassium 30, chloride 60. That's plus 15. Positive: little ammonium, so the kidney is failing, as in distal renal tubular acidosis.
2:30Urine pH: why it can mislead
What about urine pH? In distal RTA, the distal tubule can't secrete enough acid, so urine pH stays above 5.5. But with diarrhea and low potassium, so much ammonia buffers the urine that its pH can rise above 5.5 too. So for ammonium, trust the gap over the pH.
2:52Two limits of the urine anion gap
Two limits. First, ketoacids, or hippurate from toluene, carry ammonium out without chloride, so the gap can look positive even when the kidney works. Second, in a very dry patient with a urine sodium below about 25, low distal sodium delivery blunts acid excretion, so a positive gap can mislead. And it tracks measured ammonium only loosely, so it's an estimate, not a measurement.
3:21Practice question
Your turn. A 24-year-old woman has three months of fatigue and muscle weakness. She is very thin, denies vomiting or diarrhea, and takes no medicines. Serum sodium 136, potassium 2.9, chloride 114, bicarbonate 14, glucose normal. Urine sodium 35, potassium 10, chloride 70, and urine pH 6. What's the most likely cause? A, distal renal tubular acidosis. B, type 4 renal tubular acidosis. C, laxative misuse. D, self-induced vomiting. E, diabetic ketoacidosis. Pause here and decide. The serum gap is 136 minus 128: eight, which is normal. So E is out: ketoacidosis widens the gap, and her glucose is normal. D is out: vomiting loses stomach acid and raises bicarbonate. B is out: type 4 brings a high potassium, and hers is low. The urine gap is 35 plus 10, minus 70: minus 25. Negative, so her kidney is excreting ammonium: that rules out A. The urine pH of six is the trap: low potassium drives ammonia production, and ammonia buffers the urine. So the answer is C: hidden laxative use, losing bicarbonate and potassium through the gut.
4:58High-yield recap
Three things to keep. One: the urine anion gap is urine sodium plus potassium, minus chloride, and it estimates ammonium. Two: in a normal gap acidosis, negative usually means gut; positive means the kidney is failing to excrete acid, as in distal RTA. Three: ketoacids and a low urine sodium can mislead it.
5:24Next lesson: renal tubular acidosis
Next up: renal tubular acidosis, types one, two and four, and where in the tubule each one breaks.
Sources
Numbers in the text, e.g. [1], point here- Lewis JL III. Acid-Base Disorders; Metabolic Acidosis; Acid-Base Regulation; Metabolic Alkalosis. MSD Manual Professional Version (2025). msdmanuals.com/professional/endocrine-and-metabolic-disorders/acid-base-regulation-and-disorders/metabolic-acidosis
- Lewis JL III. Hypokalemia. MSD Manual Professional Version (2025). msdmanuals.com/professional/endocrine-and-metabolic-disorders/electrolyte-disorders/hypokalemia
- Hechanova LA. Renal Tubular Acidosis. MSD Manual Professional Version (2026). msdmanuals.com/professional/genitourinary-disorders/renal-transport-abnormalities/renal-tubular-acidosis
- Kraut JA, Madias NE. Differential diagnosis of nongap metabolic acidosis: value of a systematic approach. Clin J Am Soc Nephrol 2012;7(4):671–679. pmc.ncbi.nlm.nih.gov/articles/PMC3315347/
- Hamm LL, Nakhoul N, Hering-Smith KS. Acid-Base Homeostasis. Clin J Am Soc Nephrol 2015;10(12):2232–2242. pmc.ncbi.nlm.nih.gov/articles/PMC4670772/
- Batlle DC, Hizon M, Cohen E, Gutterman C, Gupta R. The use of the urinary anion gap in the diagnosis of hyperchloremic metabolic acidosis. N Engl J Med 1988;318:594–599.
- Palmer BF, Kelepouris E, Clegg DJ. Renal Tubular Acidosis and Management Strategies: A Narrative Review. Adv Ther 2021. pmc.ncbi.nlm.nih.gov/articles/PMC7889554/
- Uribarri J, Oh MS. The Urine Anion Gap: Common Misconceptions. J Am Soc Nephrol 2021;32(5):1025–1028. pmc.ncbi.nlm.nih.gov/articles/PMC8259693/
- Uribarri J, Goldfarb DS, Raphael KL, Rein JL, Asplin JR. Beyond the urine anion gap: in support of the direct measurement of urinary ammonium. Am J Kidney Dis 2022;80(5):667–676.
- Korus J et al. Metabolic Acidosis in Patients with CKD: A Narrative Review. Diagnostics (Basel) 2025;15(16). pmc.ncbi.nlm.nih.gov/articles/PMC12385983/
- Kharsa A et al. Anion Gap and Non-Anion Gap Metabolic Acidosis. StatPearls (2025). ncbi.nlm.nih.gov/books/NBK448090/
- Brandis K. Acid-base Physiology, §3.04 The Urinary Anion Gap (LibreTexts). med.libretexts.org/Bookshelves/Anatomy_and_Physiology/Book%3A_Acid-base_Physiology_(Brandis)/03%3A_Acid-Base_Disorders/3.04%3A_The_Urinary_Anion_Gap
- LITFL. Urinary Anion Gap. litfl.com/urinary-anion-gap/
- Deranged Physiology. The urinary anion gap in normal anion gap metabolic acidosis. derangedphysiology.com/main/core-topics-intensive-care/acid-base-disturbances/Chapter%205.2.1/urinary-anion-gap-normal-anion-gap-metabolic-acidosis
The practice question is original and its patient is synthetic. Every fact is checked against the sources above in independent accuracy reviews. Always follow your local guidelines and your own laboratory’s ranges.
Image credits. Illustrations: Servier Medical Art (smart.servier.com), licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); adapted (recoloured, outlined, resized): intestine, nephron, urine sample container. All other diagrams are original; example lab values are illustrative.
Corrections. None so far. Spotted an error? Email info@medservatory.com with the lesson code MS-S1-REN-008.
For exam study only, not medical advice. Read the medical disclaimer.
In this series
Playlist on YouTube- EP 01ABG interpretation, made simple5:35
- EP 02Anion gap explained: high vs normal gap metabolic acidosis5:25
- EP 03Winters' formula: the expected PaCO₂ in metabolic acidosis5:10
- EP 04Delta ratio: find the hidden second acid–base disorder5:09
- EP 05New bicarbonate: how the kidney excretes acid with ammonium5:23
- EP 06High anion gap metabolic acidosis causes, sorted by the anion5:54
- EP 07Osmolar gap: how toxic alcohols hide from the anion gap5:31
- EP 08Urine anion gap: telling diarrhea from RTA5:33
- EP 09Renal tubular acidosis: tell RTA types 1, 2 and 4 apart5:24
- EP 10Metabolic alkalosis: generation, maintenance and urine chloride5:30
- EP 11Vomiting metabolic alkalosis: why the urine turns acid5:36
- EP 12Bartter vs Gitelman: NKCC2, NCC and urine calcium5:21
- EP 13Respiratory acidosis compensation: acute vs chronic5:22
- EP 14Respiratory alkalosis compensation: acute vs chronic5:33
- EP 15Metabolic alkalosis compensation: the expected PaCO₂5:12
- EP 16Salicylate poisoning acid-base: a classic mixed disorder5:31
- EP 17Type A vs type B lactic acidosis: split it by mechanism5:33
- EP 18DKA anion gap explained: from high gap to hyperchloraemic acidosis5:42
- EP 19Acidosis and hyperkalemia: how pH shifts potassium5:43
- EP 20ABG interpretation in 6 steps: the acid-base algorithm5:32
- EP 21Acid-base practice cases: three ABG vignettes, one algorithm5:44