Relative Risk Calculator
Relative risk (RR) is the ratio of the probability of an outcome in an exposed group to the probability in an unexposed group. It is the preferred measure of association in cohort studies and randomized trials, where the incidence of the outcome can be directly observed in each group. Enter the four cells of your 2x2 contingency table: a (exposed, outcome present), b (exposed, outcome absent), c (unexposed, outcome present), and d (unexposed, outcome absent). The calculator returns the relative risk, absolute risk reduction, and 95% confidence interval.
Relative risk formula
Risk(exposed) = a / (a + b)
Risk(unexposed) = c / (c + d)
RR = Risk(exposed) / Risk(unexposed)
95% CI: e^(ln(RR) ± 1.96 × SE)
SE(ln RR) = sqrt(b/(a(a+b)) plus d/(c(c+d))). The absolute risk reduction (ARR) = Risk(unexposed) minus Risk(exposed), expressed as a percentage.
Interpreting relative risk
- RR = 1.00: the exposure has no effect on risk.
- RR = 2.00: the exposed group has twice the risk of the unexposed group.
- RR = 0.50: the exposed group has half the risk (protective exposure).
- If the 95% CI excludes 1.00, the association is statistically significant at alpha = 0.05.
Frequently asked questions
What is relative risk?
Relative risk (RR), also called the risk ratio, compares the probability of an event in an exposed group to the probability in an unexposed (control) group. An RR of 1 means equal risk; RR greater than 1 means higher risk in the exposed group; RR less than 1 means lower risk (protective effect).
How is relative risk calculated from a 2x2 table?
RR = (a/(a+b)) divided by (c/(c+d)), where a = exposed with outcome, b = exposed without outcome, c = unexposed with outcome, d = unexposed without outcome. The numerator is the risk (proportion) in the exposed group; the denominator is the risk in the unexposed group.
How is the confidence interval for relative risk calculated?
The 95% CI uses the log scale: ln(RR) plus or minus 1.96 times the standard error. SE(ln RR) = sqrt(b/(a(a+b)) plus d/(c(c+d))). Exponentiate the bounds to get the CI on the RR scale.
When should I use relative risk versus odds ratio?
Use relative risk for prospective (cohort) studies where you know the actual incidence of the outcome in each group. Use odds ratio for case-control studies where sampling is by outcome status. For rare outcomes (less than 10%), the odds ratio approximates the relative risk.
What is the absolute risk reduction?
The absolute risk reduction (ARR) is the arithmetic difference between risks: (c/(c+d)) minus (a/(a+b)). Unlike RR, which is relative, ARR gives the actual percentage points of risk reduced by the exposure or treatment. The number needed to treat (NNT) = 1/ARR.
Official sources
- CDC Public Health Training Network: Measures of Association.
- NIST/SEMATECH e-Handbook: Engineering Statistics Handbook.
Reviewed by the CalculatorHub team, edited by James Graham, 15 June 2026. See our methodology.