Clinical Electrolyte Analysis · Updated September 2026

Anion Gap Calculator

Calculate serum anion gap with the standard clinical formula, automatic Figge albumin correction, optional potassium inclusion, and delta ratio analysis for mixed acid-base disorders.

Clinical Formula: Anion Gap = Na⁺ − (Cl⁻ + HCO₃⁻). Standard baseline normal range: 8–12 mEq/L (or 4–12 mEq/L on modern ion-selective electrode analyzers). Albumin correction adds 2.5 mEq/L for every 1.0 g/dL drop in serum albumin below 4.0 g/dL.
Na⁺
Major Cation
AG
Calculated Gap
Cl⁻+HCO₃⁻
Measured Anions

Clinical decision support tool intended for healthcare professionals and medical education. It does not establish a diagnosis of diabetic ketoacidosis, lactic acidosis, toxic ingestion, or renal tubular acidosis independently. Always correlate with clinical presentation, arterial blood gases (ABG), serum lactate, ketones, and the reporting laboratory's reference range.

Serum Electrolyte Panel

Enter Lab Values

Calculated locally
Required Serum Electrolytes
Add albumin, potassium or lab limit Optional

Use all electrolyte values from the same serum blood draw. For monovalent ions, numerical values in mEq/L and mmol/L are identical.

Try an example:

What Is the Serum Anion Gap?

The serum anion gap (AG) is an artificial mathematical construct derived from routine serum electrolytes that reflects the balance between measured cations and measured anions in extracellular fluid. Under the fundamental chemical Law of Electroneutrality, the total concentration of positively charged ions (cations) in plasma must exactly equal the total concentration of negatively charged ions (anions):

Total Cations = Total Anions

In standard laboratory chemistry, routine testing measures only the predominant circulating ions: Sodium (Na⁺) as the primary cation, and Chloride (Cl⁻) plus Bicarbonate (HCO₃⁻) as the primary anions. Unmeasured cations include potassium (K⁺), calcium (Ca²⁺), magnesium (Mg²⁺), and cationic globulins. Unmeasured anions include circulating albumin, phosphate (HPO₄²⁻), sulfate (SO₄²⁻), and organic acid anions (lactate, acetoacetate, beta-hydroxybutyrate, formate, and salicylate).

Because the concentration of unmeasured anions normally exceeds the concentration of unmeasured cations, subtracting measured anions from measured cations leaves an apparent "gap":

Anion Gap = Unmeasured Anions − Unmeasured Cations = Na⁺ − (Cl⁻ + HCO₃⁻)

Under normal physiologic conditions, this gap represents primarily the negative charges carried by serum proteins (chiefly albumin). When pathological organic acids accumulate during metabolic crises—such as diabetic ketoacidosis (DKA), tissue hypoperfusion with lactic acidosis, or toxic alcohol ingestions—unmeasured acid anions consume serum bicarbonate buffer, widening the anion gap.

Analyzer Specifics Matter: Modern automated laboratory analyzers utilizing ion-selective electrode (ISE) potentiometry report lower normal anion gap ranges (typically 4 to 12 mEq/L) than older flame-photometric assays (which established the historical 8 to 16 mEq/L range). Always interpret calculated results against the specific reference interval printed by your reporting hospital laboratory.

Anion Gap Calculation Formula & Step-by-Step Math

The standard serum anion gap calculation excludes potassium because potassium's narrow extracellular concentration (3.5 to 5.0 mEq/L) rarely alters clinical interpretation:

Serum Anion Gap, Albumin Correction, and Delta Ratio Clinical Infographic
Figure 1: Serum anion gap mechanics, Figge albumin correction formula, and delta ratio diagnostic interpretation spectrum.
AG = Na⁺ − (Cl⁻ + HCO₃⁻)

Where all ion concentrations are entered in milliequivalents per liter (mEq/L) or millimoles per liter (mmol/L). When reviewing a standard Basic Metabolic Panel (BMP) or Comprehensive Metabolic Panel (CMP), total serum CO₂ is routinely used as the surrogate for bicarbonate (HCO₃⁻).

Step-by-Step Math Example: Na⁺ 140 mEq/L, Cl⁻ 104 mEq/L, HCO₃⁻ 24 mEq/L
  1. 1

    Sum the measured anions: 104 + 24 = 128 mEq/L

  2. 2

    Subtract the measured anion sum from serum sodium: 140 − 128 = 12 mEq/L

  3. 3

    Compare against laboratory reference interval: AG = 12 mEq/L (Normal baseline physiological gap)

When assessing patients presenting with severe volume contraction or electrolyte derangements, clinicians frequently evaluate acid-base status alongside kidney function via the BUN to Creatinine Ratio Calculator and calculate fluid replacement needs using the Maintenance Fluid Calculator.

Albumin-Corrected Anion Gap (Figge-Jabor-Kazda-Fencl Formula)

Albumin is a circulating polyanion that contributes roughly 75% to 80% of the normal unmeasured anion pool. At physiological blood pH (7.40), each gram per deciliter (g/dL) of serum albumin carries approximately 2.3 to 2.8 mEq/L of negative electrical charge. Consequently, when a patient develops significant hypoalbuminemia—frequent in critical illness, sepsis, hepatic cirrhosis, nephrotic syndrome, and malnutrition—the baseline physiological anion gap decreases dramatically.

In critically ill patients with severe hypoalbuminemia, an apparently "normal" measured anion gap of 11 or 12 mEq/L may conceal dangerous lactic acidosis or ketoacidosis. To reveal hidden unmeasured anions, clinicians apply the validated Figge-Jabor-Kazda-Fencl correction formula:

Corrected AG = Measured AG + 2.5 × (4.0 − Serum Albumin in g/dL)

For example, consider an ICU patient with a measured anion gap of 12 mEq/L and a serum albumin of 1.6 g/dL:

Worked Albumin Correction Example: Measured AG 12 mEq/L, Albumin 1.6 g/dL
  1. 1

    Determine the albumin deficit: 4.0 − 1.6 = 2.4 g/dL deficit

  2. 2

    Calculate the masked anion charge: 2.5 × 2.4 = 6.0 mEq/L

  3. 3

    Add the masked charge to measured AG: 12 + 6.0 = 18.0 mEq/L

While the uncorrected gap appeared benign (12 mEq/L), the corrected anion gap of 18 mEq/L reveals significant underlying high anion gap metabolic acidosis requiring aggressive diagnostic investigation. Because albumin similarly impacts total calcium measurements, patients undergoing nutritional and metabolic evaluations should also be checked with the Corrected Calcium Calculator.

Delta Gap and Delta Ratio (ΔAG / ΔHCO₃)

When a patient has an elevated anion gap metabolic acidosis, the delta ratio (or delta-delta) compares the magnitude of the anion gap increase above normal baseline against the magnitude of the bicarbonate deficit below normal baseline. This ratio allows clinicians to detect complex, mixed acid-base disorders where two or more metabolic derangements coexist simultaneously.

Delta Ratio = ΔAG ÷ ΔHCO₃ = (AG − 12) ÷ (24 − HCO₃⁻)

Where 12 mEq/L represents the standard normal upper limit of the anion gap and 24 mEq/L represents normal baseline serum bicarbonate. If albumin correction was calculated, the corrected AG is substituted into the equation.

Delta Ratio Diagnostic Interpretation Underlying Pathophysiology Classic Clinical Examples
< 0.4 Pure Normal Anion Gap Metabolic Acidosis (NAGMA) HCO₃⁻ is lost directly from the body or displaced by Cl⁻ without unmeasured organic acid accumulation. Severe diarrhea, renal tubular acidosis (RTA), saline over-resuscitation.
0.4 – 0.8 Mixed HAGMA and NAGMA Unmeasured anions have accumulated, but the bicarbonate fall is disproportionately greater than the AG rise due to concurrent bicarbonate loss. Diabetic ketoacidosis treated with large volumes of 0.9% normal saline, or DKA with severe concurrent diarrhea.
1.0 – 1.6 Pure High Anion Gap Metabolic Acidosis (HAGMA) One-to-one stoichiometric titration: each milliequivalent of generated organic acid (e.g., lactate or ketoacids) consumes exactly one milliequivalent of bicarbonate buffer. Uncomplicated DKA, pure lactic acidosis (type A or B), toxic alcohol ingestion.
> 2.0 Mixed HAGMA and Metabolic Alkalosis (or Pre-existing Respiratory Acidosis) The bicarbonate level is unexpectedly higher than predicted for the magnitude of the anion gap increase, indicating a concurrent alkalotic process generating excess bicarbonate. DKA or lactic acidosis complicated by persistent vomiting (gastric HCl loss), nasogastric suctioning, diuretic use, or chronic COPD with baseline compensatory hyperbicarbonatemia.

For patients with suspected complex mixed disorders requiring simultaneous evaluation of ventilatory drive and arterial oxygenation, correlate these calculations with the ABG Calculator.

Differential Diagnosis: High Anion Gap vs. Normal Anion Gap

Classifying metabolic acidosis into high anion gap versus normal anion gap (hyperchloremic) categories narrows the differential diagnosis to specific pathophysiological mechanisms:

Elevated Anion Gap

HAGMA Etiologies (GOLDMARK)

Driven by accumulation of exogenous toxins or endogenous unmeasured organic acids:

  • G – Glycols (Ethylene glycol, propylene glycol)
  • O – Oxoproline (Pyroglutamic acid from chronic acetaminophen)
  • L – L-lactate (Sepsis, cardiogenic shock, mesenteric ischemia)
  • D – D-lactate (Short bowel syndrome, bacterial overgrowth)
  • M – Methanol (Formic acid toxicity, optic disc edema)
  • A – Aspirin / Salicylates (Mixed respiratory alkalosis & HAGMA)
  • R – Renal failure (Uremic retention of sulfates, phosphates, urate)
  • K – Ketoacidosis (Diabetic DKA, alcoholic AKA, starvation)
Normal Anion Gap

NAGMA Etiologies (HARDUP)

Driven by gastrointestinal or renal loss of bicarbonate with reciprocal hyperchloremia:

  • H – Hyperalimentation / Hyperchloremic saline infusion
  • A – Acetazolamide / Carbonic anhydrase inhibitors
  • R – Renal tubular acidosis (Distal Type 1, Proximal Type 2, Hypoaldosterone Type 4)
  • D – Diarrhea (Massive loss of intestinal bicarbonate)
  • U – Uretero-sigmoidostomy / Urinary diversions
  • P – Pancreatic fistulas or biliary drainage

When differentiating renal tubular acidosis from extra-renal bicarbonate loss in normal anion gap acidosis, clinicians calculate the urine anion gap (UAG) and assess tubular function alongside renal clearance indices using the FENa Calculator and FEUrea Calculator.

Real-World Clinical Case Scenarios

Case 1: Severe Diabetic Ketoacidosis Masked by Hypoalbuminemia

Patient: 22-year-old female with Type 1 Diabetes Mellitus, severe dehydration, tachypnea (Kussmaul breathing), and marked cachexia due to chronic malnutrition.

Admission Serum Panel: Sodium (Na⁺) = 134 mEq/L, Chloride (Cl⁻) = 96 mEq/L, Bicarbonate (HCO₃⁻) = 8 mEq/L, Albumin = 2.0 g/dL, Glucose = 480 mg/dL.

Diagnostic Calculation & Clinical Analysis
  1. 1

    Standard Anion Gap: 134 − (96 + 8) = 30 mEq/L (Elevated above normal upper limit of 12).

  2. 2

    Figge Albumin Correction: Albumin deficit is 4.0 − 2.0 = 2.0 g/dL. Correction factor = 2.5 × 2.0 = +5.0 mEq/L.
    Corrected AG = 30 + 5.0 = 35.0 mEq/L. The patient's actual accumulation of circulating ketoacids is substantially more severe than suggested by the uncorrected gap.

  3. 3

    Delta Ratio: ΔAG = 35 − 12 = 23; ΔHCO₃ = 24 − 8 = 16.
    Delta Ratio = 23 ÷ 16 = 1.44.

  4. 4

    Clinical Decision: A delta ratio of 1.44 falls squarely in the 1.0 to 1.6 range, confirming a pure, uncomplicated high anion gap metabolic acidosis from severe diabetic ketoacidosis. Because significant hyperglycemia causes osmotic fluid shifts that pseudolower measured sodium, the team cross-checked true sodium with the Corrected Sodium Calculator and monitored acid-base recovery with the ABG Calculator.

Case 2: Septic Shock with Intractable Vomiting (Mixed HAGMA & Metabolic Alkalosis)

Patient: 64-year-old male presenting with intra-abdominal sepsis secondary to perforated appendicitis, complicated by 3 days of intractable emesis and severe lethargy.

Admission Serum Panel: Sodium (Na⁺) = 142 mEq/L, Chloride (Cl⁻) = 88 mEq/L, Bicarbonate (HCO₃⁻) = 28 mEq/L, Albumin = 4.0 g/dL, Serum Lactate = 6.8 mmol/L.

Diagnostic Calculation & Clinical Analysis
  1. 1

    Standard Anion Gap: 142 − (88 + 28) = 26 mEq/L (Markedly elevated, indicating severe accumulation of unmeasured organic anions).

  2. 2

    The Clinical Dilemma: Despite profound lactic acidosis (lactate 6.8 mmol/L), the patient's serum bicarbonate is paradoxically elevated at 28 mEq/L (normal 22–26 mEq/L). If looking only at bicarbonate, an inexperienced clinician might overlook severe metabolic acidosis.

  3. 3

    Delta Ratio Analysis: ΔAG = 26 − 12 = +14 mEq/L. Expected bicarbonate = 24 − ΔAG = 24 − 14 = 10 mEq/L. However, actual measured bicarbonate is 28 mEq/L.
    Delta Ratio = ΔAG ÷ ΔHCO₃ = 14 ÷ (24 − 28) = 14 ÷ (−4) = −3.5 (or > 2.0 spectrum).

  4. 4

    Clinical Decision: The delta gap reveals a hidden, severe concomitant metabolic alkalosis caused by massive hydrochloric acid (HCl) gastric loss from vomiting, superimposed upon severe lactic acidosis from septic shock. Hemodynamic resuscitation was guided by the Mean Arterial Pressure Calculator and renal perfusion was monitored via the Urine Output Calculator.

Anion Gap With Potassium: When and Why Is It Used?

Although potassium is excluded from the standard equation in the majority of United States and European medical centers, select clinical laboratories and international protocols include it:

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

Because extracellular potassium typically ranges from 3.5 to 5.0 mEq/L, including potassium increases the numerical result by approximately 4 mEq/L. Crucially, the reference interval must also be adjusted upward (typical potassium-inclusive normal range: 12 to 16 mEq/L, or 10 to 20 mEq/L depending on analyzer methodology).

Never compare a potassium-inclusive anion gap against a potassium-free reference interval of 8 to 12 mEq/L, as doing so leads to false-positive over-diagnoses of high anion gap acidosis. Our calculator displays both values side-by-side whenever potassium is entered.

Causes of a Low or Negative Anion Gap (< 3 mEq/L)

An anion gap falling below 3 mEq/L (or becoming negative) is a rare laboratory finding that immediately warrants clinical investigation. Common causes include:

  • Severe Hypoalbuminemia: The most common clinical etiology. Each 1.0 g/dL decline in albumin reduces the anion gap by ~2.5 mEq/L. A patient with cirrhosis and an albumin of 1.2 g/dL will exhibit a baseline physiological gap of only 4 to 5 mEq/L.
  • Laboratory Measurement Artifacts: Severe hypernatremia, severe hyperchloremia, or sample hemolysis causing analytical inaccuracies.
  • Unmeasured Circulating Cations: Accumulation of cationic paraproteins (predominantly IgG monoclonal gammopathy in multiple myeloma), extreme hypercalcemia, severe hypermagnesemia, or lithium intoxication.
  • Halide Ingestions (Bromide / Iodide Toxicity): Ion-selective chloride electrodes cannot distinguish bromide or iodide from chloride, falsely registering huge chloride spikes and producing falsely negative anion gaps (e.g., −5 to −15 mEq/L).

When assessing patients with monoclonal gammopathies, acute kidney failure, or complex fluid shifts, clinicians routinely estimate glomerular filtration via the GFR Calculator alongside total electrolyte analyses.

Clinical Takeaways & Practice Essentials
  • Standard Anion Gap: Na⁺ − (Cl⁻ + HCO₃⁻). Historical normal baseline is 8–12 mEq/L, but modern ISE analyzers often report 4–12 mEq/L. Always compare with your hospital's specific lab range.
  • Figge Albumin Correction: Corrected AG = Measured AG + 2.5 × (4.0 − Albumin in g/dL). Always calculate in critically ill or malnourished patients to prevent missing occult HAGMA.
  • Delta Ratio Diagnostic Matrix: < 0.4 indicates pure NAGMA; 0.4–0.8 indicates mixed HAGMA + NAGMA; 1.0–1.6 indicates pure HAGMA; and > 2.0 indicates mixed HAGMA + metabolic alkalosis.
  • Etiology Mnemonics: Use GOLDMARK (Glycols, Oxoproline, L-lactate, D-lactate, Methanol, Aspirin, Renal failure, Ketoacidosis) for elevated gap, and HARDUP for normal gap acidosis.
  • Low Gap Warning: A gap < 3 mEq/L is most commonly severe hypoalbuminemia, but rule out multiple myeloma (IgG paraproteins), lithium toxicity, and bromide interference.

Frequently Asked Questions (PAA)

How do you calculate anion gap?

Use serum values from the same blood draw: Anion Gap = Sodium − (Chloride + Bicarbonate). Potassium is usually omitted because its extracellular concentration is small. Compare the calculated value with the specific reference range provided by the analyzing laboratory (traditionally 8 to 12 mEq/L, or 4 to 12 mEq/L on modern ion-selective electrode analyzers).

Can CO2 or total CO2 be used to calculate anion gap?

Yes. On a standard Basic Metabolic Panel (BMP) or Comprehensive Metabolic Panel (CMP), "CO2" represents total serum carbon dioxide, of which over 95% is dissolved bicarbonate (HCO3-). Laboratories routinely use total CO2 as the bicarbonate term in the anion gap equation. However, arterial blood gas (ABG) bicarbonate is calculated differently and should not be mixed with venous chemistry panels.

What is the albumin-corrected anion gap formula?

The Figge-Jabor-Kazda-Fencl formula corrects for hypoalbuminemia: Corrected AG = Measured AG + 2.5 × (4.0 − Serum Albumin in g/dL). Because albumin is the primary unmeasured circulating anion carrying negative charge, each 1.0 g/dL reduction in albumin artificially lowers the measured anion gap by 2.5 mEq/L, potentially masking severe high anion gap metabolic acidosis.

What is the delta ratio and how is it interpreted?

The delta ratio (Delta AG / Delta HCO3) compares the increase in unmeasured anions above normal with the decline in serum bicarbonate: Delta Ratio = (AG − 12) ÷ (24 − HCO3-). A ratio < 0.4 indicates pure normal anion gap acidosis (NAGMA); 0.4 to 0.8 indicates mixed high AG and normal AG acidosis; 1.0 to 1.6 indicates pure high anion gap acidosis (HAGMA); and > 2.0 indicates concurrent metabolic alkalosis or pre-existing chronic respiratory acidosis.

Should potassium be included in the anion gap calculation?

Potassium is traditionally excluded from the standard equation because its narrow extracellular range (3.5 to 5.0 mEq/L) rarely alters the clinical pattern. However, if included: AG with K+ = (Sodium + Potassium) − (Chloride + Bicarbonate). When including potassium, the reference interval shifts upward by approximately 4 mEq/L (normal range 12 to 16 mEq/L). Always match the formula to your laboratory's published reference range.

What causes a high anion gap vs a normal anion gap?

High anion gap metabolic acidosis (HAGMA) is caused by the accumulation of unmeasured organic acids, classically remembered by GOLDMARK (Glycols, Oxoproline, L-lactate, D-lactate, Methanol, Aspirin/salicylates, Renal failure/uremia, Ketoacidosis). Normal anion gap metabolic acidosis (NAGMA) occurs with bicarbonate loss or impaired renal acid excretion, remembered by HARDUP (Hyperalimentation, Acetazolamide, Renal tubular acidosis, Diarrhea, Uretero-sigmoidostomy, Pancreatic fistula).

What causes a low or negative anion gap?

A low or negative anion gap (< 3 mEq/L) is most frequently caused by severe hypoalbuminemia (low albumin reduces unmeasured anions) or analytical laboratory error. Less common clinical causes include an accumulation of unmeasured cations such as IgG paraproteins in multiple myeloma, severe hypercalcemia, hypermagnesemia, or toxic bromide/iodide ingestion causing false chloride elevations on ion-selective electrode analyzers.

Evidence & Peer-Reviewed References

  1. Kharsa A, et al. Anion Gap and Non-Anion Gap Metabolic Acidosis. StatPearls. Updated 2025.
  2. Figge J, Jabor A, Kazda A, Fencl V. Anion gap and hypoalbuminemia. Critical Care Medicine. 1998;26(11):1807-1810.
  3. Kraut JA, Madias NE. Serum anion gap: its uses and limitations in clinical medicine. Clinical Journal of the American Society of Nephrology (CJASN). 2007;2(1):162-174.
  4. Haber LA, et al. Evaluating a low anion gap: A practical approach. Cleveland Clinic Journal of Medicine. 2023;90(10):619-626.
  5. Umpierrez GE, et al. Hyperglycemic Crises in Adults With Diabetes: A Consensus Report. Diabetes Care. 2024;47(8):1257-1275.

Clinical formula review completed September 2026. Browser-based execution guarantees patient data privacy under HIPAA compliance. Data entered is processed locally and never transmitted to external servers.

Cardiorenal & Critical Care Editorial Contributor

Dr. Heart verifies clinical calculation integrity, physiological algorithms, and bedside decision rules across HeartScoreCalculator.com. Content is vetted against peer-reviewed nephrology, cardiology, and critical care literature to guarantee analytical fidelity. Editorial profiles are maintained for educational transparency.