{
  "id": "nnt",
  "version": "217c47adcb1f",
  "status": "published",
  "name": "NNT Calculator",
  "question": "What is the NNT?",
  "summary": "Computes the number needed to treat (NNT = 1 ÷ absolute risk reduction) from event counts or event rates in a control and a treated group, with the relative risk reduction.",
  "category": "statistics",
  "subcategory": "probability",
  "url": "https://www.acalculator.org/statistics/nnt-calculator",
  "markdown": "https://www.acalculator.org/statistics/nnt-calculator.md",
  "kind": "function",
  "method": "CER = control events ÷ control group; EER = treated events ÷ treated group; ARR = CER − EER; NNT = 1 ÷ |ARR| (NNTB when ARR > 0, NNTH when ARR < 0); RRR = ARR ÷ CER; RR = EER ÷ CER.",
  "assumptions": [
    "The events are bad outcomes (deaths, strokes), so a lower rate in the treated group is a benefit.",
    "Both groups are followed for the same length of time; the NNT applies to that time.",
    "Rounding up to whole people is a page choice; the exact NNT is shown too."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "mode": {
        "title": "I have",
        "description": "Type event counts for each group, or the event rates as percents.",
        "type": "string",
        "enum": [
          "counts",
          "rates"
        ]
      },
      "ce": {
        "title": "Control group: events",
        "description": "People in the control group who had the bad outcome.",
        "type": "integer",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "cn": {
        "title": "Control group: people",
        "description": "Everyone in the control group.",
        "type": "integer",
        "minimum": 1,
        "maximum": 1000000000000
      },
      "te": {
        "title": "Treated group: events",
        "description": "People in the treated group who had the bad outcome.",
        "type": "integer",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "tn": {
        "title": "Treated group: people",
        "description": "Everyone in the treated group.",
        "type": "integer",
        "minimum": 1,
        "maximum": 1000000000000
      },
      "cer": {
        "title": "Control event rate (CER)",
        "description": "The share of the control group with the outcome, in percent.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      },
      "eer": {
        "title": "Treated event rate (EER)",
        "description": "The share of the treated group with the outcome, in percent.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      }
    }
  },
  "outputs": {
    "nnt": {
      "label": "Number needed to treat",
      "description": "1 ÷ |ARR|: how many people must be treated for one fewer (or, for a harm, one more) bad outcome.",
      "format": "number"
    },
    "whole": {
      "label": "Rounded up to whole people",
      "description": "The NNT rounded up to the next whole number.",
      "format": "integer"
    },
    "kind": {
      "label": "Benefit or harm",
      "description": "NNTB when the treatment lowers the event rate, NNTH when it raises it.",
      "format": "text"
    },
    "cer": {
      "label": "Control event rate",
      "description": "Control events ÷ control group, in percent.",
      "format": "percent"
    },
    "eer": {
      "label": "Treated event rate",
      "description": "Treated events ÷ treated group, in percent.",
      "format": "percent"
    },
    "arr": {
      "label": "Absolute risk reduction",
      "description": "CER − EER, in percentage points; negative for a harm.",
      "format": "percent"
    },
    "rrr": {
      "label": "Relative risk reduction",
      "description": "(CER − EER) ÷ CER, in percent.",
      "format": "percent"
    },
    "rr": {
      "label": "Relative risk",
      "description": "EER ÷ CER.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "mode": "counts",
      "ce": 20,
      "cn": 100,
      "te": 10,
      "tn": 100,
      "cer": 20,
      "eer": 10
    },
    "outputs": {
      "nnt": 10,
      "whole": 10,
      "kind": "NNTB, a benefit",
      "cer": 20,
      "eer": 10,
      "arr": 10,
      "rrr": 50,
      "rr": 0.5
    },
    "text": "The number needed to treat is 10 (NNTB, a benefit)."
  },
  "examples": [
    {
      "given": {
        "mode": "counts",
        "ce": 20,
        "cn": 100,
        "te": 10,
        "tn": 100
      },
      "expect": {
        "nnt": 10,
        "whole": 10,
        "arr": 10,
        "rrr": 50,
        "rr": 0.5
      },
      "source": "Altman DG. Confidence intervals for the number needed to treat. BMJ 1998;317:1309 (ARR 10% gives NNT 100 ÷ 10 = 10); https://pmc.ncbi.nlm.nih.gov/articles/PMC1114210/"
    },
    {
      "given": {
        "mode": "rates",
        "cer": 10,
        "eer": 18
      },
      "expect": {
        "nnt": 12.5,
        "whole": 13,
        "arr": -8,
        "kind": "NNTH, a harm"
      },
      "source": "Altman DG. Confidence intervals for the number needed to treat. BMJ 1998;317:1309 (Tramèr et al.’s ARR of −0.08 gives an NNT of −12.5, an NNTH of 12.5; Altman gives no event rates, so 10% and 18% are example rates with that ARR); https://pmc.ncbi.nlm.nih.gov/articles/PMC1114210/"
    },
    {
      "given": {
        "mode": "counts",
        "ce": 15,
        "cn": 120,
        "te": 9,
        "tn": 130
      },
      "expect": {
        "nnt": 17.931034482758623,
        "whole": 18,
        "cer": 12.5
      },
      "source": "Altman DG, BMJ 1998;317:1309 (NNT = 1 ÷ ARR); hand calculation in content.mdx: 15/120 − 9/130 = 0.055769, 1 ÷ 0.055769 = 17.93; https://pmc.ncbi.nlm.nih.gov/articles/PMC1114210/",
      "tolerance": 1e-12
    }
  ],
  "sources": [
    "Altman DG. Confidence intervals for the number needed to treat. BMJ 1998;317:1309-1312, retrieved 2026-10-18. https://pmc.ncbi.nlm.nih.gov/articles/PMC1114210/",
    "Cook RJ, Sackett DL. The number needed to treat: a clinically useful measure of treatment effect. BMJ 1995;310:452-454, retrieved 2026-10-18. https://pmc.ncbi.nlm.nih.gov/articles/PMC2548824/"
  ],
  "related": [
    "odds-ratio",
    "sensitivity-specificity",
    "incidence-rate",
    "percentage-change"
  ],
  "changelog": []
}
