Skip to content

Relative Risk Calculator

Relative risk, odds ratio, absolute risk reduction and number needed to treat from a 2×2 table, with confidence intervals and a plain-language reading of a study result.

Calculator Details

Relative risk:0.600See results ↓
Treatment (or exposed) group

People in the treatment (or exposed) group who had the outcome

Everyone in the treatment (or exposed) group

Control (or unexposed) group

People in the control (placebo or unexposed) group who had the outcome

Everyone in the control (or unexposed) group

Bad (a heart attack, an infection) or good (a recovery, quitting smoking): decides whether a difference is a benefit or a harm

Width of the confidence intervals; 95% is standard in medical papers

Your Results

Relative risk: 0.600

Relative risk

0.600

95% CI 0.385 to 0.935

Risk with treatment

3%

vs 5% in the control group

Absolute risk reduction

2 points

95% CI 0.28 to 3.72

Relative risk reduction

40%

Number needed to treat

50

NNTB 50.0 (26.9 to 351.4)

Odds ratio

0.588

95% CI 0.37 to 0.932

p-value (RR = 1)

0.0242

A tool for reading study results, not medical advice. Whether a treatment is right for you depends on your own risk and situation: talk to your doctor or pharmacist.

The risk was 3% with treatment and 5% without: a relative risk of 0.6 (95% CI 0.385 to 0.935), or 20 fewer people per 1,000 having the outcome. That is 1 in 50 people treated (number needed to treat).

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Risk of the outcome in each group (%)

Risk of the outcome in each group (%)

Detailed Breakdown

Your 2 × 2 table
GroupOutcomeNo outcomeTotalRisk
Treatment / exposed309701,0003%
Control / unexposed509501,0005%
Effect measures with 95% confidence intervals
MeasureValueConfidence intervalIn words
Relative risk (RR)0.6000.385 to 0.935Treatment group’s risk is 40.0% lower
Odds ratio (OR)0.5880.370 to 0.932Close to the RR only when the outcome is rare
Absolute risk reduction (ARR)2.00 points0.28 to 3.7220.0 better outcomes per 1,000 treated
Relative risk reduction (RRR)40.0%—The headline figure in many press releases
Number needed to treatNNTB 5026.9 to 351.41 extra good outcome for every 50 treated

How This Calculator Works

How the measures are calculated

Risk = events ÷ group size; RR = risk with treatment ÷ risk without

95% CI for RR = exp(ln RR ± 1.96 × √(1/a − 1/n₁ + 1/c − 1/n₂))

ARR = risk without − risk with; NNT = 1 ÷ ARR, rounded up

Your numbers: 30 ÷ 1000 = 3% and 50 ÷ 1000 = 5%; RR = 0.6; SE of ln RR = 0.2266, so the interval is 0.385 to 0.935. The absolute difference is 2 percentage points (SE 0.875), and 1 ÷ 0.0200 = 50, rounded up to 50. Odds ratio = (30 × 950) ÷ (970 × 50) = 0.588.

Frequently Asked Questions

What is relative risk?

Relative risk (RR, or risk ratio) is the risk of an outcome in one group divided by the risk in another. If 3% of treated people and 5% of untreated people have a heart attack, RR = 3 ÷ 5 = 0.6: the treated group’s risk is 40% lower. RR = 1 means no difference.

What is the difference between relative and absolute risk reduction?

Relative risk reduction (RRR) says how much smaller the risk is in proportional terms; absolute risk reduction (ARR) says how many fewer people per hundred have the outcome. In the example, the RRR is 40% but the ARR is only 2 percentage points, because the outcome was uncommon to begin with. Headlines usually quote the larger-sounding relative figure.

What does number needed to treat mean?

The number needed to treat (NNT) is how many people must receive a treatment for one extra person to benefit, compared with the control. It is 1 ÷ ARR, rounded up: with an ARR of 2 points, NNT = 50. A number needed to harm (NNH) works the same way for side effects. Smaller is a stronger effect.

What is the difference between relative risk and odds ratio?

Risk is events ÷ everyone; odds are events ÷ non-events. The odds ratio (OR) compares odds. When the outcome is rare (under about 10%), OR and RR are close (here 0.588 vs 0.6); when it is common, the OR exaggerates the effect. Case–control studies can only estimate an OR.

How do I read the confidence interval?

A 95% confidence interval is the range of effects compatible with the data. For RR, if the interval includes 1 the study can’t rule out no effect; for ARR the same is true if it includes 0. Here the RR interval is 0.385 to 0.935, which excludes 1, so the result is statistically significant at the 5% level (p = 0.0242).

Why does the NNT interval go through infinity?

When the confidence interval for the absolute risk reduction includes zero, the treatment might help, do nothing or harm. Taking reciprocals, “no effect” becomes an NNT of infinity, so the interval runs from a number needed to harm, through infinity, to a number needed to treat, written as NNTB 50 (NNTH 15 to ∞ to NNTB 9). Altman proposed this notation in the BMJ in 1998.

Can this calculator tell me whether to take a medicine?

No. It helps you read the numbers a study or news story reports. Whether a treatment makes sense for you depends on your own baseline risk, other conditions, side effects and preferences, which your doctor or pharmacist can weigh with you.

Statistics aid, not medical advice: talk to your doctor before starting or stopping any treatment. Relative risk confidence intervals by the log (Katz) method, odds ratio by Woolf's method, risk difference by the Wald method, NNT intervals by Altman (BMJ 1998). When a cell is zero, 0.5 is added to every cell for the ratios. It assumes two independent groups (a trial or cohort study) and leaves out paired and matched designs, adjusted (multivariable) estimates, time-to-event (hazard ratio) analyses, exact and score intervals for small samples, and meta-analysis.

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:

OutcomeNo outcomeTotal
Treatment (or exposed)abn₁
Control (or unexposed)cdn₂

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.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy