Anion Gap Calculator (with K+ and CO2)


Anion Gap Calculator (using CO2 and K)

This calculator determines the serum anion gap, a critical value in acid-base disorder analysis, using the formula that includes Potassium (K+) and Bicarbonate (as Total CO2). Enter the patient’s lab values below to get the result.



Unit: mEq/L (Normal: 135-145)


Unit: mEq/L (Normal: 3.5-5.0)


Unit: mEq/L (Normal: 96-106)


Unit: mEq/L (Normal: 22-28)


Anion Gap (with K⁺)

18.0 mEq/L

Normal

Total Cations (Na⁺ + K⁺)

144.0 mEq/L

Total Anions (Cl⁻ + HCO₃⁻)

126.0 mEq/L

Formula Used: Anion Gap = (Sodium + Potassium) – (Chloride + Bicarbonate)

Visual representation of measured cations vs. anions.

What is the Anion Gap?

The anion gap is a calculated value derived from a routine lab test known as an electrolyte panel. It represents the difference between the primary measured positively charged ions (cations) and the primary measured negatively charged ions (anions) in the blood. The value is not a “gap” in reality but represents the concentration of unmeasured anions, such as albumin, phosphate, and sulfate. A proper anion gap calculation using co2 and k is fundamental for the differential diagnosis of metabolic acidosis, helping clinicians determine the underlying cause of the acid-base disturbance.

This calculator is intended for healthcare professionals. The calculation helps to narrow down the causes of acidosis into two main categories: those that cause a high anion gap and those that cause a normal anion gap. For a comprehensive metabolic picture, consider using a Osmolal Gap Calculator in cases of suspected toxic alcohol ingestion.

Anion Gap Formula and Explanation

There are two common formulas for the anion gap. This calculator uses the one that includes potassium (K⁺), as specified by the request for an anion gap calculation using co2 and k. Including potassium provides a slightly more complete picture of the measured cations.

The formula is:

Anion Gap = (Na⁺ + K⁺) - (Cl⁻ + HCO₃⁻)

Here, total CO₂ is used as a surrogate for bicarbonate (HCO₃⁻), which is a standard and clinically accepted practice.

Anion Gap Formula Variables
Variable Meaning Unit Typical Range
Na⁺ Sodium mEq/L 135 – 145
K⁺ Potassium mEq/L 3.5 – 5.0
Cl⁻ Chloride mEq/L 96 – 106
HCO₃⁻ (as CO₂) Bicarbonate mEq/L 22 – 28

Practical Examples

Example 1: High Anion Gap (Ketoacidosis)

A patient with uncontrolled diabetes presents with symptoms of dehydration and rapid breathing. Lab results are:

  • Inputs: Na⁺ = 138, K⁺ = 5.5, Cl⁻ = 95, CO₂ = 12
  • Calculation: (138 + 5.5) – (95 + 12) = 143.5 – 107 = 36.5 mEq/L
  • Result: An anion gap of 36.5 is significantly elevated. This result strongly suggests a high anion gap metabolic acidosis, and in this clinical context, is highly indicative of diabetic ketoacidosis. The body is producing excess ketoacids, which are unmeasured anions.

Example 2: Normal Anion Gap (Diarrhea)

A patient has been suffering from severe diarrhea for several days. Lab results are:

  • Inputs: Na⁺ = 135, K⁺ = 3.0, Cl⁻ = 115, CO₂ = 15
  • Calculation: (135 + 3.0) – (115 + 15) = 138.0 – 130 = 8.0 mEq/L
  • Result: An anion gap of 8.0 is considered low-normal. Despite the presence of acidosis (low CO₂/bicarbonate), the anion gap is normal. This points to a normal anion gap metabolic acidosis (NAGMA), often caused by the loss of bicarbonate from the gastrointestinal tract, which is then compensated by an increase in chloride to maintain electrical neutrality. Analyzing the Metabolic Acidosis Causes can provide further diagnostic clues.

How to Use This Anion Gap Calculator

  1. Obtain Lab Values: Gather the patient’s serum electrolyte panel results for Sodium (Na⁺), Potassium (K⁺), Chloride (Cl⁻), and Total CO₂ (bicarbonate).
  2. Enter Values: Input each value into its corresponding field in the calculator. The units must be in mEq/L.
  3. Review the Result: The calculator will instantly provide the anion gap value in mEq/L.
  4. Interpret the Result: The result will be flagged as Low, Normal, or High based on a typical reference range of 12-20 mEq/L (when including K⁺). A high anion gap is the most common and clinically significant finding.

Key Factors That Affect the Anion Gap

The anion gap is a powerful but indirect measurement. Several physiological and pathological factors can influence its value.

  • Metabolic Acidosis (High AG): The most common cause for a change. Conditions that produce excess acid (lactic acid, ketoacids) increase the anion gap. The mnemonic MUDPILES is often used to remember the causes.
  • Hypoalbuminemia: Albumin is the primary unmeasured anion. A low albumin level will decrease the baseline anion gap, potentially masking a high anion gap acidosis. For this, a Corrected Anion Gap for Albumin calculation is recommended.
  • Renal Failure: Impaired kidney function leads to the retention of unmeasured anions like sulfates and phosphates, causing an elevated anion gap.
  • Toxic Ingestions: Ingesting substances like methanol, ethylene glycol, salicylates, or propylene glycol leads to the production of acidic metabolites, causing a severe high anion gap acidosis.
  • Laboratory Error: Falsely high or low electrolyte measurements can lead to an inaccurate anion gap. For instance, bromide intoxication can falsely elevate chloride readings.
  • Hyperchloremic Metabolic Acidosis: In normal anion gap acidosis, the loss of bicarbonate is offset by an increase in chloride, keeping the gap normal. A detailed understanding of Electrolyte Imbalance Symptoms can be beneficial here.

Frequently Asked Questions (FAQ)

What is a normal anion gap?
When including potassium, the normal range is typically 12 to 20 mEq/L. Without potassium, it is lower, around 8 to 16 mEq/L. This calculator specifically performs an anion gap calculation using co2 and k.
What does a high anion gap mean?
A high anion gap signifies metabolic acidosis due to the presence of excess unmeasured anions. Common causes include lactic acidosis, ketoacidosis, renal failure, and toxic ingestions (e.g., methanol, salicylates).
What does a low anion gap mean?
A low anion gap is rare but can be caused by hypoalbuminemia (low albumin), hyperchloremia, or lab error. It can also be seen in cases of paraproteinemia (e.g., multiple myeloma).
Why is potassium (K+) sometimes included in the calculation?
Potassium is a measured cation, so including it provides a more complete calculation of the measured cations versus anions. However, its concentration is small compared to sodium, so its effect on the total gap is minor. Many institutions omit it for simplicity.
Why use Total CO₂ instead of HCO₃⁻?
In clinical practice, the “Total CO₂” measurement on an electrolyte panel is composed almost entirely of bicarbonate (HCO₃⁻) and dissolved CO₂. It serves as an excellent and readily available proxy for the bicarbonate level and is standard for this calculation.
Can the anion gap be negative?
Yes, although it’s very rare and almost always points to a laboratory error, such as under-measurement of sodium or over-measurement of chloride (e.g., in bromide intoxication).
What is the delta-delta ratio?
The delta-delta ratio is a secondary calculation used when a high anion gap metabolic acidosis is present. It helps determine if a mixed acid-base disorder exists. You can learn more with a dedicated Delta-Delta Ratio Calculation tool.
How does albumin affect the anion gap?
Albumin is a major unmeasured anion. For every 1 g/dL decrease in serum albumin below 4.0 g/dL, the expected anion gap decreases by about 2.5 mEq/L. This is why a correction for albumin is sometimes necessary for accurate interpretation.

© 2026 Medical Calculators Inc. This tool is for educational purposes only and is not a substitute for professional medical advice.



Leave a Reply

Your email address will not be published. Required fields are marked *