What Is the Anion Gap?
The anion gap is a calculated difference between commonly measured charged particles in serum. Sodium is the main measured positive ion in the standard formula. Chloride and bicarbonate are the measured negative ions. The result represents ions that are not included in that short equation, especially albumin and, during some illnesses, organic acids.
Clinicians use the calculation when evaluating acid-base problems, especially suspected metabolic acidosis. A raised gap can suggest that unmeasured anions have accumulated, but the number does not reveal which substance is present and cannot establish a diagnosis by itself.
Anion Gap Calculation Formula
The most common serum anion gap calculation leaves out potassium:
Enter sodium, chloride and bicarbonate from the same blood draw. If the chemistry panel labels the last value as total CO₂, that number is commonly used as an estimate of serum bicarbonate for this calculation.
- 1
Add chloride and bicarbonate: 104 + 24 = 128
- 2
Subtract that sum from sodium: 140 − 128 = 12
- 3
Report the answer with the lab range: AG = 12 mEq/L
The arithmetic is exact for the entered values. Clinical meaning is not automatic. Sampling, assay method, albumin, kidney function, lactate, ketones, medicines and the person’s condition can all change interpretation.
How to Calculate Anion Gap from a BMP or CMP
- 1
Use one chemistry panel
Find sodium, chloride and bicarbonate or total CO₂ from the same basic or comprehensive metabolic panel.
- 2
Check the units and formula
Confirm that the reporting laboratory calculates its gap without potassium, as most do.
- 3
Add albumin when available
Low albumin can make an important gap look smaller, so an albumin-corrected value may add useful context.
- 4
Use the lab’s upper limit
Enter the upper end printed on the report. The result panel compares against that value without calling it a diagnosis.
- 5
Interpret the whole acid-base picture
Review pH, bicarbonate, lactate, ketones, kidney tests, medicines, symptoms and trends as appropriate.
If you need a complete pH, PaCO₂, bicarbonate and compensation review, use the ABG Calculator. That page answers a broader acid-base question; this page focuses on the serum anion gap calculation.
Anion Gap Calculation with CO₂
On a serum chemistry panel, “CO₂” usually means total carbon dioxide. Most of that total is bicarbonate, so laboratories commonly use total CO₂ in the anion gap equation. It is not the same measurement as the partial pressure of carbon dioxide, PaCO₂, on a blood gas.
Total CO₂
Measured in serum and commonly used as the bicarbonate term in the gap formula.
Na − (Cl + CO₂)Calculated HCO₃⁻
Derived from measured pH and PaCO₂. Keep the sample type and method with the value.
Acid-base assessmentAn isolated low total CO₂ does not prove metabolic acidosis. Clinical acid-base assessment may require pH and PaCO₂ as well as serum electrolytes.
Albumin-Corrected Anion Gap
Albumin is the largest unmeasured anion in normal plasma. When serum albumin is low, the measured gap also falls. That can hide an increase in other unmeasured anions. A widely used Figge-style correction is:
For a measured gap of 12 mEq/L and albumin of 2.0 g/dL, the correction adds 5: 12 + 2.5 × (4 − 2) = 17 mEq/L. The formula is an estimate, not a direct measurement of the missing ions.
Albumin also affects interpretation of total calcium. The Corrected Calcium Calculator explains that separate calculation.
Anion Gap With and Without Potassium
Potassium is often omitted because its serum concentration is much smaller than sodium. Some teaching formulas and laboratories include it:
Adding potassium makes the numerical result higher. It also changes the expected reference interval. Do not compare a potassium-inclusive result with a range designed for the standard potassium-free equation. The calculator shows both values separately when potassium is entered.
High, Normal and Low Anion Gap Results
May reflect extra unmeasured anions. Examples include lactate, ketoacids, retained acids in kidney failure and some toxic metabolites. Targeted tests are needed.
A normal-range gap does not rule out an acid-base disorder. Hyperchloremic metabolic acidosis can occur without a raised gap.
Testing error is a common cause. Low albumin and less common conditions or interferences may also contribute.
Historically, many references used about 8–12 mEq/L without potassium. Some modern assays use a lower interval. This is why the calculator asks for the upper limit from the actual laboratory rather than imposing a universal “normal anion gap.”
Kidney disease can affect acid handling and the anion gap. For adult renal filtration estimates, see the GFR Calculator; eGFR and anion gap answer different questions.
Delta Gap and Delta Ratio
When a high anion gap metabolic acidosis is already suspected, clinicians may compare the rise in anion gap with the fall in bicarbonate. This can suggest a mixed metabolic process. Our calculator only displays the ratio when the selected gap is above the entered upper limit and bicarbonate is below 24 mEq/L.
May suggest an additional normal-gap metabolic acidosis.
Often fits a predominantly high-gap metabolic acidosis pattern.
May suggest concurrent metabolic alkalosis or a higher starting bicarbonate.
These bands are teaching guides, not diagnoses. The ratio is unstable when bicarbonate is near 24, depends on the chosen normal gap, and is not meant to be interpreted when high-gap acidosis is absent.
Anion Gap in DKA and Metabolic Acidosis
Many people with diabetic ketoacidosis have a high anion gap metabolic acidosis, but the gap alone is not a DKA test. Current consensus guidance gives direct blood beta-hydroxybutyrate measurement an important role. Glucose, pH or bicarbonate, ketones, symptoms and the clinical setting must be considered together.
Other high-gap patterns may occur with lactic acidosis, kidney failure and some poisonings. A serum gap cannot identify the cause, estimate toxin concentration or decide treatment. Normal-gap metabolic acidosis may occur with bicarbonate loss or impaired renal acid excretion.
Serum Anion Gap vs Urine Anion Gap
Serum anion gap
Uses serum sodium, chloride and bicarbonate to support evaluation of metabolic acidosis.
Na − (Cl + HCO₃)Urine anion gap
Uses urine electrolytes as an indirect clue to ammonium excretion in selected normal-gap acidosis evaluations.
Urine Na + K − ClThese calculations use different specimens and answer different questions. A urine anion gap calculator should not be substituted for this serum formula, and this page intentionally does not combine the two.
Important Limits and Common Errors
- Mixing samples: sodium, chloride and bicarbonate must come from the same collection time.
- Using PaCO₂: partial pressure of CO₂ is not the bicarbonate term in this equation.
- Ignoring the lab range: analyzer methods change the expected interval.
- Forgetting albumin: hypoalbuminemia can make a raised gap appear less obvious.
- Mixing formulas: a result that includes potassium needs a potassium-inclusive reference interval.
- Overusing the delta ratio: it should not be interpreted when the gap is not elevated or bicarbonate is not low.
- Treating the gap as a diagnosis: the calculation cannot identify lactate, ketones, toxins or the cause of an abnormal result.
Anion Gap Calculator FAQs
How do you calculate anion gap?
Use values from the same serum sample: sodium minus the sum of chloride and bicarbonate. Written as a formula, AG = Na − (Cl + HCO₃). Most laboratories leave potassium out.
Can CO₂ be used to calculate anion gap?
Total CO₂ on a serum chemistry panel is commonly used as the bicarbonate estimate in the formula. Do not substitute PaCO₂ from a blood gas. Keep the sample source and laboratory method with the result.
What is the corrected anion gap formula for albumin?
A common formula is corrected AG = measured AG + 2.5 × (4.0 − albumin in g/dL). It is an approximation and is especially useful when albumin is low.
Should potassium be included in the anion gap?
Usually it is omitted, but some laboratories include it. Either equation can be calculated, but each needs its matching reference range.
Is the urine anion gap the same calculation?
No. The serum gap uses serum sodium, chloride and bicarbonate. The urine gap uses urine sodium plus potassium minus chloride and helps with a different clinical question.
Evidence and Editorial Notes
The formulas, safeguards and interpretation limits were checked against clinical reviews, a primary albumin-correction study and current diabetes consensus guidance.
- Kharsa A, et al. Anion Gap and Non-Anion Gap Metabolic Acidosis. StatPearls. Updated 2025.
- Figge J, et al. Anion gap and hypoalbuminemia. Critical Care Medicine. 1998.
- Haber LA, et al. Evaluating a low anion gap: A practical approach. Cleveland Clinic Journal of Medicine. 2023.
- Umpierrez GE, et al. Hyperglycemic Crises in Adults With Diabetes: A Consensus Report. Diabetes Care. 2024.
- NCBI Clinical Methods: Serum Total Carbon Dioxide.
Last formula and source review: July 26, 2026. Calculations run in your browser. The values entered in this form are not sent to our server.