{
    "name": "Anion Gap Calculator",
    "url": "https://calculators.geekmidst.com/calculators/anion-gap-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/anion-gap-calculator.md",
    "category": "Healthcare operations",
    "description": "Calculate the serum anion gap from sodium, chloride and bicarbonate, with the potassium-inclusive gap and the albumin-corrected gap, for healthcare professionals.",
    "summary": "Anion gap = Na⁺ − (Cl⁻ + HCO₃⁻), in mmol/L. It supports, and does not replace, clinical judgement: interpret it against your own laboratory’s reference range.",
    "also_called": [
        "Serum anion gap calculator"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "sodium",
            "label": "Sodium (Na⁺)",
            "type": "number",
            "default": "140",
            "unit": "mmol/L"
        },
        {
            "name": "potassium",
            "label": "Potassium (K⁺)",
            "type": "number",
            "default": "4",
            "unit": "mmol/L"
        },
        {
            "name": "chloride",
            "label": "Chloride (Cl⁻)",
            "type": "number",
            "default": "104",
            "unit": "mmol/L"
        },
        {
            "name": "bicarbonate",
            "label": "Bicarbonate (HCO₃⁻)",
            "type": "number",
            "default": "24",
            "unit": "mmol/L"
        },
        {
            "name": "albumin_unit",
            "label": "Albumin in",
            "type": "segmented",
            "default": "g_dl",
            "options": {
                "g_dl": "g/dL",
                "g_l": "g/L"
            }
        },
        {
            "name": "albumin",
            "label": "Serum albumin",
            "type": "number",
            "default": "2.0"
        },
        {
            "name": "normal_albumin",
            "label": "Reference albumin",
            "type": "number",
            "default": "4.0"
        }
    ],
    "outputs": [
        {
            "key": "anion_gap",
            "label": "Anion gap",
            "format": "number"
        },
        {
            "key": "anion_gap_k",
            "label": "Anion gap including potassium",
            "format": "number"
        },
        {
            "key": "corrected_gap",
            "label": "Albumin-corrected anion gap",
            "format": "number"
        }
    ],
    "formula": {
        "text": "AG = Na⁺ − (Cl⁻ + HCO₃⁻);  AG with K = (Na⁺ + K⁺) − (Cl⁻ + HCO₃⁻);  Corrected AG = AG + 2.5 × (Reference albumin − Albumin, g/dL)",
        "variables": {
            "Na⁺, K⁺, Cl⁻, HCO₃⁻": "serum electrolytes in mmol/L (equal to mEq/L for these ions)",
            "Albumin": "serum albumin; g/L ÷ 10 = g/dL",
            "2.5": "mmol/L added per 1 g/dL fall in albumin"
        }
    },
    "worked_example": {
        "inputs": {
            "sodium": "140",
            "potassium": "4",
            "chloride": "104",
            "bicarbonate": "24",
            "albumin_unit": "g_dl",
            "albumin": "2.0",
            "normal_albumin": "4.0"
        },
        "steps": [
            "AG = 140 − (104 + 24) = 12 mmol/L.",
            "Including potassium: 12 + 4 = 16 mmol/L.",
            "Albumin correction: 12 + 2.5 × (4.0 − 2.0) = 17 mmol/L."
        ],
        "result": "With Na 140, Cl 104 and HCO₃ 24 the anion gap is 12 mmol/L, which corrects to 17 mmol/L for an albumin of 2.0 g/dL."
    },
    "interpretation": "Compare the gap with the reference range of the laboratory that ran the test, since ranges depend on the analyser and on whether potassium is included. Low albumin hides a raised gap, which is why the corrected value is shown.",
    "assumptions": [
        "All electrolytes come from the same sample and are in mmol/L.",
        "The albumin correction uses 2.5 mmol/L per g/dL, the commonly quoted factor."
    ],
    "limitations": [
        "Reference ranges differ between laboratories; no cut-off is applied here.",
        "Other unmeasured ions (for example paraproteins, lithium, bromide) can distort the gap."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "Should potassium be included?",
            "answer": "Most laboratories now leave it out, but some include it. Both values are shown; compare with the range for the method your laboratory uses."
        },
        {
            "question": "Why correct for albumin?",
            "answer": "Albumin is the main unmeasured anion. When it is low, the gap falls, which can mask an added acid; the correction adds about 2.5 mmol/L per g/dL of missing albumin."
        }
    ],
    "sources": [
        {
            "title": "Wikipedia: Anion gap (formulas, albumin correction, laboratory reference ranges)",
            "url": "https://en.wikipedia.org/wiki/Anion_gap"
        }
    ],
    "related": [
        {
            "name": "Corrected Calcium Calculator",
            "url": "https://calculators.geekmidst.com/calculators/corrected-calcium-calculator"
        },
        {
            "name": "Creatinine Clearance Calculator (Cockcroft–Gault)",
            "url": "https://calculators.geekmidst.com/calculators/creatinine-clearance-estimate-calculator"
        },
        {
            "name": "Molarity Calculator",
            "url": "https://calculators.geekmidst.com/calculators/molarity-calculator"
        }
    ],
    "disclaimer": "This is a general screening estimate for adults, not medical advice or a diagnosis. Talk to a qualified health professional about your health.",
    "publisher": "GM¹X CalcVerse"
}