Acid-Base Calculator

Anion Gap Calculator

Evaluate metabolic acidosis using sodium, chloride, and bicarbonate values.

Medically Reviewed by Dr. Rizwan Khalil (Chairman & Medical Specialist) — Last updated August 2026

Anion Gap Calculator

Enter electrolytes to assess AG

mEq/L
mEq/L
mEq/L
g/dL

Enter values to calculate...

Reference Ranges

< 8 mEq/L
Low
8 - 12 mEq/L
Normal
> 12 mEq/L
Elevated (Consider MUDPILES)

Understanding the Anion Gap

The anion gap (AG) is a value calculated using the results of a basic metabolic panel (BMP). It represents the difference between primary measured cations (positively charged ions, primarily sodium) and primary measured anions (negatively charged ions, primarily chloride and bicarbonate) in the blood. A normal anion gap is typically between 8 and 12 mEq/L, although laboratory reference ranges may vary.

Calculating the anion gap is particularly useful in the clinical evaluation of acid-base disorders, especially metabolic acidosis. When a patient presents with metabolic acidosis, determining whether the anion gap is normal or elevated is a critical first step in identifying the underlying cause. Elevated anion gap metabolic acidosis indicates the presence of unmeasured anions in the blood, which can occur in conditions such as diabetic ketoacidosis, lactic acidosis, uremia, or toxic ingestions.

The Formula

The standard formula for calculating the anion gap is:

AG = Na⁺ − (Cl⁻ + HCO₃⁻)

Where:

Corrected Anion Gap for Hypoalbuminemia

Albumin is the major unmeasured anion in normal serum. Therefore, in patients with low serum albumin levels (hypoalbuminemia), the baseline anion gap is lower than expected. This can mask a clinically significant elevation in the unmeasured anions if the standard formula is used without adjustment.

To account for this, the anion gap can be corrected using the following formula:

Corrected AG = AG + 2.5 × (4.0 − Patient's Albumin [g/dL])

Elevated Anion Gap Metabolic Acidosis (MUDPILES)

An elevated anion gap (typically >12 mEq/L) suggests an accumulation of unmeasured acids. The classic mnemonic used to remember the causes of elevated anion gap metabolic acidosis is MUDPILES:

Normal Anion Gap Metabolic Acidosis (HARDUP)

If metabolic acidosis is present but the anion gap is normal, it is termed normal anion gap (or hyperchloremic) metabolic acidosis. Causes can be remembered with the HARDUP mnemonic:

When to Consult a Doctor

Acid-base disorders can be complex and are often a sign of a serious underlying medical condition. The interpretation of the anion gap should always be performed by a qualified healthcare professional in the context of the patient's complete clinical picture, including a thorough medical history, physical examination, and other laboratory tests.

Frequently Asked Questions

1. What is a normal anion gap?
2. Why is potassium not included in the standard formula?
3. What does a low anion gap indicate?
4. Why correct the anion gap for albumin?
5. Can I use the anion gap to diagnose my condition?

Medical Disclaimer: This calculator is for informational and educational purposes only. It is not intended as a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider. Read full disclaimer →