Relative Risk Calculator

Relative risk calculator: enter the number of people with the outcome and the total in two groups to get the relative risk (risk ratio) with its confidence interval. You also get the relative risk reduction, the absolute risk reduction in percentage points, the number needed to treat, the odds ratio and a P value. Below the calculator: the formulas, a worked example from the Magpie trial, and why the absolute numbers matter.

Treatment or exposed
Control or unexposed

Results

EvidencePulse

Check the evidence behind your numbers

Ask EvidencePulse what the trials show. It answers from the published evidence, with references you can open.

Your question

Ask EvidencePulse

Opens EvidencePulse with this question filled in.

Relative risk, RRR and ARR

The risk in each group is the number with the outcome divided by the number in the group. From the two risks:

  • Relative risk (RR) = risk with treatment ÷ risk with control. 1 means no difference.
  • Relative risk reduction (RRR) = 1 − RR. A relative risk of 0.75 is a 25% relative reduction.
  • Absolute risk reduction (ARR) = risk with control − risk with treatment. It is a difference in percentage points.
  • Number needed to treat (NNT) = 1 ÷ ARR, rounded up.

When treatment raises the risk, the same arithmetic gives the relative risk increase, the absolute risk increase and the number needed to harm.

Confidence intervals.

  • For the relative risk, the calculator uses the log method (Katz): SE of ln(RR) = √(1/a − 1/n₁ + 1/c − 1/n₂), where a and c are the events and n₁ and n₂ the group sizes.
  • For the absolute difference, it uses Newcombe's hybrid score interval, which behaves well with small groups and with risks near 0% or 100%.
  • The P value comes from the two-proportion z test. When counts are small, Fisher's exact test replaces it.

Worked example: the Magpie trial

Magpie randomized 10,141 women with pre-eclampsia to magnesium sulfate or placebo:

  • Magnesium sulfate: eclampsia in 40 of about 5,055 women (0.79%).
  • Placebo: eclampsia in 96 of about 5,055 (1.90%).
MeasureResult
Relative risk0.42 (95% CI 0.29 to 0.60)
Relative risk reduction58%
Absolute risk reduction1.11 percentage points (95% CI 0.66 to 1.57)
Number needed to treat91 (95% CI 64 to 151)

These match the published results: a 58% lower risk (95% CI 40 to 71%) and 11 fewer women with eclampsia per 1,000 treated. Read our summary of the trial.

Why the absolute numbers matter

A relative risk is the same at every baseline risk, but the benefit to a patient is not.

  • REDUCE-IT: icosapent ethyl lowered major cardiovascular events from 22.0% to 17.2% over a median of 4.9 years. That is a relative risk of 0.78, an absolute reduction of 4.8 points, and an NNT of 21.
  • The same relative reduction at a 2% baseline would remove about 0.4 percentage points, an NNT near 230.

Headlines often quote only the relative number ("58% lower risk"). Before you act on one, ask what the risk was to begin with. HypeCheck checks health claims like these against the study behind them.

Common mistakes

  1. Quoting only the relative reduction. Always give the baseline risk and the absolute difference too.
  2. Mixing up percent and percentage points. A fall from 1.9% to 0.8% is 1.1 percentage points, or 58%.
  3. Comparing relative risks from studies with different follow-up. A 5-year relative risk and a 1-year relative risk aren't the same quantity.
  4. Using a relative risk from a case-control study. Risks can't be estimated there; use the odds ratio.
  5. Assuming the relative risk of an event is the reciprocal of the relative risk of no event. It isn't: an RR of 0.42 for eclampsia is an RR of about 1.01 for staying free of it.

References

  1. Katz D, Baptista J, Azen SP, Pike MC. Obtaining confidence intervals for the risk ratio in cohort studies. Biometrics. 1978;34:469-74.
  2. Newcombe RG. Interval estimation for the difference between independent proportions: comparison of eleven methods. Stat Med. 1998;17:873-90.
  3. Magpie Trial Collaborative Group. Lancet. 2002;359:1877-90.
  4. Bhatt DL, Steg PG, Miller M, et al. Cardiovascular risk reduction with icosapent ethyl for hypertriglyceridemia. N Engl J Med. 2019;380:11-22.
  5. Laupacis A, Sackett DL, Roberts RS. An assessment of clinically useful measures of the consequences of treatment. N Engl J Med. 1988;318:1728-33.

Check a health claim with HypeCheck

Saw a headline promising a 50% lower risk? Paste the article or the claim, and HypeCheck rates it against the study behind it.

Check a claim

The 2MM Daily Brief

Free every weekday: the most important new studies, summarized by physicians in two minutes each.

Your subscription opens securely in a new tab.

Questions and answers

What is relative risk?

Relative risk, or risk ratio, is the risk of an outcome in one group divided by the risk in another. A relative risk of 0.42 means the risk with treatment is 42% of the risk with control.

How do you calculate relative risk?

Divide the number with the outcome by the group size in each group, then divide the treated group's risk by the control group's. With 40 of 5,055 versus 96 of 5,055, the risks are 0.79% and 1.90% and the relative risk is 0.42.

How do I interpret a relative risk of 0.5 or of 1.5?

A relative risk of 0.5 means the risk is halved, a 50% relative reduction. A relative risk of 1.5 means the risk is 50% higher. A relative risk of 1 means no difference.

What is the difference between relative and absolute risk reduction?

The relative reduction is the share of the baseline risk removed: 1 minus the relative risk. The absolute reduction is the difference between the two risks in percentage points. A 58% relative reduction can be a 1.1-point absolute reduction when the baseline risk is low.

How do I get the number needed to treat from relative risk?

You need the baseline risk as well. The absolute risk reduction is the baseline risk × (1 − RR), and the NNT is 1 divided by that, rounded up. The NNT calculator does this from a relative risk, an odds ratio or a hazard ratio.

What is the difference between relative risk and odds ratio?

Relative risk divides probabilities and the odds ratio divides odds. They are close for rare outcomes. For common outcomes the odds ratio is further from 1, so trials and cohorts usually report relative risk.

What does a confidence interval for relative risk that includes 1 mean?

The data are compatible with no difference between the groups at that confidence level.

For education and research. These calculators do not give medical advice; check results against the original paper before relying on them.