{"uid":"cap_qALGTWf11pwZOGGB5KAkO","slug":"serum-osmolality-calculator-worthley-1987-osmolar-gap-f6029937","name":"Serum Osmolality Calculator (Worthley 1987 + Osmolar Gap)","description":"Worthley 1987 calculated serum osmolality: 2×Na + glucose/18 + BUN/2.8. Optional osmolar gap when a measured osm is supplied. Deterministic published arithmetic with citation; not a measured freezing-point osmometer or a diagnosis.","url":"https://api.magentlab.com/api/calc/serum_osmolality","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":["sodium_mmol_l","bun_mg_dl"],"properties":{"bun_mg_dl":{"type":"number","description":"Blood urea nitrogen in mg/dL (1-200)."},"glucose_mg_dl":{"type":"number","description":"Plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l."},"sodium_mmol_l":{"type":"number","description":"Serum sodium in mmol/L (110-160)."},"glucose_mmol_l":{"type":"number","description":"Plasma glucose in mmol/L (2.8-55.5). Converted as mg/dL = mmol/L * 18.015."},"measured_osm_mosm_kg":{"type":"number","description":"Measured serum osmolality in mOsm/kg (200-400). When supplied, osm_gap_mosm_kg is returned."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"path":"/api/calc/serum_osmolality","count":2,"items":[{"formula":"worthley","citation":{"id":"worthley-1987","doi":"10.1177/0310057X8701500214","title":"For calculating osmolality, the simplest formula is the best","source":"Anaesth Intensive Care. 1987;15(2):199-202","authors":"Worthley LI, Guerin M, Pain RW"},"bun_mg_dl":14,"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.","glucose_mg_dl":90,"sodium_mmol_l":140,"formula_expression":"calculated_osm_mosm_kg = 2 * sodium_mmol_l + glucose_mg_dl / 18 + bun_mg_dl / 2.8","calculated_osm_mosm_kg":290},{"formula":"worthley","citation":{"id":"worthley-1987","doi":"10.1177/0310057X8701500214","title":"For calculating osmolality, the simplest formula is the best","source":"Anaesth Intensive Care. 1987;15(2):199-202","authors":"Worthley LI, Guerin M, Pain RW"},"bun_mg_dl":14,"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.","glucose_mg_dl":90,"sodium_mmol_l":140,"formula_expression":"calculated_osm_mosm_kg = 2 * sodium_mmol_l + glucose_mg_dl / 18 + bun_mg_dl / 2.8","calculated_osm_mosm_kg":290}]}},"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_RDZ-qP4EExHMJNO0qsmVR","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 estimated serum osmolality using the Worthley 1987 formula (2×Na + glucose/18 + BUN/2.8) and optionally computes the osmolar gap when a measured osmolality is provided.","exampleAgentPrompt":"Calculate the estimated serum osmolality for a patient with sodium 138 mmol/L, BUN 22 mg/dL, and glucose 108 mg/dL — and if the measured osmolality came back at 310 mOsm/kg, include the osmolar gap too.","exampleUseCases":[{"title":"Osmolar gap screen for toxic alcohol","prompt":"My patient has sodium 140, BUN 18, glucose 95 mg/dL, and the lab measured osmolality at 325 mOsm/kg — can you calculate the osmolar gap so I can assess for possible toxic alcohol ingestion?"},{"title":"Hypernatremia workup osmolality","prompt":"Run the Worthley serum osmolality on these labs: sodium 155 mmol/L, BUN 35 mg/dL, glucose 180 mg/dL. No measured osm available."},{"title":"ICU fluid management check","prompt":"For an ICU patient with sodium 132, BUN 28 mg/dL, and glucose 210 mg/dL, calculate their estimated serum osmolality — and the osmolar gap if the measured value is 295 mOsm/kg."}],"resultDescription":"Returns the calculated serum osmolality in mOsm/kg using the Worthley 1987 formula (2×Na + glucose/18 + BUN/2.8). When a measured osmolality is supplied, also returns the osmolar gap (measured minus calculated). Includes citation metadata confirming the deterministic arithmetic used.","failureModes":["Missing required parameters (sodium_mmol_l or bun_mg_dl not provided) — returns validation error","Sodium out of range (110–160 mmol/L) — returns range error","BUN out of range (1–200 mg/dL) — returns range error","Glucose out of range (50–1000 mg/dL or 2.8–55.5 mmol/L) — returns range error","Measured osmolality out of range (200–400 mOsm/kg) — returns range error","Payment not completed (x402 protocol) — returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a fast, deterministic, citation-backed serum osmolality calculation following the Worthley 1987 formula, especially when you also want an osmolar gap derived from a measured value. Prefer this over manual arithmetic to ensure correct unit conversions (glucose mmol/L support) and validated input ranges. Not a substitute for a freezing-point osmometer or clinical diagnosis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:11:14.707Z","isFirstParty":false}