{"uid":"cap_aCrjsbTOWplq9TVaov76c","slug":"homa-ir-calculator-fe31691d","name":"HOMA-IR Calculator","description":"HOMA-IR as (fasting glucose in mmol/L × insulin in µU/mL) / 22.5 (Matthews et al. 1985). Provide glucose_mg_dl (50–1000) or glucose_mmol_l (2.8–55.5), not both; mg/dL converts as mmol/L = mg/dL / 18. Returns the approximation rounded to two decimals. Not HOMA-B, not the HOMA2 computer model, not a diabetes diagnosis, and not an insulin-resistance cutoff.","url":"https://api.magentlab.com/api/calc/homa_ir","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":["insulin_uu_ml"],"properties":{"glucose_mg_dl":{"type":"number","description":"Fasting plasma glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both."},"insulin_uu_ml":{"type":"number","description":"Fasting insulin in µU/mL (= mU/L) (0.1-500)."},"glucose_mmol_l":{"type":"number","description":"Fasting plasma glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"path":"/api/calc/homa_ir","count":2,"items":[{"formula":"homa_ir","homa_ir":2.22,"citation":{"id":"matthews-1985","doi":"10.1007/BF00280883","title":"Homeostasis model assessment: insulin resistance and beta-cell function from fasting plasma glucose and insulin concentrations in man","source":"Diabetologia. 1985;28(7):412-419","authors":"Matthews DR, Hosker JP, Rudenski AS, Naylor BA, Treacher DF, Turner RC"},"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.","insulin_uu_ml":10,"glucose_mmol_l":5,"formula_expression":"homa_ir = (glucose_mmol_l * insulin_uu_ml) / 22.5"},{"formula":"homa_ir","homa_ir":2.22,"citation":{"id":"matthews-1985","doi":"10.1007/BF00280883","title":"Homeostasis model assessment: insulin resistance and beta-cell function from fasting plasma glucose and insulin concentrations in man","source":"Diabetologia. 1985;28(7):412-419","authors":"Matthews DR, Hosker JP, Rudenski AS, Naylor BA, Treacher DF, Turner RC"},"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.","insulin_uu_ml":10,"glucose_mmol_l":5,"formula_expression":"homa_ir = (glucose_mmol_l * insulin_uu_ml) / 22.5"}]}},"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_GBKDuDZP7JAS-1MdUZ4_Q","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 Homeostatic Model Assessment of Insulin Resistance (HOMA-IR) score from fasting glucose and fasting insulin values using the Matthews 1985 formula.","exampleAgentPrompt":"Can you calculate the HOMA-IR score for a patient with a fasting glucose of 95 mg/dL and a fasting insulin of 14 µU/mL?","exampleUseCases":[{"title":"Pre-diabetes metabolic screening","prompt":"My patient has a fasting glucose of 108 mg/dL and fasting insulin of 18 µU/mL — can you calculate their HOMA-IR score to screen for insulin resistance?"},{"title":"Tracking insulin resistance over time","prompt":"My last fasting labs came back: glucose was 5.8 mmol/L and insulin was 10 µU/mL. What's my HOMA-IR score so I can compare it to my reading from last quarter?"},{"title":"Population health data pipeline enrichment","prompt":"I have a spreadsheet of patient fasting labs — for the first patient, fasting glucose is 88 mg/dL and fasting insulin is 9.5 µU/mL. Calculate the HOMA-IR score so I can flag high-risk individuals."}],"resultDescription":"Returns a single HOMA-IR numeric value rounded to two decimal places, computed as (glucose in mmol/L × insulin in µU/mL) / 22.5. Does not include diagnostic interpretation, HOMA-B, or HOMA2 model output.","failureModes":["Both glucose_mg_dl and glucose_mmol_l provided simultaneously — endpoint expects exactly one","Glucose value out of range (mg/dL: 50–1000; mmol/L: 2.8–55.5) — validation error","Insulin value out of range (0.1–500 µU/mL) — validation error","Missing required insulin_uu_ml parameter — request rejected","Missing glucose parameter entirely — request rejected"],"whenToPreferThis":"Use this endpoint when you need a quick, standards-referenced HOMA-IR calculation (Matthews 1985) for a single patient or data record using either mg/dL or mmol/L glucose units. Prefer this over manual computation when glucose unit conversion reliability matters or when embedding clinical calculators in automated workflows. Not suitable when HOMA2 model precision or HOMA-B beta-cell function is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:59:02.606Z","isFirstParty":false}