Skip to content
Omnikalc

Urine anion gap calculator

Use urine electrolytes to estimate ammonium excretion in a normal anion gap metabolic acidosis: the urine anion gap, the urine osmolal gap and the estimated urine ammonium.

Updated on
Your inputs
mmol/L

Value out of range

mmol/L

Value out of range

mmol/L

Value out of range

mOsm/kg

Value out of range

mg/dL

Value out of range

mg/dL

Value out of range

Results

Urine anion gap

-20 mmol/L

Negative: ammonium excretion is high, pointing to a non-renal cause such as diarrhea

Urine osmolal gap

146 mOsm/kg

100 or more: adequate ammonium excretion
Estimated urine ammonium (osmolal gap ÷ 2)
73 mmol/L
Calculated urine osmolality
354 mOsm/kg

This calculator is for general information and education. It is not medical advice and does not replace the judgment of a doctor, nurse or pharmacist who knows the full clinical picture.

Why look at urine electrolytes?

In a normal anion gap (hyperchloremic) metabolic acidosis, the two main causes are bicarbonate loss from the gut, as in diarrhea, and a failure of the kidney to excrete acid, as in renal tubular acidosis (RTA). The kidney excretes acid mainly as ammonium (NH4+), which is rarely measured directly. The urine anion gap and the urine osmolal gap estimate it.

The urine anion gap

Urine anion gap = urine Na + urine K − urine Cl

Ammonium is excreted with chloride. When the kidney excretes a lot of ammonium, chloride exceeds sodium plus potassium and the gap becomes negative.

  • Negative gap (often −20 to −50): high ammonium excretion, an appropriate renal response. Points to a non-renal cause, mostly diarrhea.
  • Positive gap: low ammonium excretion despite acidosis. Points to distal (type 1) RTA, type 4 RTA (hypoaldosteronism) or kidney failure.

The urine osmolal gap

The urine anion gap fails when other anions are excreted (ketones, hippurate from toluene, drugs) or when urine sodium is very low. The urine osmolal gap is more robust:

Osmolal gap = measured urine osmolality − (2 × (Na + K) + urea + glucose), all in mmol/L

Estimated urine ammonium ≈ osmolal gap ÷ 2. A gap of 100 mOsm/kg or more means adequate ammonium excretion; under 40 suggests impaired excretion. Urea nitrogen in mg/dL is divided by 2.8 and glucose in mg/dL by 18 to convert to mmol/L.

Example

Urine sodium 40, potassium 30 and chloride 90 mmol/L give a urine anion gap of −20, a negative value. With a urine osmolality of 500 mOsm/kg and a urea nitrogen of 600 mg/dL (214 mmol/L), the calculated osmolality is 354 and the osmolal gap 146, so the estimated ammonium is 73 mmol/L: the kidney is responding well, consistent with diarrhea.

Pitfalls

  • Only valid in a normal anion gap acidosis.
  • Urine must be collected before large volumes of saline or bicarbonate are given.
  • Volume depletion with urine sodium under about 20 mmol/L makes the anion gap unreliable.

The result guides further tests, such as urine pH, potassium and aldosterone, and is interpreted by the treating team.

Frequently asked questions

What does a negative urine anion gap mean?

It means the kidneys are excreting plenty of ammonium, which is the appropriate response to acidosis. In a normal anion gap acidosis it points to a non-renal cause, such as diarrhea.

What does a positive urine anion gap mean?

It suggests low ammonium excretion, as in distal renal tubular acidosis, type 4 renal tubular acidosis or kidney failure.

When is the urine anion gap unreliable?

When other anions are excreted, such as ketones in ketoacidosis or hippurate after toluene exposure, and when urine sodium is very low. The urine osmolal gap is more reliable then.

How do I convert urine urea nitrogen to mmol/L?

Divide urea nitrogen in mg/dL by 2.8. For example, 600 mg/dL is about 214 mmol/L.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.