What this Anion Gap Calculator does
The Anion Gap Calculator subtracts the entered chloride and bicarbonate values from the sodium value. Its formula is sodium − (chloride + bicarbonate), and the result is expressed in millimoles per liter (mmol/L). For example, sodium of 140 mmol/L, chloride of 104 mmol/L, and bicarbonate of 24 mmol/L produce an anion gap of 12 mmol/L: 140 − (104 + 24) = 12.
This calculation is used as one part of interpreting electrolyte results, especially when clinicians assess acid–base balance. It summarizes the difference between selected measured ions. It does not measure every charged substance in the blood, identify the cause of a result, or establish a diagnosis by itself. The calculator simply applies the supplied values. It does not know the laboratory method, the patient's medical history, or the reference interval used by a particular laboratory.
Use the values and units shown on the lab report. Sodium, chloride, and bicarbonate are commonly reported in mmol/L, which is the unit assumed here. If a report uses different units or labels, confirm what its values represent before entering them. A calculated result should be read alongside the report and clinical context.
How to use the Anion Gap Calculator
Enter the three electrolyte values from the same blood test. The calculator uses sodium as the first value, then adds chloride and bicarbonate and subtracts that sum from sodium. Check each entry carefully, including the decimal point if your lab report gives decimal values. The configured inputs accept whole-number steps, so this version is best used with whole-number results.
- Sodium: enter the sodium concentration in mmol/L.
- Chloride: enter the chloride concentration in mmol/L.
- Bicarbonate: enter the bicarbonate concentration in mmol/L. Some reports may use the term total carbon dioxide, so consult the report or a clinician if the label is unclear.
After entering the values, review the displayed anion gap in mmol/L. Confirm that all three entries came from the same test and that they were copied correctly. Do not use the calculator to decide whether to start, stop, or change treatment. If the result concerns you, discuss it with a qualified healthcare professional who can interpret the complete lab panel and your circumstances.
How the Anion Gap formula works
The formula is sodium − (chloride + bicarbonate). Sodium is the principal measured positive ion in this equation. Chloride and bicarbonate are measured negative ions. The calculation compares sodium with the combined chloride and bicarbonate values, leaving a numerical difference called the anion gap.
In the worked example, sodium is 140 mmol/L, chloride is 104 mmol/L, and bicarbonate is 24 mmol/L. First add the negative-ion values: 104 + 24 = 128 mmol/L. Then subtract that sum from sodium: 140 − 128 = 12 mmol/L. The calculator displays the result to two decimal places, so whole-number inputs may appear with trailing zeros.
This is the version of the calculation that does not include potassium. Some clinical references and laboratories discuss a version that includes potassium, which produces a different numerical result. This calculator does not include potassium, so its output should not be compared directly with a reference range intended for a potassium-inclusive formula. The lab's own interpretation and method matter.
Use cases for the Anion Gap Calculator
The calculator can help a reader reproduce the arithmetic shown in an electrolyte panel or understand how three reported values contribute to a calculated gap. It can also serve as a learning aid for the formula. For example, changing one input while keeping the others fixed shows how the arithmetic result changes, though it does not explain why a patient's measured values differ.
In clinical care, the anion gap may contribute to evaluating metabolic acidosis and other acid–base questions. Its meaning depends on the broader pattern of results, symptoms, medical history, and examination. A clinician may also consider albumin, kidney function, medications, and other measured or unmeasured substances. The calculation alone cannot sort through these factors or determine urgency.
For kidney health discussions, the result may appear alongside tests that assess kidney function and electrolytes. It is one piece of information rather than a standalone measure of kidney performance. A normal-looking number does not rule out a health problem, and an unusual number does not reveal its cause on its own.
Factors to consider when interpreting an anion gap
Reference intervals can differ between laboratories because methods and reporting practices vary. Use the interval printed on the same report and ask the ordering clinician what it means for the specific situation. Avoid relying on a number from another source as a universal cutoff.
Albumin is a major negatively charged protein in blood and can affect interpretation of the gap. Clinicians may account for albumin when evaluating a result. This calculator does not request albumin and does not perform an albumin adjustment. It also does not account for potassium, identify measurement issues, or interpret changes over time.
Other relevant factors may include hydration, acute illness, medicines, and the timing of the blood draw. Those details cannot be captured by this three-input calculation. The best interpretation comes from a healthcare professional reviewing the full laboratory results and the reason the test was ordered. Seek timely medical advice for concerning symptoms or questions about a result, and follow emergency guidance when symptoms are severe or sudden.
Frequently asked questions
What does an anion gap number mean?
It is the calculated difference between sodium and the combined chloride and bicarbonate values in this formula. Its interpretation depends on the laboratory's reference interval and the rest of the clinical picture. The number by itself does not diagnose a condition.
Does this calculator include potassium?
No. It uses sodium − (chloride + bicarbonate). A formula that includes potassium gives a different result, so make sure the method matches the reference information you are using.
Can I use total carbon dioxide for bicarbonate?
Some lab panels report total carbon dioxide as a related measure used in this calculation. Reporting conventions can vary. Check the lab report or ask the clinician who ordered the test if you are unsure which value to enter.
Why might the lab's interpretation differ from this result?
The lab and clinician may consider a different formula, local reference intervals, albumin, other test results, or clinical context. This tool performs only the stated arithmetic and does not make those adjustments.
Can the result tell me whether I have kidney disease?
No. The anion gap is not a kidney disease test on its own. Kidney health is assessed using multiple findings, and a healthcare professional can explain how this result fits with your other tests and history.