{"uid":"cap_1EUpCreG0BhbXOCpHTqqp","slug":"bicarbonate-deficit-calculator-adrogu-madias-ecc56f45","name":"Bicarbonate Deficit Calculator (Adrogué–Madias)","description":"Bicarbonate deficit from weight and measured HCO3 using Adrogué–Madias 50 percent body-weight space. Deterministic published arithmetic with citation; not a dosing protocol.","url":"https://api.magentlab.com/api/calc/bicarbonate_deficit","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","required":["bicarbonate_mmol_l"],"properties":{"weight_kg":{"type":"number","description":"Weight in kilograms. Provide weight_kg or weight_lb."},"weight_lb":{"type":"number","description":"Weight in pounds. Converted as kg = lb * 0.45359237."},"bicarbonate_mmol_l":{"type":"number","description":"Measured plasma bicarbonate in mmol/L (same as mEq/L). Range 2-45."},"desired_hco3_mmol_l":{"type":"number","description":"Target plasma bicarbonate in mmol/L (8-30), must exceed measured HCO3. Omitted uses 24."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"path":"/api/calc/bicarbonate_deficit","count":2,"items":[{"formula":"adrogue_madias","citation":{"id":"adrogue-madias-1998","doi":"10.1056/NEJM199801013380106","title":"Management of life-threatening acid-base disorders. First of two parts","source":"N Engl J Med. 1998;338(1):26-34","authors":"Adrogué HJ, Madias NE"},"weight_kg":70,"disclaimer":"Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.","deficit_meq":140,"bicarbonate_mmol_l":4,"formula_expression":"bicarbonate_space_L = 0.5 * weight_kg; deficit_mEq = bicarbonate_space_L * (desired_hco3 - measured_hco3)","bicarbonate_space_l":35,"desired_hco3_mmol_l":8},{"formula":"adrogue_madias","citation":{"id":"adrogue-madias-1998","doi":"10.1056/NEJM199801013380106","title":"Management of life-threatening acid-base disorders. First of two parts","source":"N Engl J Med. 1998;338(1):26-34","authors":"Adrogué HJ, Madias NE"},"weight_kg":70,"disclaimer":"Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.","deficit_meq":140,"bicarbonate_mmol_l":4,"formula_expression":"bicarbonate_space_L = 0.5 * weight_kg; deficit_mEq = bicarbonate_space_L * (desired_hco3 - measured_hco3)","bicarbonate_space_l":35,"desired_hco3_mmol_l":8}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_7J0LZYGTf5sqerjFyr1yI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the bicarbonate deficit from patient weight and measured plasma HCO3 using the Adrogué–Madias 50% body-weight space formula.","exampleAgentPrompt":"What's the bicarbonate deficit for a 70 kg patient with a measured plasma bicarbonate of 12 mmol/L, targeting 24 mmol/L? Use the Adrogué–Madias formula.","exampleUseCases":[{"title":"ICU metabolic acidosis correction","prompt":"My ICU patient weighs 85 kg and has a plasma bicarbonate of 10 mmol/L. Using the Adrogué–Madias 50% body-weight formula, what is their bicarbonate deficit if we're targeting 24 mmol/L?"},{"title":"ED bicarb deficit for DKA workup","prompt":"I have a 60 kg patient in the ED with a measured HCO3 of 8 mmol/L. Can you calculate the bicarbonate deficit using the standard formula, targeting a bicarb of 18 mmol/L?"},{"title":"Nephrology consult bicarb space estimation","prompt":"Patient is 155 lbs with a plasma bicarbonate of 16 mmol/L and we want to target 24 mmol/L. What does the Adrogué–Madias formula give for bicarbonate deficit?"}],"resultDescription":"Returns the calculated bicarbonate deficit in mmol based on the Adrogué–Madias formula (deficit = 0.5 × weight_kg × (desired_HCO3 − measured_HCO3)), along with the formula citation and input echo. This is a deterministic arithmetic result, not a clinical dosing protocol.","failureModes":["Missing required bicarbonate_mmol_l parameter returns a 400 error","bicarbonate_mmol_l outside the valid range of 2–45 mmol/L returns a validation error","desired_hco3_mmol_l must exceed measured HCO3 or the calculation is invalid","desired_hco3_mmol_l outside 8–30 mmol/L range rejected","Neither weight_kg nor weight_lb provided may result in a missing-weight error","Payment not attached or insufficient USDC (x402) returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, citation-backed bicarbonate deficit calculation using the Adrogué–Madias 50% body-weight distribution model. It is ideal for clinical decision-support agents, medical education tools, or audit workflows where reproducibility and published formula provenance matter. It is not a dosing protocol and should not replace clinical judgment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:17:15.507Z","isFirstParty":false}