Anion Gap Calculator
Calculate serum anion gap, optional potassium gap, albumin-corrected gap, and delta ratio from electrolyte results.
Anion Gap Calculator
Background.
An anion gap calculator estimates the difference between routinely measured serum cations and anions, usually sodium minus chloride plus bicarbonate. The canonical use case is an acid-base evaluation where sodium is 140 mEq/L, chloride is 101 mEq/L, bicarbonate is 18 mEq/L, and albumin is 2.8 g/dL. The uncorrected anion gap is 21 mEq/L. Because low albumin lowers the observed gap, adding an albumin correction of 3 mEq/L gives a corrected anion gap of 24 mEq/L. If the user enters a normal gap of 12 and reference bicarbonate of 24, the delta ratio is 2.
People search for this calculator because the arithmetic is simple but clinically easy to misapply. Many chemistry panels report sodium, chloride, and bicarbonate or total CO2, but the anion gap may not be displayed or may use a lab-specific reference range. Some clinicians include potassium and others do not. Albumin can shift the baseline, especially in critical illness, liver disease, malnutrition, nephrotic states, or chronic inflammation. A calculator that makes each assumption visible is safer than a single unexplained number.
The anion gap is rooted in electroneutrality. Blood plasma has equal positive and negative charges overall, but routine labs measure only some ions. Sodium is the major measured cation. Chloride and bicarbonate are the major measured anions. The gap represents unmeasured anions minus unmeasured cations under the simplified formula. High anion gap metabolic acidosis can occur when unmeasured anions accumulate, such as lactate, ketoacids, renal acids, or toxins. Normal-gap metabolic acidosis can occur when bicarbonate falls and chloride rises. The calculator does not diagnose the cause; it computes a screening value that must be interpreted with pH, pCO2, lactate, ketones, renal function, medications, and clinical context.
Albumin correction is important because albumin is a major unmeasured anion. Figge and colleagues showed that hypoalbuminemia lowers the observed anion gap and can mask a clinically meaningful gap acidosis. Hatherill and colleagues used an albumin-corrected equation in children with shock, and Chawla and colleagues found that albumin-corrected anion gap had better diagnostic utility for hyperlactatemia in critically ill patients than uncorrected gap. These sources support offering a corrected gap, but not blind interpretation. The correction is still an estimate and should be used alongside the lab's own reference range.
The worked example shows how the values interact. Sodium 140 minus chloride 101 plus bicarbonate 18 gives 21. Potassium-inclusive gap adds 4.2, giving 25.2. Albumin is 2.8 g/dL, which is 1.2 g/dL below the 4.0 reference. The correction is 2.5 times 1.2, or 3. Corrected gap is 24 without potassium and 28.2 with potassium. The delta ratio uses corrected gap minus normal gap divided by reference bicarbonate minus measured bicarbonate. With normal gap 12 and bicarbonate reference 24, delta ratio is 2.
For Quanta, this is a clinical calculator that should prioritize transparency. It should support both with-potassium and without-potassium formulas, but make one primary and label the other optional. It should let users enter albumin units and lab normal ranges. It should not output a diagnosis such as DKA or lactic acidosis. It should say that high-stakes acid-base interpretation requires clinical review.
What is anion gap calculator?
The anion gap is a calculated value that compares measured serum sodium with measured chloride and bicarbonate. The common formula is sodium minus chloride plus bicarbonate. It is expressed in mEq/L, which is numerically similar to mmol/L for these singly charged ions. Some formulas include potassium, producing a slightly higher gap.
The key vocabulary is sodium, chloride, bicarbonate, total CO2, potassium, albumin, unmeasured anions, high anion gap metabolic acidosis, normal gap metabolic acidosis, corrected anion gap, and delta ratio. Sodium is the main measured cation. Chloride and bicarbonate are measured anions. Albumin is an unmeasured anion that can lower or raise the expected gap. Delta ratio compares the rise in anion gap with the fall in bicarbonate to screen for mixed acid-base disorders.
The calculator is valid for arithmetic from electrolyte values. It is not a diagnosis. It should not be used without considering blood gas results, pH, respiratory compensation, lactate, ketones, renal function, toxicology, albumin, lab reference range, and clinical setting. It also cannot determine whether total CO2 is an adequate bicarbonate proxy in every case.
How to use this calculator.
- Enter sodium, chloride, and bicarbonate or total CO2.
- Enter potassium if you want the potassium-inclusive gap.
- Enter albumin if an albumin-corrected gap is needed.
- Enter the lab's normal anion gap if using delta ratio.
- Enter reference bicarbonate, commonly 24 mEq/L, if using delta ratio.
- Review uncorrected gap, corrected gap, and optional delta ratio.
- Interpret results with blood gas, lactate, ketones, renal function, and clinical context.
The formula.
The common anion gap formula is sodium minus the sum of chloride and bicarbonate. In the example, chloride plus bicarbonate is 101 plus 18, or 119. Sodium is 140, so the gap is 21. The formula is a simplified charge-balance estimate. It does not mean plasma has a true electrical gap; it means routinely measured ions do not include every charged particle.
The potassium-inclusive formula adds potassium to the measured cation side. Potassium is usually much smaller than sodium, so including it raises the gap by only a few mEq/L. Some institutions include potassium and others do not. The calculator should report which formula is primary and show the optional potassium result only when potassium is entered. Reference ranges must match the formula used.
Albumin correction accounts for the fact that albumin contributes to the normal anion gap. When albumin is low, the observed gap can look normal even when unmeasured acids are present. The common correction in g/dL is 2.5 times the difference between 4.0 and measured albumin. In the example, albumin is 2.8, so the correction is 3. Adding 3 to the uncorrected gap of 21 gives 24. If albumin is entered in g/L, the equivalent coefficient is 0.25 for each g/L below the reference.
The delta ratio is a secondary calculation used when metabolic acidosis is present. It compares the increase in corrected anion gap above normal with the decrease in bicarbonate below a reference value. In the example, corrected gap is 24 and normal gap is 12, so the gap increase is 12. Reference bicarbonate is 24 and measured bicarbonate is 18, so the bicarbonate decrease is 6. The ratio is 2. A high or low ratio can suggest mixed processes, but this is only a clue and depends on the clinical setting.
The implementation should avoid hard-coded interpretation thresholds unless they are configurable by lab and source. Electrolyte methods, albumin, and institutional reference ranges can change the expected gap.
A worked example.
The example chemistry panel has sodium 140, chloride 101, bicarbonate 18, potassium 4.2, and albumin 2.8 g/dL. The basic anion gap is sodium minus chloride plus bicarbonate. Chloride plus bicarbonate is 119, and 140 minus 119 equals 21 mEq/L. If potassium is included, the cation side becomes 144.2, and 144.2 minus 119 equals 25.2 mEq/L. Albumin is below the 4.0 g/dL reference used in the common correction. The albumin difference is 1.2 g/dL. Multiplying by 2.5 gives a correction of 3.0 mEq/L. Adding that to the basic gap gives a corrected anion gap of 24 mEq/L. Adding it to the potassium-inclusive gap gives 28.2 mEq/L. For the delta ratio, subtract the normal gap of 12 from corrected gap 24, giving 12. Subtract measured bicarbonate 18 from reference bicarbonate 24, giving 6. The delta ratio is 12 divided by 6, or 2.
Frequently asked questions.
Should potassium be included in the anion gap?
Why correct the anion gap for albumin?
What normal anion gap should I use?
Does a high anion gap identify the cause of acidosis?
What is the delta ratio for?
Can total CO2 substitute for bicarbonate?
Does a normal anion gap rule out serious illness?
When should I not use this calculator?
References& sources.
- [1]Figge, J., Jabor, A., Kazda, A., and Fencl, V. (1998). Anion gap and hypoalbuminemia. Critical Care Medicine 26(11):1807-1810.
- [2]Hatherill, M., Waggie, Z., Purves, L., Reynolds, L., and Argent, A. (2002). Correction of the anion gap for albumin in order to detect occult tissue anions in shock. Archives of Disease in Childhood 87(6):526-529.
- [3]Chawla, L.S., Shih, S., Davison, D., Junker, C., and Seneff, M.G. (2008). Anion gap, anion gap corrected for albumin, base deficit and unmeasured anions in critically ill patients. BMC Emergency Medicine 8:18.
- [4]Kraut, J.A. and Madias, N.E. (2007). Serum Anion Gap: Its Uses and Limitations in Clinical Medicine. Clinical Journal of the American Society of Nephrology 2(1):162-174.
- [5]National Kidney Foundation (n.d.). Kidney Failure Risk Factor: Serum Bicarbonate. NKF.
- [6]Kidney Disease: Improving Global Outcomes (2024). KDIGO 2024 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease. KDIGO.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 313 calculators remain free
- No billing is enabled