Relative Risk Calculator

Relative risk with confidence interval, risk difference, NNT and attributable risk from a 2×2 table.

Relative risk = risk in exposed ÷ risk in unexposed = [a/(a+b)] ÷ [c/(c+d)]. If 30 of 100 exposed and 10 of 100 unexposed people develop the outcome, RR = 0.30 ÷ 0.10 = 3.0 and the attributable risk is 0.20 (20 extra cases per 100 exposed).

Free, runs in your browser. Nothing you enter is uploaded.

How to use it

  1. Choose a clinical trial (treatment vs control) or a cohort (exposed vs unexposed).
  2. Enter the number with and without the outcome in each group.
  3. Read RR with its confidence interval, ARR, NNT and attributable risk.

What you enter

What you get

Formula

RR = [a/(a+b)] ÷ [c/(c+d)] | AR = a/(a+b) − c/(c+d) | NNT = 1 ÷ |ARR| | 95% CI = exp(ln RR ± 1.96 × SE)

Worked example

Input: Exposed 30/100, unexposed 10/100

Result: RR 3.0 (95% CI 1.55–5.80), AR 0.20, AF 66.7%

Exposure triples the risk; two thirds of cases among the exposed are attributable to exposure.

Questions

How do you calculate relative risk?

Divide the risk in the exposed group by the risk in the unexposed group. Risk is cases ÷ total in that group.

What does a relative risk of 1 mean?

The outcome is equally likely in both groups. Above 1 the exposure is linked to higher risk, below 1 to lower risk. A 95% CI that crosses 1 means the difference is not statistically significant.

What is the difference between ARR and RRR?

Absolute risk reduction is the plain difference in risk (control risk − treated risk). Relative risk reduction is that difference as a share of control risk. RRR can sound large when ARR is tiny.

How is NNT calculated?

NNT = 1 ÷ ARR, rounded up. An ARR of 0.05 means treating 20 people prevents one outcome.

When should I use odds ratio instead?

Use the odds ratio for case-control studies, where you cannot measure risk directly. RR needs cohort or trial data.

Limitations

References

Related reading

More Statistics

All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.