{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"anion-gap"},"result":{"entity_type":"calculator","id":"anion-gap","calculator_id":"anion-gap","canonical_url":"https://tttkmbb.com/medical/anion-gap","name":"Anion Gap Calculator","title":"Anion Gap Calculator – Serum Anion Gap with Potassium and Albumin Correction","category":"medical","category_name":"Medical & Clinical","tool_name":"calculate_anion_gap","featured_mcp_tool":false,"description":"Computes the serum anion gap from sodium, chloride and bicarbonate, optionally including potassium, and the albumin-corrected gap (Figge) for hypoalbuminaemia.","use_when":"You have a basic metabolic panel and want the anion gap to classify a metabolic acidosis or check for unmeasured anions.","do_not_use_when":"Electrolytes come from different samples or times, or you need a full acid-base interpretation (pH, pCO2, delta ratio), which this calculator does not perform.","inputs":[{"name":"sodium_mmol_l","label":"Sodium","type":"number","unit":"mmol/L","required":true,"min":100,"max":200,"description":"Serum sodium (mmol/L = mEq/L).","example":140},{"name":"chloride_mmol_l","label":"Chloride","type":"number","unit":"mmol/L","required":true,"min":50,"max":160,"description":"Serum chloride.","example":104},{"name":"bicarbonate_mmol_l","label":"Bicarbonate","type":"number","unit":"mmol/L","required":true,"min":1,"max":60,"description":"Serum bicarbonate (total CO2).","example":24},{"name":"potassium_mmol_l","label":"Potassium","type":"number","unit":"mmol/L","required":false,"min":1,"max":12,"description":"Optional serum potassium; adds the gap variant that includes K.","example":4},{"name":"albumin_g_dl","label":"Albumin","type":"number","unit":"g/dL","required":false,"max":7,"exclusive_min":0,"description":"Optional serum albumin in g/dL (g/L ÷ 10); enables the albumin-corrected gap.","example":3}],"outputs":[{"name":"anion_gap","label":"Anion gap","type":"number","unit":"mEq/L","decimals":1,"description":"Na − (Cl + HCO3)."},{"name":"anion_gap_with_potassium","label":"Anion gap including K","type":"number","unit":"mEq/L","decimals":1,"description":"Na + K − (Cl + HCO3); only when potassium is given (reference range about 4 mEq/L higher)."},{"name":"albumin_corrected_anion_gap","label":"Albumin-corrected gap","type":"number","unit":"mEq/L","decimals":1,"description":"Gap + 2.5 × (4 − albumin g/dL); only when albumin is given."},{"name":"interpretation","label":"Interpretation","type":"string","decimals":4,"description":"Low / normal / elevated against the traditional 8–16 mEq/L range (corrected gap when albumin is given)."}],"input_schema":{"type":"object","properties":{"sodium_mmol_l":{"description":"Serum sodium (mmol/L = mEq/L). Unit: mmol/L.","type":"number","minimum":100,"maximum":200,"examples":[140],"x-unit":"mmol/L"},"chloride_mmol_l":{"description":"Serum chloride. Unit: mmol/L.","type":"number","minimum":50,"maximum":160,"examples":[104],"x-unit":"mmol/L"},"bicarbonate_mmol_l":{"description":"Serum bicarbonate (total CO2). Unit: mmol/L.","type":"number","minimum":1,"maximum":60,"examples":[24],"x-unit":"mmol/L"},"potassium_mmol_l":{"description":"Optional serum potassium; adds the gap variant that includes K. Unit: mmol/L.","type":"number","minimum":1,"maximum":12,"examples":[4],"x-unit":"mmol/L"},"albumin_g_dl":{"description":"Optional serum albumin in g/dL (g/L ÷ 10); enables the albumin-corrected gap. Unit: g/dL.","type":"number","maximum":7,"exclusiveMinimum":0,"examples":[3],"x-unit":"g/dL"}},"additionalProperties":false,"required":["sodium_mmol_l","chloride_mmol_l","bicarbonate_mmol_l"]},"output_schema":{"type":"object","properties":{"anion_gap":{"description":"Na − (Cl + HCO3). Unit: mEq/L.","type":"number","x-unit":"mEq/L"},"anion_gap_with_potassium":{"description":"Na + K − (Cl + HCO3); only when potassium is given (reference range about 4 mEq/L higher). Unit: mEq/L.","type":"number","x-unit":"mEq/L"},"albumin_corrected_anion_gap":{"description":"Gap + 2.5 × (4 − albumin g/dL); only when albumin is given. Unit: mEq/L.","type":"number","x-unit":"mEq/L"},"interpretation":{"description":"Low / normal / elevated against the traditional 8–16 mEq/L range (corrected gap when albumin is given).","type":"string"}}},"formula":"anion_gap = sodium − (chloride + bicarbonate); with potassium: sodium + potassium − (chloride + bicarbonate); albumin-corrected gap = anion_gap + 2.5 × (4.0 − albumin_g_dl)","method":"Reference ranges depend on the analyser (traditional 8–16 mEq/L; ion-selective electrodes often give 3–11), so compare with the local laboratory range; each 1 g/dL fall in albumin lowers the expected gap by about 2.5 mEq/L (Figge 1998). Results are informational only and not a substitute for clinical judgement or medical advice.","sources":[{"name":"Kraut JA, Madias NE (2007) Serum anion gap: its uses and limitations in clinical medicine, Clin J Am Soc Nephrol 2:162-174","url":"https://pubmed.ncbi.nlm.nih.gov/17699401/","type":"peer_reviewed","retrieved_at":"2026-09-24"},{"name":"Figge J, Jabor A, Kazda A, Fencl V (1998) Anion gap and hypoalbuminemia, Crit Care Med 26:1807-1810","url":"https://pubmed.ncbi.nlm.nih.gov/9824071/","type":"peer_reviewed","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"Na 140, Cl 104, HCO3 24, K 4.0, albumin 3.0","inputs":{"sodium_mmol_l":140,"chloride_mmol_l":104,"bicarbonate_mmol_l":24,"potassium_mmol_l":4,"albumin_g_dl":3},"expected":{"anion_gap":12,"anion_gap_with_potassium":16,"albumin_corrected_anion_gap":14.5,"interpretation":"Normal (8–16 mEq/L, albumin-corrected)"},"url":"https://tttkmbb.com/api/v1/calculate/anion-gap?sodium_mmol_l=140&chloride_mmol_l=104&bicarbonate_mmol_l=24&potassium_mmol_l=4&albumin_g_dl=3"},{"name":"Na 135, Cl 100, HCO3 10","inputs":{"sodium_mmol_l":135,"chloride_mmol_l":100,"bicarbonate_mmol_l":10},"expected":{"anion_gap":25,"interpretation":"Elevated (>16 mEq/L): pattern of a high anion gap metabolic acidosis"},"url":"https://tttkmbb.com/api/v1/calculate/anion-gap?sodium_mmol_l=135&chloride_mmol_l=100&bicarbonate_mmol_l=10"}],"faq":[{"q":"Should potassium be included?","a":"Most laboratories and textbooks omit potassium (normal about 8–16 mEq/L); including it raises the value by roughly 4 mEq/L, so use the matching reference range (about 12–20)."},{"q":"Why correct for albumin?","a":"Albumin is the main unmeasured anion; in hypoalbuminaemia a 'normal' gap can hide an excess of other anions such as lactate or ketoacids."}],"tags":["anion gap","metabolic acidosis","albumin corrected anion gap","electrolytes","bicarbonate"],"related":[{"calculator_id":"corrected-sodium","reason":"Correct sodium for hyperglycaemia before interpreting electrolytes."},{"calculator_id":"corrected-calcium","reason":"Another albumin-dependent correction."}],"links":{"html":"https://tttkmbb.com/medical/anion-gap","markdown":"https://tttkmbb.com/medical/anion-gap.md","json":"https://tttkmbb.com/medical/anion-gap.json","api":"https://tttkmbb.com/api/v1/calculate/anion-gap","schema":"https://tttkmbb.com/api/v1/calculators/anion-gap","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T01:48:08Z","next_actions":[{"tool":"run_calculator","calculator_id":"anion-gap","reason":"Run Anion Gap Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/medical/anion-gap.md"}}