Relative Risk Calculator
Our biostatistics calculator computes relative risk accurately. Enter measurements for results with formulas and error analysis.
Formula
RR = (a/b) / (c/d)
Where a = events in exposed group, b = total in exposed group, c = events in unexposed group, d = total in unexposed group. The 95% confidence interval is calculated using the log transformation: CI = exp(ln(RR) +/- z * SE(ln(RR))), where SE(ln(RR)) = sqrt(1/a - 1/b + 1/c - 1/d).
Worked Examples
Example 1: Smoking and Lung Cancer Risk
Problem: In a cohort study, 45 out of 500 smokers developed lung cancer vs 5 out of 500 non-smokers. Calculate the relative risk.
Solution: Risk in exposed (smokers) = 45/500 = 0.09 (9%)\nRisk in unexposed (non-smokers) = 5/500 = 0.01 (1%)\nRR = 0.09 / 0.01 = 9.0\nln(RR) = 2.197, SE(ln RR) = sqrt(1/45 - 1/500 + 1/5 - 1/500) = 0.463\n95% CI = exp(2.197 +/- 1.96 * 0.463) = (3.63, 22.30)\nARD = 0.09 - 0.01 = 0.08, NNT = 1/0.08 = 13
Result: RR = 9.0 (95% CI: 3.63-22.30) | Smokers have 9x the lung cancer risk | NNT = 13
Example 2: Vaccine Efficacy Study
Problem: In a vaccine trial, 8 of 1000 vaccinated participants got infected vs 40 of 1000 in the placebo group. Calculate vaccine efficacy.
Solution: Risk in vaccinated = 8/1000 = 0.008 (0.8%)\nRisk in placebo = 40/1000 = 0.04 (4%)\nRR = 0.008 / 0.04 = 0.20\nVaccine Efficacy = (1 - RR) * 100 = 80%\n95% CI for RR: (0.094, 0.426)\nARD = 0.008 - 0.04 = -0.032, NNT = 1/0.032 = 32
Result: RR = 0.20 (80% vaccine efficacy) | 95% CI: 0.094-0.426 | NNT = 32 vaccinations to prevent 1 infection
Frequently Asked Questions
What is relative risk and how is it calculated?
Relative risk (RR), also called risk ratio, compares the probability of an event occurring in an exposed group versus an unexposed group. RR = (events in exposed / total exposed) / (events in unexposed / total unexposed). An RR of 2.0 means the exposed group has twice the risk of the outcome compared to the unexposed group. An RR of 0.5 means the exposed group has half the risk (protective effect). RR = 1.0 means no difference. Relative risk is used in cohort studies and randomized controlled trials where you can directly measure incidence rates in both groups.
What is the difference between relative risk and odds ratio?
Relative risk compares probabilities (risk in exposed / risk in unexposed), while odds ratio compares odds (odds in exposed / odds in unexposed). When the outcome is rare (< 10% incidence), RR and OR are approximately equal. As the outcome becomes more common, OR increasingly overestimates the RR. For example, if risk is 30% vs 10%, RR = 3.0 but OR = 3.86. RR is more intuitive and preferred when calculable (cohort studies, RCTs). OR is used in case-control studies where true incidence cannot be determined. Always specify which measure you are reporting.
How do I interpret the confidence interval for relative risk?
The confidence interval (CI) provides a range of plausible values for the true population RR. A 95% CI means we are 95% confident the true RR falls within this range. The key is whether the CI crosses 1.0: if entirely above 1.0 (e.g., 1.5-3.2), the increased risk is statistically significant. If entirely below 1.0 (e.g., 0.3-0.8), the protective effect is significant. If the CI includes 1.0 (e.g., 0.8-1.4), the result is not statistically significant. Narrower CIs indicate more precise estimates, typically from larger sample sizes.
When should I use relative risk vs absolute risk reduction?
Both measures should be reported together as they provide complementary information. Relative risk is useful for understanding the strength of association between exposure and outcome across different populations. Absolute risk reduction (ARD) is better for clinical decision-making because it accounts for baseline risk. Drug advertisements often emphasize RR because it sounds more impressive: a drug that reduces heart attack risk by 50% (RR=0.5) sounds better than saying it reduces risk from 2% to 1% (ARD=1%). Health literacy research shows that patients make better decisions when given absolute risks rather than relative risks.
Can I use Relative Risk Calculator on a mobile device?
Yes. All calculators on NovaCalculator are fully responsive and work on smartphones, tablets, and desktops. The layout adapts automatically to your screen size.
Can I share or bookmark my calculation?
You can bookmark the calculator page in your browser. Many calculators also display a shareable result summary you can copy. The page URL stays the same so returning to it will bring you back to the same tool.