{"uid":"cap_pdMZ8V0ELDILkBXY0jwQS","slug":"stool-osmotic-gap-calculator-eherer-fordtran-1992-63c72251","name":"Stool Osmotic Gap Calculator (Eherer–Fordtran 1992)","description":"Eherer–Fordtran 1992 fecal osmotic gap: stool osmolality minus 2×(stool Na + stool K). Assumed stool osm 290 mOsm/kg when measured osm is omitted. Deterministic published arithmetic with citation; not a diagnosis of osmotic versus secretory diarrhea.","url":"https://api.magentlab.com/api/calc/stool_osmotic_gap","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":["stool_sodium_mmol_l","stool_potassium_mmol_l"],"properties":{"stool_osm_mosm_kg":{"type":"number","description":"Measured stool osmolality in mOsm/kg (200-600). When omitted, 290 mOsm/kg is assumed."},"stool_sodium_mmol_l":{"type":"number","description":"Stool sodium in mmol/L (1-150)."},"stool_potassium_mmol_l":{"type":"number","description":"Stool potassium in mmol/L (1-150)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"path":"/api/calc/stool_osmotic_gap","count":2,"items":[{"formula":"eherer_fordtran","citation":{"id":"eherer-fordtran-1992","doi":"10.1016/0016-5085(92)90845-P","title":"Fecal osmotic gap and pH in experimental diarrhea of various causes","source":"Gastroenterology. 1992;103(2):545-551","authors":"Eherer AJ, Fordtran JS"},"gap_gt_50":true,"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.","osmotic_gap":80,"stool_osm_mosm_kg":290,"assumed_osmolality":true,"formula_expression":"osmotic_gap = stool_osm_mosm_kg - 2 * (stool_sodium_mmol_l + stool_potassium_mmol_l)","stool_sodium_mmol_l":30,"stool_potassium_mmol_l":75},{"formula":"eherer_fordtran","citation":{"id":"eherer-fordtran-1992","doi":"10.1016/0016-5085(92)90845-P","title":"Fecal osmotic gap and pH in experimental diarrhea of various causes","source":"Gastroenterology. 1992;103(2):545-551","authors":"Eherer AJ, Fordtran JS"},"gap_gt_50":true,"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.","osmotic_gap":80,"stool_osm_mosm_kg":290,"assumed_osmolality":true,"formula_expression":"osmotic_gap = stool_osm_mosm_kg - 2 * (stool_sodium_mmol_l + stool_potassium_mmol_l)","stool_sodium_mmol_l":30,"stool_potassium_mmol_l":75}]}},"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_--q8XGhMu9vLHinbPQnjY","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":"Computes the fecal osmotic gap using the Eherer–Fordtran 1992 formula: stool osmolality minus 2×(stool Na + stool K), defaulting stool osm to 290 mOsm/kg if not provided.","exampleAgentPrompt":"Calculate the stool osmotic gap for a patient with stool sodium of 45 mmol/L and stool potassium of 20 mmol/L — use the assumed osmolality of 290 mOsm/kg since we don't have a measured value.","exampleUseCases":[{"title":"Diarrhea workup in hospital patient","prompt":"My patient has chronic watery diarrhea and the stool electrolytes came back: sodium 20 mmol/L, potassium 10 mmol/L. We didn't measure stool osmolality. What's the fecal osmotic gap?"},{"title":"Using measured stool osmolality","prompt":"I have a full stool electrolyte panel: sodium 55 mmol/L, potassium 25 mmol/L, and measured osmolality of 310 mOsm/kg. Can you compute the osmotic gap using the Eherer–Fordtran formula?"},{"title":"Automated GI report enrichment","prompt":"For this patient's stool report — Na 30 mmol/L, K 18 mmol/L, no osmolality recorded — calculate the fecal osmotic gap and include the result in the clinical summary."}],"resultDescription":"Returns the computed fecal osmotic gap in mOsm/kg as a numeric value based on the Eherer–Fordtran 1992 formula (stool osmolality − 2 × [stool Na + stool K]), with stool osmolality defaulting to 290 mOsm/kg if not supplied. The result is a deterministic arithmetic output; it does not render a clinical diagnosis of osmotic vs. secretory diarrhea.","failureModes":["Missing required stool_sodium_mmol_l or stool_potassium_mmol_l parameters returns a 400 error","Values outside the accepted range (Na or K: 1–150 mmol/L; osm: 200–600 mOsm/kg) may be rejected or return an error","Non-numeric inputs for any parameter will cause a validation failure","Payment failure (402) if x402 USDC payment header is missing or rejected"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, citation-backed fecal osmotic gap calculation from stool electrolytes following the Eherer–Fordtran 1992 method. Ideal for clinical decision-support pipelines, automated lab report enrichment, or bedside GI workup tools where a reliable published formula is required. Prefer this over manual calculation when stool osmolality may be missing and the 290 mOsm/kg default assumption is acceptable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:09:44.430Z","isFirstParty":false}