LIVE
Morphine milligram equivalents (CDC 2022)
Morphine milligram equivalents
Compute morphine milligram equivalents from a CDC 2022 table opioid and daily dose (or transdermal fentanyl mcg/hr).
Also searched as
- MME calculator
- morphine milligram equivalent
- morphine equivalent dose
- CDC opioid MME
- hydrocodone MME
- oxycodone MME
- fentanyl patch MME
- methadone MME factor
Markdown: /docs/mme.md · Canonical: https://magentlab.com/docs/mme
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute morphine milligram equivalents from a CDC 2022 table opioid and daily dose (or transdermal fentanyl mcg/hr).
When to use
When an agent needs published CDC 2022 MME arithmetic and must not invent conversion factors or convert one opioid to another.
When not to use
- All doses are mg/day except fentanyl_transdermal, which is mcg/hr.
- MME values are estimates only and do not account for individual variability.
- Do not use MME to convert one opioid to another or to choose a replacement dose.
- The methadone conversion factor is an estimate; it increases at higher methadone doses.
- Transdermal fentanyl absorption can increase with fever or heat.
- Buprenorphine is not in the CDC 2022 table and is rejected.
- Not for opioid use disorder (OUD) dosing of methadone or buprenorphine.
- Analytic MME only; not a taper protocol, diagnosis, or dosing recommendation.
Formula
mme = dose * conversion_factor (dose is mg/day except fentanyl_transdermal in mcg/hr)
Citation
- Authors
- Dowell D, Ragan KR, Jones CM, Baldwin GT, Chou R
- Source
- MMWR Recomm Rep. 2022;71(No. RR-3):1-95
Worked example
CDC hydrocodone 20 mg/day
Given:
dose=20opioid=hydrocodone
- CDC 2022 conversion factor for hydrocodone is 1.0
- mme = 20 * 1.0 = 20
CDC oxycodone 20 mg/day
Given:
dose=20opioid=oxycodone
- CDC 2022 conversion factor for oxycodone is 1.5
- mme = 20 * 1.5 = 30
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
/api/calc/mme?opioid=hydrocodone&dose=20
Full URL: https://api.magentlab.com/api/calc/mme?opioid=hydrocodone&dose=20
Call
Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params
return HTTP 400 before any quote or charge.
curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/mme?opioid=hydrocodone&dose=20"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
opioid |
string | required · codeine, fentanyl_transdermal, hydrocodone, hydromorphone, methadone, morphine, oxycodone, oxymorphone, tapentadol, tramadol | CDC 2022 MME table key (case-insensitive exact match). Not a brand name or alias. |
dose |
number | required | Daily opioid dose in mg/day (0.1-5000), or fentanyl_transdermal patch rate in mcg/hr (12-300). |
Bulk (POST)
POST the same path with a JSON items array. Price is n times the GET unit. Invalid items return HTTP 400 before settlement.
- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
- HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
- Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
- x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.
Example request (fixture)
{
"items": [
{
"dose": "20",
"opioid": "hydrocodone"
},
{
"dose": "20",
"opioid": "hydrocodone"
}
]
}
Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.
Example 200 (fixture)
{
"count": 2,
"path": "/api/calc/mme",
"items": [
{
"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.",
"citation": {
"authors": "Dowell D, Ragan KR, Jones CM, Baldwin GT, Chou R",
"doi": "10.15585/mmwr.rr7103a1",
"id": "cdc-mme-2022",
"source": "MMWR Recomm Rep. 2022;71(No. RR-3):1-95",
"title": "CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022"
},
"formula": "mme",
"formula_expression": "mme = dose * conversion_factor (dose is mg/day except fentanyl_transdermal in mcg/hr)",
"conversion_factor": 1.0,
"dose": 20.0,
"dose_unit": "mg/day",
"mme": 20.0,
"opioid": "hydrocodone"
},
{
"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.",
"citation": {
"authors": "Dowell D, Ragan KR, Jones CM, Baldwin GT, Chou R",
"doi": "10.15585/mmwr.rr7103a1",
"id": "cdc-mme-2022",
"source": "MMWR Recomm Rep. 2022;71(No. RR-3):1-95",
"title": "CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022"
},
"formula": "mme",
"formula_expression": "mme = dose * conversion_factor (dose is mg/day except fentanyl_transdermal in mcg/hr)",
"conversion_factor": 1.0,
"dose": 20.0,
"dose_unit": "mg/day",
"mme": 20.0,
"opioid": "hydrocodone"
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | mme |
formula_expression |
string | mme = dose * conversion_factor with CDC units note |
opioid |
string | Normalized CDC 2022 table key |
dose |
number | Parsed dose (mg/day, or mcg/hr for fentanyl_transdermal) |
dose_unit |
string | mg/day, or mcg/hr for fentanyl_transdermal |
conversion_factor |
number | CDC 2022 table conversion factor for that opioid |
mme |
number | Morphine milligram equivalents, 4 decimal max |
citation |
object | CDC 2022 MMWR MME table |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"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.",
"citation": {
"authors": "Dowell D, Ragan KR, Jones CM, Baldwin GT, Chou R",
"doi": "10.15585/mmwr.rr7103a1",
"id": "cdc-mme-2022",
"source": "MMWR Recomm Rep. 2022;71(No. RR-3):1-95",
"title": "CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022"
},
"formula": "mme",
"formula_expression": "mme = dose * conversion_factor (dose is mg/day except fentanyl_transdermal in mcg/hr)",
"conversion_factor": 1.0,
"dose": 20.0,
"dose_unit": "mg/day",
"mme": 20.0,
"opioid": "hydrocodone"
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_opioid |
opioid must be codeine, fentanyl_transdermal, hydrocodone, hydromorphone, methadone, morphine, oxycodone, oxymorphone, tapentadol, or tramadol. Returned before settlement; you are not charged. |
| 400 | invalid_opioid_dose |
dose must be a number in range for that opioid (mg/day, or mcg/hr for fentanyl_transdermal). Returned before settlement; you are not charged. |
| 400 | invalid_items |
POST body must be a JSON object with only an items array Returned before settlement; you are not charged. |
| 400 | invalid_item_count |
items must be an array of 1 to 25 objects Returned before settlement; you are not charged. |
| 400 | invalid_item |
each items entry must be a JSON object Returned before settlement; you are not charged. |
Related tools
- Glucocorticoid dose conversion — Convert a glucocorticoid dose among hydrocortisone, prednisone, and dexamethasone using Meikle 1977 equivalent doses (20 mg : 5 mg : 0.75 mg).
Payment
Required query parameters must be present and valid. Invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64
PAYMENT-REQUIRED
header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake
and shared payment errors: Payments.
Stdio MCP: /docs/mcp.
Guarantees
- Invalid query parameters return HTTP 400 before settlement. You are not charged.
- Settlement finishes before the tool executes (paymentFlow upfront). Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
- HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
- Execution is timeout-bounded and concurrency-capped.
- Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.