Skip to content
OverCalculator
  1. Home
  2. Health & Fitness
  3. Anion Gap Calculator
Health & Fitness

Anion Gap Calculator

Calculate anion gap with optional potassium and albumin correction, using the exact electrolyte formulas and clinical interpretation cautions.

Published

Anion gap
Anion gap
14.0 mEq/L
High anion gap (>11 mEq/L)
Normal range
3–11 mEq/L
Interpretation
High anion gap (>11 mEq/L): May indicate metabolic acidosis (e.g., ketoacidosis, lactic acidosis, or renal failure).

Formula: Na − (Cl + HCO₃), or Na + K − (Cl + HCO₃) when potassium is included.

Normal range: 135–145 mEq/L.
mEq/L
Normal range: 96–106 mEq/L.
mEq/L
Normal range: 22–28 mEq/L.
mEq/L

Use Na + K − (Cl + HCO₃).

Correct by adding 2.5 × (4.0 − albumin).

Results update as you type.

For educational purposes only; not medical advice. Calculators may not apply to every person or clinical situation. Consult a qualified healthcare professional for diagnosis, treatment, and interpretation.

Anion Gap Calculator

Electrolytes hide more information than their individual reference ranges suggest. The anion gap calculator subtracts the routinely measured anions from measured cations to estimate whether unmeasured ions are contributing to an acid-base disturbance. This page is written around the calculator’s exact behavior, including the optional potassium term and albumin correction.

What the anion gap measures

Blood plasma remains electrically neutral, but routine chemistry panels measure only a handful of charged particles. Sodium is the main measured cation. Chloride and bicarbonate are the main measured anions used in the common gap calculation. The difference between them is not a literal empty space; it represents unmeasured anions and cations, including albumin, phosphate, sulfate, organic acids, calcium, magnesium, and potassium when it is not explicitly included.

Clinically, the anion gap is often discussed during metabolic acidosis evaluation. A higher gap may point toward accumulation of unmeasured acids, while a normal gap with low bicarbonate can suggest bicarbonate loss or impaired renal acid excretion. The number is only one piece. Pair it with pH and PaCO2 from an acid base calculator, oxygenation context from the A-a gradient calculator, kidney function, lactate, ketones, medication history, and timing of the sample.

Exact formulas in the calculation

By default, the calculator uses sodium, chloride, and bicarbonate in mEq/L:

anion gap=sodium(chloride+bicarbonate)\text{anion gap} = \text{sodium} - (\text{chloride} + \text{bicarbonate})

If the potassium switch is on, potassium is added to the measured cation side:

anion gap with potassium=sodium+potassium(chloride+bicarbonate)\text{anion gap with potassium} = \text{sodium} + \text{potassium} - (\text{chloride} + \text{bicarbonate})

If albumin correction is on, the calculator uses 4.0 g/dL as normal albumin:

corrected anion gap=anion gap+2.5×(4.0albumin)\text{corrected anion gap} = \text{anion gap} + 2.5 \times (4.0 - \text{albumin})

The result is displayed to one decimal place. The default reference range is 3 to 11 mEq/L. With potassium included, the range changes to 5 to 16 mEq/L. A low flag appears below 3 without potassium or below 5 with potassium. A high flag appears above 11 without potassium or above 16 with potassium.

Example: calculating an anion gap

Take sodium 140 mEq/L, chloride 102 mEq/L, and bicarbonate 24 mEq/L, with potassium off. The calculation is:

anion gap=140(102+24)\text{anion gap} = 140 - (102 + 24)

The sum inside the parentheses is 126, so the gap is 14.0 mEq/L. Because 14.0 is greater than the default upper reference value of 11, the calculator labels it high. If albumin correction is also turned on and albumin is 3.0 g/dL, the correction adds 2.5 times 1.0, or 2.5. The corrected anion gap is 16.5 mEq/L. Important calculate detail: the displayed interpretation is still based on the uncorrected 14.0 result, not on the corrected value.

With potassium on and potassium 4.0 mEq/L, the same electrolytes produce 18.0 mEq/L:

anion gap with potassium=140+4(102+24)\text{anion gap with potassium} = 140 + 4 - (102 + 24)

That is compared with the potassium-included range of 5 to 16 mEq/L, so it is also labeled high.

Interpretation and reference ranges

Reference ranges differ by analyzer, laboratory method, and whether potassium is included. Modern ion-selective electrode methods often produce lower anion gap ranges than older textbook values. This calculator uses its own embedded thresholds: 3 to 11 mEq/L without potassium and 5 to 16 mEq/L with potassium. Use the range printed by the laboratory whenever it differs from the calculator.

Albumin matters because it is a major negatively charged plasma protein. Low albumin can lower the uncorrected gap and potentially obscure a clinically important increase in unmeasured anions. The correction used here, adding 2.5 mEq/L for each 1 g/dL albumin below 4.0, is a commonly cited adjustment. The albumin globulin ratio calculator can help review protein relationships, but it does not replace measured serum albumin for this correction.

Limitations, disclaimer, and common mistakes

This calculator is educational only and is not medical advice. It does not diagnose metabolic acidosis, diabetic ketoacidosis, lactic acidosis, poisoning, kidney failure, or any other condition. Clinicians interpret the gap with symptoms, medications, pH, PaCO2, lactate, ketones, renal function, and serial results.

Common mistakes include mixing electrolyte values from different blood draws, using total CO2 from one panel and chloride from another, forgetting that bicarbonate and total CO2 are not always identical in every context, and comparing a potassium-included result with a potassium-excluded reference range. Another mistake is treating a normal gap as reassuring when albumin is low. If you are planning nutrition or weight changes rather than interpreting acute labs, tools such as the BMR calculator belong to a different category and should not be used to interpret acid-base disorders.

Sources

Frequently asked questions

What is the default anion gap formula here?
The default calculation is sodium minus the sum of chloride and bicarbonate, using values entered in mEq/L. the calculator reports the answer to one decimal place and compares it with a 3 to 11 mEq/L reference range unless potassium is switched on.
When does the calculator include potassium?
Potassium is included only when the potassium switch is turned on. In that mode, the formula becomes sodium plus potassium minus the sum of chloride and bicarbonate, and the displayed reference range changes to 5 to 16 mEq/L for interpretation.
How is albumin correction calculated?
When albumin correction is selected, the calculator adds 2.5 times the difference between 4.0 g/dL and the measured albumin. This can raise the displayed corrected gap when albumin is low, but the interpretation text still follows the uncorrected gap.
Does a high anion gap diagnose a condition?
No. A high gap can be a clue to unmeasured acids, such as lactate, ketones, renal failure related acids, or toxins, but diagnosis requires history, examination, blood gas data, kidney function, medication review, repeat labs, and targeted testing by clinicians.
Can an anion gap be low?
Yes. Low results may occur with low albumin, measurement issues, paraproteins, lithium or bromide exposure, or uncommon electrolyte patterns. Because albumin is a major unmeasured anion, a low albumin level can make the uncorrected gap look deceptively normal or low.

Related calculators

Anion Gap Calculator updated at