Anion Gap Calculator

Calculate the serum anion gap with or without potassium to support evaluation of electrolyte balance and metabolic acidosis.

Serum anion gap
Enter electrolyte results from the same blood sample and select the formula used by your laboratory.

About the anion gap

The serum anion gap is a calculated value derived from routinely measured electrolytes. Blood must remain electrically neutral, but standard chemistry panels measure only some positively and negatively charged particles. Subtracting measured chloride and bicarbonate from measured sodium estimates the difference represented by unmeasured ions. The most common formula excludes potassium: sodium minus chloride minus bicarbonate. Some laboratories include potassium, producing a result about four millimoles per liter higher and requiring a different reference interval. A raised anion gap can support recognition of metabolic acidosis caused by an accumulation of unmeasured acids. Possible contexts include lactic acidosis, ketoacidosis, advanced kidney dysfunction, and selected toxic exposures. The gap does not identify a cause by itself. Clinicians combine it with pH, bicarbonate, blood gases, glucose, lactate, ketones, kidney tests, medication and exposure history, and the patient's symptoms. A normal calculated gap also does not rule out an acid-base disorder because chloride can rise as bicarbonate falls, producing normal-gap metabolic acidosis. Albumin is a major unmeasured anion, so low albumin can lower the observed gap and conceal an important elevation. Clinicians may apply an albumin correction when an albumin result is available, but correction conventions vary. Laboratory methods also influence the expected range. For a formula without potassium, a common educational interval is approximately 8 to 12 mmol/L; with potassium, approximately 12 to 20 mmol/L. The correct comparison is always the interval printed by the laboratory that measured the sample, not a universal cutoff from an online tool. Use electrolyte values drawn at the same time and do not mix serum and whole-blood measurements from different devices. Bicarbonate may appear as total carbon dioxide on a standard metabolic panel, depending on local reporting. A surprising result should prompt review for data-entry or specimen issues as well as clinical causes. This calculator performs the subtraction accurately but cannot diagnose acidosis, determine compensation, or recommend treatment. Seek urgent medical care for severe breathing difficulty, confusion, persistent vomiting, profound weakness, suspected poisoning, very high blood glucose with illness, or other acute symptoms. Qualified healthcare professionals should interpret abnormal results in the context of the complete evaluation.

Anion gap examples

The selected formula and matching reference interval determine how each result is interpreted.

ElectrolytesAnion gapInterpretation
Na 140, Cl 104, HCO3 24; potassium excluded12 mmol/LAt the upper end of a common range without potassium.
Na 140, K 4, Cl 100, HCO3 20; potassium included24 mmol/LAbove a common range for the potassium-inclusive formula.
Na 138, Cl 108, HCO3 18; potassium excluded12 mmol/LA normal gap does not exclude metabolic acidosis when bicarbonate is low.

How to calculate anion gap

  1. Choose whether to use the formula with or without potassium, matching local practice.
  2. Enter sodium, chloride, bicarbonate, and potassium when required from the same sample.
  3. Click Calculate Anion Gap to perform the selected electrolyte subtraction.
  4. Compare the value with the laboratory's own interval and review it with a clinician.

Anion gap FAQ

What is the standard anion gap formula?

The common formula is sodium minus the sum of chloride and bicarbonate. An alternative adds potassium to sodium before subtracting chloride and bicarbonate.

What is considered a normal anion gap?

A frequently cited range is 8 to 12 mmol/L without potassium and 12 to 20 mmol/L with potassium. Laboratory-specific intervals should take priority because measurement methods differ.

What can cause a high anion gap?

Unmeasured acids can accumulate with lactic acidosis, ketoacidosis, kidney failure, and certain poisonings. The result is not specific enough to identify the cause without clinical testing.

Why does albumin affect the anion gap?

Albumin carries negative charge and contributes substantially to the normal gap. Low albumin can make the measured gap appear lower and may require clinical correction.

Can metabolic acidosis occur with a normal gap?

Yes. Loss of bicarbonate with a corresponding chloride rise can produce normal-gap, or hyperchloremic, metabolic acidosis despite a low bicarbonate level.