Anion Gap Formula: How to Calculate It Step by Step
In this article
The anion gap formula is: Anion Gap = (Sodium + Potassium) − (Chloride + Bicarbonate), with all values in mmol/L (mEq/L). If your lab does not report potassium, use the common alternative: Anion Gap = Sodium − (Chloride + Bicarbonate). That single subtraction gives you a number that helps clinicians flag which kind of metabolic acidosis is present and whether unmeasured anions are accumulating. You do not need a special calculator, but you do need a current basic metabolic panel (BMP) or electrolyte panel drawn at the same time, because mixing values from different draws can produce a misleading result.
What You'll Need
- A current lab report showing sodium, chloride, bicarbonate (often listed as CO₂ or total CO₂), and ideally potassium. All values should be in mmol/L or mEq/L.
- Knowledge of which formula your lab or clinical protocol uses (with or without potassium).
- A calculator or spreadsheet if you are doing several calculations.
- The patient's clinical context and, when available, a reference range for the anion gap from the same laboratory.
Note that menu labels and reference ranges vary slightly by laboratory, device, and region. Always use the reference interval printed on your own report rather than a remembered number.
Step-by-Step
- Confirm the units. Check that sodium, chloride, bicarbonate, and potassium are all reported in mmol/L (mEq/L). If any value is in mg/dL, convert it first or use a lab that reports electrolytes in mmol/L. Do not mix units in one equation.
- Decide which formula to use. If potassium is reported, use AG = (Na⁺ + K⁺) − (Cl⁻ + HCO₃⁻). If potassium is not reported or your protocol omits it, use AG = Na⁺ − (Cl⁻ + HCO₃⁻). The potassium-included result is typically about 3–4 mmol/L higher, so do not compare it directly with a reference range built for the other formula.
- Locate the bicarbonate value. On many reports this appears as "CO₂," "total CO₂," or "bicarbonate." Use the total CO₂ value as the bicarbonate term only if your lab defines it that way; otherwise use the reported HCO₃⁻. When in doubt, ask the laboratory which value to use.
- Add sodium and potassium. For example, Na⁺ 140 + K⁺ 4.0 = 144 mmol/L.
- Add chloride and bicarbonate. For example, Cl⁻ 104 + HCO₃⁻ 24 = 128 mmol/L.
- Subtract the second sum from the first. 144 − 128 = 16 mmol/L. That is the anion gap for this example.
- Compare with the reference range. A typical reference range is about 8–16 mmol/L when potassium is included, and roughly 3–11 mmol/L when it is omitted, but ranges differ by analyzer and population. Use the range on your report.
- Repeat with the alternate formula if needed. Using the same values without potassium: 140 − (104 + 24) = 12 mmol/L. Record which formula produced which number so the result is not misread later.
- Consider correcting for albumin when relevant. The anion gap falls when albumin is low. A commonly used correction adds about 2.5 mmol/L to the measured gap for every 1 g/dL that albumin is below 4 g/dL. This is a clinical adjustment, not part of the basic formula, and should be applied only when albumin is known and the correction is appropriate for your protocol.
Common Mistakes
- Mixing formulas and reference ranges. A gap of 14 is normal on a potassium-included range but may sit at the upper edge of a range built without potassium. Always state which formula you used.
- Using CO₂ from a blood gas instead of serum bicarbonate. Venous or arterial blood gas CO₂ and serum total CO₂ are measured differently and are not interchangeable without thought.
- Combining labs from different times. Electrolytes shift, especially during illness or IV fluid therapy. Use a single draw.
- Forgetting unit conversion. Chloride or bicarbonate reported in different units will silently corrupt the result.
- Ignoring low albumin. A "normal" gap in a patient with low albumin can hide a real high-anion-gap acidosis.
- Treating the number as a diagnosis. The anion gap is a screening clue, not a standalone diagnosis. It must be interpreted with pH, clinical findings, and other labs.
Tips
- Write the formula and the units next to your result so anyone reviewing it can reproduce the calculation.
- Keep a small spreadsheet with columns for Na, K, Cl, HCO₃, the two formulas, and the reference range. It reduces arithmetic slips.
- Round consistently. Most labs report whole numbers; carrying extra decimals rarely changes the interpretation.
- If your result is borderline, recheck the inputs before drawing conclusions. A transcription error is more common than a true borderline value.
- Use the same laboratory's reference range for trending over time, because analyzer methods differ.
Troubleshooting
- The result looks impossible (very high or very low). Recheck that you subtracted rather than added, that you used bicarbonate and not a different CO₂ value, and that all units match.
- Your value disagrees with the lab's reported gap. The lab may use a different formula, a different bicarbonate field, or a correction. Ask which formula and reference range they use.
- Potassium is missing. Use the sodium-minus-chloride-plus-bicarbonate version and note that the result will be lower than a potassium-included value.
- Albumin is low and the gap looks normal. Apply the albumin correction only if your protocol supports it, and document the corrected value separately.
- Values come from different dates. Request a repeat panel drawn at one time before interpreting.
- You are unsure which CO₂ field to use. Contact the laboratory; do not guess between total CO₂ and a blood gas value.
Frequently Asked Questions
What is the anion gap formula?
AG = (Na⁺ + K⁺) − (Cl⁻ + HCO₃⁻), or AG = Na⁺ − (Cl⁻ + HCO₃⁻) when potassium is omitted. All values in mmol/L.
Should I include potassium?
Use whichever formula your laboratory or protocol specifies. Including potassium raises the result by roughly the potassium value, so never compare across formulas.
What is a normal anion gap?
Commonly about 8–16 mmol/L with potassium included and about 3–11 mmol/L without, but ranges vary by analyzer and population. Use the range on your report.
Does low albumin affect the anion gap?
Yes. Low albumin lowers the measured gap. A correction of about 2.5 mmol/L per 1 g/dL of albumin below 4 g/dL is often used, but only when your protocol supports it.
Can I calculate the anion gap from a blood gas?
Only if the gas panel reports electrolytes in the same units and your protocol defines which bicarbonate value to use. Serum electrolyte panels are the standard source.
Is the anion gap a diagnosis?
No. It is a calculated clue that must be interpreted alongside pH, clinical findings, and other laboratory results.