Skip to main content
v2026.11,986 entries · CC-BY 4.0

How to Calculate Number Needed to Treat

Step-by-step guide to calculating number needed to treat (NNT) from risk differences, risk ratios, and odds ratios, with worked examples and APA reporting.

Written and maintained by CASRAI Editorial Board

Published · Last updated

On this page

The number needed to treat (NNT) is an epidemiological metric that reflects the average number of patients who must receive a specific intervention rather than a control condition for one additional patient to experience a beneficial outcome—or avoid an adverse event—over a defined time frame. Calculating NNT requires determining the absolute risk reduction (ARR), also termed the risk difference (RD), between the control event rate (CER) and the experimental event rate (EER), and calculating its reciprocal: NNT = 1 / ARR. Understanding how to calculate number needed to treat allows clinical researchers and systematic reviewers to translate relative effect sizes into patient-level therapeutic impact.

Definition of Number Needed to Treat

The number needed to treat expresses the absolute therapeutic impact of an intervention in terms of natural patient frequencies. Introduced by Laupacis, Sackett, and Roberts (1988), NNT bridges statistical significance and clinical utility. While relative measures like the risk ratio often remain stable across risk strata, absolute measures directly reflect baseline event frequencies. Per the Cochrane Handbook for Systematic Reviews of Interventions (Section 15.4.2), NNT represents an expected value rather than a guarantee for every cohort; it is a comparative measure tied to a specific comparator and time frame, not a static pharmacological property.

Formula for Calculating Number Needed to Treat

The formula used to calculate NNT depends on the summary effect measure available from primary study reports or meta-analyses.

1. Calculation from Absolute Risk Reduction

In parallel-group trials, NNT is the reciprocal of absolute risk reduction:

ARR = CER - EER
NNT = 1 / ARR

Where:

  • CER (Control Event Rate): Proportion of control participants experiencing the event: events_control / total_control.
  • EER (Experimental Event Rate): Proportion of treatment participants experiencing the event: events_treatment / total_treatment.
  • ARR (Absolute Risk Reduction): The difference CER - EER. If expressed as a percentage, NNT = 100 / ARR%.

By international biostatistical convention, fractional NNT values are rounded up to the next positive whole integer.

2. Computing NNT from Relative Risk and Baseline Risk

In systematic reviews, pooled findings are often reported as a relative risk (RR). The Cochrane Handbook (Section 15.4.4.2) specifies converting pooled RR to absolute risk across levels of Assumed Comparator Risk (ACR):

RD = ACR × (1 - RR)
NNT = 1 / (ACR × (1 - RR))

Here, ACR is the expected control event rate and RR is the pooled risk ratio (EER / CER).

3. Computing NNT from Odds Ratio

When synthesizing studies reporting an odds ratio (OR), such as in an odds ratio vs. risk ratio appraisal, the risk difference accounts for odds-to-probability non-linearity (Cochrane Handbook Section 15.4.4.3):

RD = ACR - (ACR × OR) / (1 - ACR + (ACR × OR))
NNT = 1 / |RD|

Worked Example: Calculating NNT from Clinical Trial Data

Consider a randomized trial assessing a novel antithrombotic agent for preventing secondary stroke over 12 months, with trial flow tracked in a CONSORT flow diagram.

Study Arm Patients (N) Stroke Events (n) Event Rate
Control Group (Standard Care) 1,000 120 CER = 120 / 1,000 = 0.120 (12.0%)
Treatment Group (Novel Agent) 1,000 70 EER = 70 / 1,000 = 0.070 (7.0%)

Step 1: Compute Absolute Risk Reduction

ARR = CER - EER = 0.120 - 0.070 = 0.050 (5.0 percentage points)

Step 2: Invert Absolute Risk Reduction

NNT = 1 / ARR = 1 / 0.050 = 20

Clinical Interpretation: Twenty patients must receive the novel agent for 12 months rather than standard care to prevent one additional stroke.

Step 3: Calculate 95% Confidence Intervals

Following Altman (1998), the standard error of the risk difference (SE_RD) is:

SE_RD = sqrt[(0.12 × 0.88 / 1000) + (0.07 × 0.93 / 1000)] = sqrt[0.0001707] ≈ 0.013065
95% CI for ARR = 0.050 ± (1.96 × 0.013065) = [0.0244, 0.0756]

Inverting the ARR bounds gives the confidence limits for NNT:

Lower Bound = 1 / 0.0756 = 13.23 → 14
Upper Bound = 1 / 0.0244 = 40.98 → 41
NNT = 20 (95% CI: 14 to 41)

Interpretation and Benchmark Reading Guidance

Clinical context determines value, distinguishing statistical significance vs. clinical significance. NNT must always be weighed against outcome severity and treatment safety.

NNT Range Interpretation Clinical Setting Key Considerations
NNT = 1 Theoretical ideal Targeted antidotes; antibiotics for fatal infections Every treated patient benefits; control participants uniformly fail.
NNT 2 – 5 Highly potent acute therapy Defibrillation for ventricular fibrillation Large absolute benefit over short time horizons.
NNT 10 – 50 Effective secondary prevention Antihypertensives for secondary stroke prevention Standard clinical benchmark; weighed against costs and side effects.
NNT 50 – 100+ Population primary prevention Statins or aspirin in low-risk cohorts over 5–10 years Meaningful public health effect; low individual probability of benefit.

When assessing overall balance, NNT is evaluated alongside Number Needed to Harm (NNH). Cochrane Handbook Section 15.4.2 recommends using NNTB (beneficial outcome) and NNTH (harmful outcome) to prevent ambiguity.

Assumptions and Common Methodological Mistakes

Methodologists frequently caution against five common errors in NNT usage:

  1. Assuming NNT is an Intrinsic Drug Constant: NNT scales inversely with baseline risk. An intervention with a 50% relative risk reduction yields an NNT of 10 at 20% baseline risk, but an NNT of 200 at 1% baseline risk. Always report baseline risk with NNT.
  2. Omitting the Follow-Up Time Frame: An NNT of 25 over 30 days is vastly more potent than an NNT of 25 over 10 years. An NNT without a time horizon is uninterpretable.
  3. The Discontinuous Confidence Interval Paradox: When a trial difference is not statistically significant (95% CI for ARR crosses zero), the NNT confidence interval passes through infinity (Altman, 1998) and splits into two regions: NNTB to ∞ to NNTH. Authors must not report standard linear intervals across zero.
  4. Inappropriate Meta-Analytic Pooling: Summing raw event counts across disparate trials violates randomization. Researchers must pool relative effects (RR or OR) and apply them to defined baseline risks.
  5. Rounding Down: Truncating an NNT of 20.2 to 20 overstates benefit. Conventional biostatistical rules mandate rounding up to 21.

How to Report NNT in APA Style

In APA 7th style, manuscripts should present raw event rates, absolute risk reduction with 95% confidence limits, the exact test statistic, and derived NNT with its inverted confidence interval and observation window.

APA 7th Example:

The experimental antithrombotic agent produced a significant reduction in 12-month recurrent stroke compared with standard therapy (7.0% vs. 12.0%), absolute risk reduction ARR = .05, 95% CI [.024, .076], z = 3.83, p < .001. Over a 1-year follow-up period, the number needed to treat to prevent one additional stroke was NNT = 20, 95% CI [14, 41].

How to Calculate NNT in Excel, R, and Python

1. Excel Formula

With Control Event Rate in cell B2 and Experimental Event Rate in cell B3, enter:

=IF(B2=B3, "No Effect", ROUNDUP(1/ABS(B2-B3), 0))

For raw counts with control events (C2), control total (D2), treatment events (E2), and treatment total (F2):

=ROUNDUP(1/ABS((C2/D2)-(E2/F2)), 0)

2. R Implementation

calculate_nnt <- function(cer, eer) {
  if (cer < 0 || cer > 1 || eer < 0 || eer > 1) stop("Rates must be between 0 and 1.")
  arr <- cer - eer
  if (abs(arr) < 1e-9) return(list(arr = 0, nnt = Inf, type = "No effect"))
  nnt_val <- ceiling(round(1 / abs(arr), 8))
  type <- ifelse(arr > 0, "NNTB", "NNTH")
  return(list(arr = round(arr, 4), nnt = nnt_val, type = type))
}
# Example: calculate_nnt(0.12, 0.07) yields $arr 0.05, $nnt 20, $type 'NNTB'

3. Python Implementation

import math

def calculate_nnt(cer: float, eer: float) -> dict:
    if not (0.0 <= cer <= 1.0 and 0.0 <= eer <= 1.0):
        raise ValueError("Rates must be between 0.0 and 1.0.")
    arr = cer - eer
    if abs(arr) < 1e-9:
        return {"arr": 0.0, "nnt": float("inf"), "type": "No effect"}
    nnt_val = math.ceil(round(1.0 / abs(arr), 8))
    direction = "NNTB" if arr > 0 else "NNTH"
    return {"arr": round(arr, 4), "nnt": nnt_val, "type": direction}
# Example: calculate_nnt(0.12, 0.07) returns {'arr': 0.05, 'nnt': 20, 'type': 'NNTB'}

Frequently Asked Questions

How to calculate number needed to treat?

To calculate number needed to treat (NNT), first find the absolute risk reduction (ARR) by subtracting the experimental event rate (EER) from the control event rate (CER): ARR = CER - EER. Next, divide 1 by the ARR: NNT = 1 / ARR. If ARR is expressed as a percentage, divide 100 by the percentage. Round the final decimal result up to the nearest integer.

What is the difference between NNT and NNH?

NNT quantifies beneficial outcomes achieved or prevented, whereas NNH quantifies adverse events caused by treatment. When an intervention increases risk, the reciprocal of the absolute risk increase is the NNH. Cochrane guidelines recommend the terms NNTB (beneficial) and NNTH (harmful) for directional clarity.

Why is NNT always rounded up?

Treatments cannot be given to fractional patients. Rounding down (e.g., 20.2 to 20) overstates benefit because treating 20 patients fails to achieve one full prevented event. Rounding up to 21 conservatively reflects clinical effort.

Can NNT be calculated if risk difference is not statistically significant?

While computable from any non-zero difference, reporting NNT without statistical significance is discouraged. If the risk difference interval spans zero, the NNT confidence interval is discontinuous, passing through infinity to encompass both benefit and harm (Altman, 1998).

Why must the time frame always be reported with an NNT?

NNT is strictly time-dependent. Preventing one event over a 30-day hospitalization reflects far greater potency than preventing one event over 10 years of continuous medication. Stating the follow-up duration is essential for valid clinical interpretation.

Sources

  • Altman, D. G., & Bland, J. M. (1998). Statistics Notes: What is a number needed to treat? BMJ, 317(7168), 1309–1310. https://doi.org/10.1136/bmj.317.7168.1309 (Read November 8, 2026).
  • Altman, D. G. (1998). Confidence intervals for the number needed to treat. BMJ, 317(7168), 1309–1312. https://doi.org/10.1136/bmj.317.7168.1309 (Read November 8, 2026).
  • Higgins, J. P. T., Thomas, J., Chandler, J., Cumpston, M., Li, T., Page, M. J., & Welch, V. A. (Eds.). (2024). Cochrane Handbook for Systematic Reviews of Interventions (version 6.5). Chapter 15: Interpreting results and drawing conclusions. Cochrane. https://training.cochrane.org/handbook/current/chapter-15 (Read November 8, 2026).
  • Laupacis, A., Sackett, D. L., & Roberts, R. S. (1988). An assessment of clinically useful measures of the consequences of treatment. New England Journal of Medicine, 318(26), 1728–1733. https://doi.org/10.1056/NEJM198806303182605 (Read November 8, 2026).

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about How to Calculate Number Needed to Treat

2 free questions a day, no account.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →