Audited ·Last updated 27 Jul 2026·6 citations·Tier 1·0 uses

Anion Gap Calculator

Calculate serum anion gap, optional potassium gap, albumin-corrected gap, and delta ratio from electrolyte results.

Anion Gap Calculator

Anion gap (without potassium)
21
Anion gap (with potassium)
25.2
Albumin correction amount
3
Albumin-corrected anion gap (without potassium)
24
Albumin-corrected anion gap (with potassium)
28.2
Delta ratio
2

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.

  1. Enter sodium, chloride, and bicarbonate or total CO2.
  2. Enter potassium if you want the potassium-inclusive gap.
  3. Enter albumin if an albumin-corrected gap is needed.
  4. Enter the lab's normal anion gap if using delta ratio.
  5. Enter reference bicarbonate, commonly 24 mEq/L, if using delta ratio.
  6. Review uncorrected gap, corrected gap, and optional delta ratio.
  7. Interpret results with blood gas, lactate, ketones, renal function, and clinical context.

The formula.

AG = Na − (Cl + HCO₃)

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.

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.

reference Bicarbonate24
sodium140
albumin G Dl2.8
normal Anion Gap12
potassium4.2
chloride101
bicarbonate18

Frequently asked questions.

Should potassium be included in the anion gap?
Both conventions exist. The more common formula in many settings is sodium minus chloride plus bicarbonate, without potassium. Adding potassium raises the gap slightly, usually by about 3 to 5 mEq/L. Reference ranges differ depending on whether potassium is included. The calculator should show the no-potassium gap as primary unless the product chooses otherwise, and it should label the potassium-inclusive value separately.
Why correct the anion gap for albumin?
Albumin is a major unmeasured anion. Low albumin lowers the observed anion gap and can hide an accumulation of unmeasured acids. Figge and colleagues derived a correction factor, and later critical-care studies examined corrected gap performance. Correcting does not make the value perfect, but it can prevent under-recognition of gap acidosis in hypoalbuminemia. The calculator should show the correction amount so users understand how much albumin changed the result.
What normal anion gap should I use?
Use the reference range from the laboratory and formula convention being used. Older teaching often used ranges around 8 to 12 without potassium, but modern analyzers and institutions vary. If potassium is included, the normal range is higher. The calculator should allow a user-entered normal gap for delta ratio rather than hard-coding one value. Interpretation should match the lab, method, and clinical setting.
Does a high anion gap identify the cause of acidosis?
No. A high gap suggests excess unmeasured anions or changes in measured ions, but it does not identify the cause by itself. Causes can include lactate, ketoacids, renal failure, toxins, medications, and other processes. Diagnosis requires pH, pCO2, bicarbonate, lactate, ketones, renal function, osmolar gap when relevant, medication history, and clinical context. The calculator should avoid naming a specific cause from the arithmetic alone.
What is the delta ratio for?
The delta ratio compares the rise in corrected anion gap with the fall in bicarbonate. It is used as a clue to mixed acid-base disorders. A ratio near expected values can fit a simple high-gap metabolic acidosis, while very low or high values can suggest additional normal-gap acidosis or metabolic alkalosis. The calculation depends on normal gap and reference bicarbonate assumptions. It is a screening aid, not a standalone diagnosis.
Can total CO2 substitute for bicarbonate?
Many chemistry panels report total CO2, which is often used as a practical bicarbonate surrogate in anion-gap calculations. However, blood gas bicarbonate, chemistry total CO2, sample handling, and clinical context can differ. In high-stakes acid-base cases, clinicians may use arterial or venous blood gas values and repeat testing. The calculator should label the bicarbonate input as bicarbonate or total CO2 and avoid overclaiming precision.
Does a normal anion gap rule out serious illness?
No. A normal gap can occur in serious normal-gap metabolic acidosis, and low albumin can mask a high-gap process unless corrected. Some toxins or metabolic disorders may also require additional testing. The anion gap is one part of acid-base interpretation. A normal result should not override symptoms, pH abnormalities, lactate, kidney failure, shock, toxic ingestion concern, or clinician judgement.
When should I not use this calculator?
Do not use it as the only tool for emergency acid-base diagnosis, toxicology decisions, ICU management, or treatment choices. Do not use it without checking units and the lab reference range. It also should not replace blood gas interpretation, respiratory compensation assessment, lactate, ketones, renal tests, or clinical review. Use it to compute transparent electrolyte arithmetic and albumin correction, then interpret the value in context.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon