What is the anion gap (electrolyte imbalance) formula?

Medical Advisory BoardAll articles are reviewed for accuracy by our Medical Advisory Board
Educational purpose only • Exercise caution as content is pending human review
Article Review Status
Submitted
Under Review
Approved

Last updated: July 17, 2025View editorial policy

Personalize

Help us tailor your experience

Which best describes you? Your choice helps us use language that's most understandable for you.

Anion Gap Formula

The anion gap (AG) is calculated as Na+ + K - Cl- - HCO3- 1. This is the most comprehensive formula that includes potassium in the calculation.

Standard Formulas and Variations

There are two main variations of the anion gap formula:

  1. With potassium (comprehensive formula):

    • AG = Na+ + K+ - Cl- - HCO3-
  2. Without potassium (simplified formula):

    • AG = Na+ - (Cl- + HCO3-)

When potassium is not included in the calculation, the normal range is typically adjusted downward by approximately 4 mEq/L 1, 2.

Normal Ranges

The normal anion gap varies depending on the formula used:

  • With potassium: 12-16 mEq/L
  • Without potassium: 8-12 mEq/L 3

These ranges may vary slightly between laboratories based on their specific measurement methods.

Clinical Applications

The anion gap calculation is primarily used to:

  1. Categorize metabolic acidosis:

    • High anion gap metabolic acidosis (HAGMA): Caused by accumulation of acids other than HCl
    • Normal anion gap (hyperchloremic) metabolic acidosis: Caused by bicarbonate loss or failure to excrete acid
  2. Detect mixed acid-base disorders using the delta gap:

    • Delta gap = Delta AG - Delta HCO3-
    • Delta AG = Observed AG - Normal AG
    • Delta HCO3- = Normal HCO3- - Observed HCO3-
    • If delta gap > +6: Suggests concurrent metabolic alkalosis
    • If delta gap < -6: Suggests concurrent hyperchloremic acidosis 4
  3. Guide treatment decisions in toxicology:

    • In ethylene glycol poisoning, an anion gap > 27 mmol/L is a strong indication for extracorporeal treatment 1
    • An anion gap of 23-27 mmol/L suggests consideration of extracorporeal treatment in ethylene glycol poisoning 1

Important Considerations

  • Hypoalbuminemia adjustment: Since albumin is a major unmeasured anion, the anion gap should be adjusted in hypoalbuminemia by adding 2.5 mEq/L for every 1 g/dL decrease in albumin below normal 2

  • Potassium inclusion: When reviewing literature or guidelines, always note whether potassium was included in the calculation. If not specified, some experts recommend adding 2-4 mmol/L to standardize results 1

  • Limitations: The anion gap can be affected by:

    • Laboratory measurement errors
    • Severe hyperglycemia
    • Paraproteinemia
    • Lithium or bromide intoxication
    • Severe hypermagnesemia (though evidence for this is limited) 5

Clinical Pitfalls to Avoid

  • Not adjusting for hypoalbuminemia: This can lead to underestimation of the anion gap in critically ill patients
  • Ignoring mixed disorders: A normal anion gap doesn't rule out the presence of a high anion gap acidosis with concurrent metabolic alkalosis
  • Using the wrong reference range: Always confirm the laboratory's specific reference range and whether potassium is included in their calculation
  • Relying solely on the anion gap: The anion gap should be interpreted in conjunction with other laboratory values and clinical findings

The anion gap remains one of the most valuable calculations in evaluating acid-base disorders and guiding critical treatment decisions, particularly in toxicology and critical care settings.

References

Guideline

Guideline Directed Topic Overview

Dr.Oracle Medical Advisory Board & Editors, 2025

Research

Approach to Patients With High Anion Gap Metabolic Acidosis: Core Curriculum 2021.

American journal of kidney diseases : the official journal of the National Kidney Foundation, 2021

Research

The anion gap: its use in quality control.

Clinical chemistry, 1976

Research

Severe hypermagnesemia without reduction in the anion gap.

Magnesium and trace elements, 1990

Professional Medical Disclaimer

This information is intended for healthcare professionals. Any medical decision-making should rely on clinical judgment and independently verified information. The content provided herein does not replace professional discretion and should be considered supplementary to established clinical guidelines. Healthcare providers should verify all information against primary literature and current practice standards before application in patient care. Dr.Oracle assumes no liability for clinical decisions based on this content.

Have a follow-up question?

Our Medical A.I. is used by practicing medical doctors at top research institutions around the world. Ask any follow up question and get world-class guideline-backed answers instantly.