Urine Anion Gap Calculator (Na + K − Cl)
Calculate the one-decimal signed urine anion gap from sodium, potassium, and chloride in the same urine specimen using mmol/L or mEq/L, without treating UAG as direct urine ammonium or a universal positive/negative diagnosis.
Content updated: View sources
QuickMedCalc is developed and maintained by an independent developer. Medical content is not independently reviewed by a physician.
Formula and medical content are based on the references listed on this page. See sources, About, and Sources and Review Process.
About
This page calculates only signed urine sodium + potassium − chloride from one urine specimen, reported in mmol/L or mEq/L. Because all three ions are monovalent, their numeric concentrations are the same in those unit systems. It displays the signed difference and the three submitted values for audit; UAG is not direct urine ammonium, net acid excretion, or an RTA test.[1, 3, 8]
The 1986 and 1988 studies observed a UAG–ammonium relationship in selected normal-gap or hyperchloremic metabolic-acidosis cohorts. In 1988, diarrhea and NH₄Cl-loaded control groups generally had negative UAGs while altered distal-acidification groups had positive values. Those observations support a rough initial research context, not a universal sign-based diagnostic table.[1, 3]
Later CKD data and reviews identify major limitations from steady-state diet, nonsteady losses, CKD, low urine sodium, nonchloride anions, and specimen conditions. Direct urine ammonium is more direct when available. This page does not diagnose RTA, diarrhea, or another cause, calculate UOG, or generate treatment.[5, 6, 7, 8]
Formula
Interpretation
| Quantity | What it represents | Calculated here |
|---|---|---|
| Urine sodium | Sodium concentration in one urine specimen | Input |
| Urine potassium | Potassium concentration in the same specimen | Input |
| Urine chloride | Chloride concentration in the same specimen | Input |
| Signed UAG | Na + K − Cl concentration difference | Yes |
| Direct urine ammonium | Laboratory NH₄⁺ concentration or excretion | No |
| Urine osmolal gap | Measured-minus-calculated osmolality surrogate | No |
| Urine pH | Hydrogen-ion activity in urine | No |
| Serum acid-base state | Confirmation and type of metabolic acidosis | No |
| RTA, diarrhea, CKD or another cause | Etiologic clinical assessment | No |
| Alkali, potassium, fluid or other treatment | Individual management | No |
Positive, negative, and zero are signed arithmetic—not clinical categories. UAG is not a urine ammonium level, and identical UAGs can arise from different absolute electrolytes. Without serum acid-base context, the historical acidotic cohorts do not apply automatically. No diagnosis, cause, or treatment is generated.
What this calculator computes
- Read one reporting unit for a single urine specimen.
- Read sodium, potassium, and chloride from that specimen.
- Add sodium and potassium.
- Subtract chloride and retain the raw signed result.
- Apply the one-decimal display contract only at the end.
It does not read serum electrolytes or bicarbonate, a serum anion gap, blood gas, urine pH, measured urine osmolality, urine ammonium, urine volume, a 24-hour collection, kidney function, symptoms, history, diagnosis, or treatment information.
Why all three values must come from one specimen
The equation describes the charge difference in one urine sample. Mixing different voids, dates, time points, or unit systems creates a number that represented no single specimen. Editing an electrolyte or changing the unit clears the same-specimen confirmation and stale result as a software safety measure.[3, 8]
Sign, precision, and the frozen display contract
Raw UAG may be positive, zero, or negative. The formatter shows one decimal; a nonzero raw magnitude below 0.05 can therefore display as 0.0 while the audit retains the original number. A displayed zero is not a normal range, clinical category, or proof that no physiologic difference exists.
Original Goldstein 1986 model
In normal-plasma-anion-gap metabolic acidosis, the original 24-hour data reported urine ammonium = −0.8 × UAG + 82 with r = 0.97. That historical relationship motivated use of UAG as an indirect index; it is not this calculator's conversion equation, and this page never outputs an estimated NH₄⁺ value.[1]
Batlle 1988 selected clinical context
The study included 38 patients with altered distal urinary acidification, 8 patients with diarrhea, and 7 healthy participants given NH₄Cl. Mean UAG was about −27 ± 9.8 mmol/L in the loaded healthy group and −20 ± 5.7 mmol/L in the diarrhea group, while each altered-acidification group had a positive mean. The authors called UAG a rough initial index in hyperchloremic metabolic acidosis—not a universal classifier for an arbitrary urine sample.[3]
Why the original sign rule is not universal
The historical observations came from selected acidotic cohorts, whereas this form does not confirm any serum acid-base state. A positive result does not automatically establish RTA, a negative result does not establish diarrhea, and zero is not an intermediate diagnosis. No green, yellow, red, positive-disease, or negative-disease label is generated.
Modern disagreement about the UAG model
Uribarri and Oh argued in 2021 that steady-state UAG principally reflects sodium, potassium, and chloride intake and output, with selective losses and nonsteady state disrupting that balance; they disputed a general ammonium relationship. That critical analysis does not mean every expert abandoned UAG. A 2023 review retains it only as a rough initial bedside marker in selected metabolic-acidosis evaluation while favoring direct ammonium for precision.[6, 8]
Direct urine ammonium versus UAG
Direct urine NH₄⁺ is a separate laboratory measurement. UAG contains only sodium, potassium, and chloride. The 2022 review supports broader direct ammonium availability, and the 2023 review likewise favors direct measurement when a precise assessment is needed. This page does not reverse-engineer a fictional ammonium concentration from its result.[7, 8]
Low urine sodium and distal sodium delivery
Sodium avidity and low distal sodium delivery can limit acidification interpretation. When urine sodium is below approximately 20 mmol/L, using UAG to infer NH₄⁺ is often considered unreliable. This is static evidence context—not an input threshold or automatic warning—and this calculator never diagnoses volume depletion or RTA from sodium.[2, 4]
Bicarbonaturia and high urine pH
Bicarbonate is an unmeasured urine anion in Na + K − Cl. Bicarbonaturia or urine pH above about 6.5 can distort the expected UAG–ammonium relationship, and high urine pH alone cannot diagnose distal RTA. This form has no urine-pH or bicarbonate input.[4]
Nonchloride ammonium salts
NH₄⁺ need not be excreted only with chloride. Ketoacids, hippurate, D-lactate, salicylate-related anions, and other unmeasured anions can prevent the expected negative UAG even when ammonium excretion rises. The page does not automatically interpret diabetic ketoacidosis, toluene exposure, D-lactic acidosis, or salicylate-related states.[4, 6]
Polyuria, diet, and nonsteady state
CKD evidence
Raphael 2018 studied 1,044 AASK participants. Standard UAG had a weak direct correlation with measured urine ammonium (r = 0.18). Low directly measured ammonium was associated with ESRD or death, but standard-UAG tertiles did not reproduce that relationship. The authors judged standard UAG a poor CKD surrogate and preferred direct ammonium; this CKD result must not be mechanically extended to every acute acid-base setting.[5]
UAG versus urine osmolal gap
The urine osmolal gap uses measured minus calculated urine osmolality and can provide different indirect information when ammonium accompanies a nonchloride anion. Kim 1996 and later reviews found useful correlations in selected chronic-acidosis cohorts, but UOG remains an estimate affected by other unmeasured osmoles. This page lacks measured urine osmolality, urea, and glucose and therefore cannot calculate UOG.[4, 8, 9]
Worked examples from the frozen implementation
Negative vector
25 + 20 − 60 = −15 raw; display −15.0.
Implementation, unit, sign, and display audit only—not direct ammonium, an RTA or diarrhea diagnosis, another cause label, or treatment instruction.
True zero
25 + 20 − 45 = 0 raw; display 0.0.
Implementation, unit, sign, and display audit only—not direct ammonium, an RTA or diarrhea diagnosis, another cause label, or treatment instruction.
Positive vector
25 + 20 − 30 = +15 raw; display +15.0.
Implementation, unit, sign, and display audit only—not direct ammonium, an RTA or diarrhea diagnosis, another cause label, or treatment instruction.
Unit equivalence
25/20/60 has the same numeric −15 result in mmol/L and mEq/L; only the unit label changes.
Implementation, unit, sign, and display audit only—not direct ammonium, an RTA or diarrhea diagnosis, another cause label, or treatment instruction.
Near-zero rounding
0 + 0 − 0.01 = −0.01 raw; the frozen one-decimal display is 0.0.
Implementation, unit, sign, and display audit only—not direct ammonium, an RTA or diarrhea diagnosis, another cause label, or treatment instruction.
When the result may be unreliable and what it cannot determine
Reliability may be reduced when inputs are not from one specimen, the unit is wrong, normal-gap/hyperchloremic metabolic acidosis has not been established, urine sodium is low, polyuria or nonsteady state is present, bicarbonaturia or high urine pH exists, ammonium accompanies ketoacid, hippurate, D-lactate or another nonchloride anion, CKD is present, diet or electrolyte intake changes, fluids or diuretics precede sampling, collection or assay error occurs, or the sign is considered without the absolute electrolytes.
It cannot determine direct urine NH₄⁺, net acid excretion, UOG, the presence or type of metabolic acidosis, distal/proximal/type 4 RTA, diarrhea or GI bicarbonate loss, CKD cause or severity, or any alkali, potassium, fluid, medicine, dialysis, referral, or other treatment decision.
References
- Goldstein MB, Bear R, Richardson RM, Marsden PA, Halperin ML. The urine anion gap: a clinically useful index of ammonium excretion. Am J Med Sci. 1986;292(4):198–202. PMID 3752165. DOI 10.1097/00000441-198610000-00003.
- Batlle DC, von Riotte A, Schlueter W. Urinary sodium in the evaluation of hyperchloremic metabolic acidosis. N Engl J Med. 1987;316(3):140–144. PMID 3796685. DOI 10.1056/NEJM198701153160305. A journal correction is recorded for this article; this page uses only its distal-sodium-delivery and low-urine-sodium interpretation boundary.
- 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(10):594–599. DOI 10.1056/NEJM198803103181002.
- Berend K. Review of the Diagnostic Evaluation of Normal Anion Gap Metabolic Acidosis. Kidney Dis (Basel). 2017;3(4):149–159. PMID 29344509. PMCID PMC5757610. DOI 10.1159/000479279.
- Raphael KL, Gilligan S, Ix JH. Urine Anion Gap to Predict Urine Ammonium and Related Outcomes in Kidney Disease. Clin J Am Soc Nephrol. 2018;13(2):205–212. PMID 29097482. PMCID PMC5967420. DOI 10.2215/CJN.03770417.
- Uribarri J, Oh MS. The Urine Anion Gap: Common Misconceptions. J Am Soc Nephrol. 2021;32(5):1025–1028. PMID 33769949. PMCID PMC8259693. DOI 10.1681/ASN.2020101509.
- 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. PMID 35810828. DOI 10.1053/j.ajkd.2022.05.009.
- Rehman MZ, Melamed M, Harris A, Shankar M, Rosa RM, Batlle D. Urinary Ammonium in Clinical Medicine: Direct Measurement and the Urine Anion Gap as a Surrogate Marker During Metabolic Acidosis. Adv Kidney Dis Health. 2023;30(2):197–206. PMID 36868734. DOI 10.1053/j.akdh.2022.12.006.
- Kim GH, Han JS, Kim YS, et al. Evaluation of urine acidification by urine anion gap and urine osmolal gap in chronic metabolic acidosis. Am J Kidney Dis. 1996;27(1):42–47. PMID 8546137. DOI 10.1016/S0272-6386(96)90029-3.
FAQ
No. The original sign observations came from selected hyperchloremic metabolic-acidosis cohorts. Serum acid-base data, urine pH, kidney function, urine sodium, unmeasured ions and direct ammonium may be relevant, and a positive result alone does not establish distal, proximal or type 4 RTA.
Chloride exceeds sodium plus potassium in the submitted arithmetic. Historical acidotic cohorts associated a negative UAG with increased chloride accompanying ammonium, but nonchloride anions and other conditions break that relationship. This page does not label a negative result as diarrhea or adequate ammonium.
Related Calculators
Anion Gap
Calculate serum anion gap from sodium, chloride, and bicarbonate or total CO₂ using the standard formula without potassium.
Adjusted AG
Calculate a signed sodium-only Figge 2.5 albumin-adjusted anion gap from same-specimen or paired chemistry and albumin in g/dL or g/L, with no universal interval, diagnosis, delta ratio, or treatment output.
Serum Osmolality
Calculate serum osmolality and effective osmolality (tonicity), with optional measured osmolality, osmolal gap, and separate ethanol assumptions; no toxic-alcohol or HHS diagnosis.
Disclaimer
Educational and informational reference only. Not intended to replace professional medical advice, diagnosis, treatment, or independent verification.