Back to calculator Use calculator
Clinical & CardioGenerated accuracy model review: 2026-05-06
Anion Gap accuracy and testing
This page documents how Calwarden builds trust for this calculator: source notes, regression-style default tests, limitations, assumptions, unit handling, rounding, and visible change history.
Formula source
- AG = Na - (Cl + HCO3)
Test cases
Default input regression check
Generated from the checked-in default inputs and calculate function.
Inputs
- Sodium (Na+): 140 mEq/L
- Chloride (Cl-): 100 mEq/L
- Bicarbonate (HCO3-): 24 mEq/L
Expected outputs
- Anion Gap: 16 mEq/L
- Interpretation: High (Metabolic Acidosis)
Known limitations
- This calculator uses the standard formula which assumes normal albumin levels. In patients with significant hypoalbuminemia, the corrected anion gap should be used.
Assumptions
- This uses the standard formula without potassium, which matches many modern lab references.
- The output assumes albumin is not severely abnormal; hypoalbuminemia can lower the measured gap.
- Anion gap is only one part of acid-base interpretation and does not diagnose the cause by itself.
Unit handling
- Sodium (Na+) accepts values in mEq/L.
- Chloride (Cl-) accepts values in mEq/L.
- Bicarbonate (HCO3-) accepts values in mEq/L.
- Anion Gap is displayed in mEq/L.
Rounding rules
- Number displays use up to 2 decimal places in the calculator UI.
Version history
1.0.0 - 2026-05-06
Generated accuracy and testing page from the current anion-gap-calculator calculator definition.
Change log
2026-05-06
Published default regression test documentation and metadata fallbacks for Anion Gap.
Calculator transparency
Accuracy pages are generated from checked-in calculator definitions and can be upgraded with curated review metadata over time.