We evaluated the use of the urinary anion gap (sodium plus potassium minus chloride) in assessing hyperchloremic metabolic acidosis in 38 patients with altered distal urinary acidification and in 8 patients with diarrhea. In seven normal subjects given ammonium chloride for three days, the anion gap was negative (-27 +/- 9.8 mmol per liter) and the urinary pH under 5.3 (4.9 +/- 0.03). In the eight patients with diarrhea the anion gap was also negative (-20 +/- 5.7 mmol per liter), even though the urinary pH was above 5.3 (5.64 +/- 0.14). In contrast, the anion gap was positive in all patients with altered urinary acidification, who were classified as having classic renal tubular acidosis (23 +/- 4.1 mmol per liter, 11 patients), hyperkalemic distal renal tubular acidosis (30 +/- 4.2, 12 patients), or selective aldosterone deficiency (39 +/- 4.2, 15 patients). When the data on all subjects studied were pooled, a negative correlation was found between the urinary ammonium level and the urinary anion gap. We conclude that the use of the urinary anion gap, as a rough index of urinary ammonium, may be helpful in the initial evaluation of hyperchloremic metabolic acidosis. A negative anion gap suggests gastrointestinal loss of bicarbonate, whereas a positive anion gap suggests the presence of altered distal urinary acidification.