Relative Risk Calculator: RR, Odds Ratio, ARR and NNT
By FindMySum · Last reviewed
"New drug cuts heart attack risk by 40%." Headlines like this are almost always quoting a relative risk reduction, and on their own they are hard to interpret. Forty percent of what? This calculator takes the four numbers behind such a claim (how many people were in each group and how many had the outcome) and works out every common way of describing the effect: relative risk, odds ratio, absolute risk reduction, relative risk reduction and the number needed to treat, each with a confidence interval. It is a reading aid for study results. It does not recommend any treatment.
The 2×2 table
A trial or cohort study can be summarised in a table with two rows and two columns:
| Outcome | No outcome | Total | |
|---|---|---|---|
| Treatment (or exposed) | a | b | n₁ |
| Control (or unexposed) | c | d | n₂ |
The calculator asks for a, n₁, c and n₂; b and d are the differences.
Worked example (the calculator's defaults). In a trial, 30 of 1,000 treated people and 50 of 1,000 people on placebo had a heart attack.
Risk and relative risk
The risk in each group is events ÷ group size: 30 ÷ 1,000 = 3% with treatment and 50 ÷ 1,000 = 5% without. The relative risk (RR) is their ratio: 3 ÷ 5 = 0.60. The treated group's risk is 40% lower, which is the relative risk reduction (RRR = 1 − RR).
The 95% confidence interval for RR comes from its logarithm. The standard error of ln RR is √(1/a − 1/n₁ + 1/c − 1/n₂) = √(1/30 − 1/1,000 + 1/50 − 1/1,000) = 0.228, so the interval is exp(ln 0.60 ± 1.96 × 0.228) = 0.385 to 0.935. It excludes 1, so the result is statistically significant (p = 0.024).
Absolute risk reduction and NNT
The absolute risk reduction (ARR) is the plain difference in risks: 5% − 3% = 2 percentage points. Out of every 1,000 people treated, 20 fewer had a heart attack. Its confidence interval uses the normal approximation: 2 ± 1.96 × 0.87 = 0.28 to 3.72 points.
The number needed to treat (NNT) is the reciprocal: 1 ÷ 0.02 = 50. On average, 50 people need the treatment for one of them to avoid a heart attack they would otherwise have had. By convention it is rounded up to a whole person. Its confidence interval is the reciprocal of the ARR limits: 1 ÷ 0.0372 = 26.9 to 1 ÷ 0.0028 = 351.4.
When the treatment increases the risk, the same calculation gives a number needed to harm (NNH): how many people must be treated for one extra person to have the outcome.
When the interval includes zero
If the ARR's confidence interval runs from a negative to a positive number, the data are compatible with benefit, no effect and harm. Since no effect corresponds to an infinite NNT, the NNT interval has to pass through infinity. Douglas Altman suggested writing it as, for example, "NNTB 50 (NNTH 15 to ∞ to NNTB 9.4)": the best estimate is a benefit for 1 in 50, but the study can't exclude one extra harm for every 15 treated. This is what you get from the same 2% difference in a trial of 100 per group instead of 1,000.
Odds ratio
Odds are events ÷ non-events: 30 ÷ 970 with treatment and 50 ÷ 950 without. The odds ratio (OR) is (a × d) ÷ (b × c) = (30 × 950) ÷ (970 × 50) = 0.588. For rare outcomes the OR is close to the RR, as here. For common outcomes it is further from 1 than the RR and can overstate the effect if read as a risk ratio. Case–control studies, which start from people with and without the outcome, can only estimate odds ratios.
Zero cells
If any cell is zero, the logarithms in the standard errors break down. The calculator then adds 0.5 to every cell for the RR and OR (the Haldane–Anscombe correction), which is common practice; the risks and the ARR use the raw counts. Very small studies are better analysed with exact methods.
Reading a study result
- Start from the absolute numbers. How common is the outcome without treatment? A 40% relative reduction of a 5% risk saves 2 people in 100; of a 0.05% risk, 2 in 10,000.
- Look at the interval, not just the estimate. A wide interval means an imprecise study.
- Check the time frame. An NNT of 50 over five years is different from 50 over one year.
- Weigh harms too. A treatment with an NNT of 50 and an NNH of 30 for a serious side effect may do more harm than good.
What the calculator leaves out
It assumes two independent groups, as in a parallel-group trial or cohort study. It does not handle matched or crossover designs, adjusted estimates from regression models, hazard ratios from survival analyses, or pooled results from meta-analyses, and it uses large-sample confidence intervals. It is not medical advice: any decision about a treatment belongs with you and your doctor.
More questions
Where do I find the numbers for the 2×2 table?
Most trial reports give the number of participants in each group and the number who had the outcome, in the results text, a table or a flow diagram. Enter those four numbers. If a paper only gives percentages, multiply each by the group size to get the counts, rounding to whole people.
What is a hazard ratio, and can I enter it here?
A hazard ratio compares the rate of events over time from a survival analysis, usually a Cox model. It is close to a relative risk when events are uncommon, but it is not computed from a simple 2×2 table, so this calculator can't reproduce it. You can still use the raw event counts, if the paper reports them, for a rough relative and absolute risk.
Why do different papers report different NNTs for the same treatment?
The NNT depends on the baseline risk of the people studied and on the length of follow-up. The same relative risk reduction gives a smaller NNT in high-risk people and over longer periods. Always check who was studied and for how long before comparing NNTs.
What does a p-value of 0.05 mean?
It is the probability of seeing a difference at least this large if the treatment truly had no effect. A p-value below 0.05 is the usual threshold for statistical significance, but it says nothing about whether the effect is large enough to matter. Look at the absolute risk reduction and its confidence interval for that.
Is a relative risk of 0.5 always a big effect?
Not necessarily. Halving a risk from 2 in 10,000 to 1 in 10,000 changes very little for any one person, while halving it from 20% to 10% is substantial. The absolute risk reduction and NNT put the relative figure in context.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.