Relative Risk Calculator
Comparing Risk Between Two Groups
Relative risk (RR) answers a specific epidemiological question: how many times more (or less) likely is an outcome in an exposed group compared with an unexposed group? It comes directly out of a 2×2 contingency table — the classic layout for a cohort study or clinical trial — and it is one of the first numbers a researcher computes after the data collection phase closes.
The Formula
Relative risk is the ratio of two proportions, each drawn from one row of the table:
where a = exposed with event, b = exposed without event, c = unexposed with event, d = unexposed without event
The confidence interval is built on the log scale, since RR is bounded below by zero and its sampling distribution is skewed:
CI = exp[ln(RR) ± z × SE(ln RR)]
Worked Example
Consider a cohort of 100 exposed individuals and 100 unexposed individuals, tracked for a disease outcome: a = 30, b = 70, c = 20, d = 80.
| Quantity | Calculation | Value |
|---|---|---|
| Risk (exposed) | 30 / 100 | 0.30 |
| Risk (unexposed) | 20 / 100 | 0.20 |
| Relative Risk | 0.30 / 0.20 | 1.50 |
| 95% CI | exp(ln(1.5) ± 1.96 × SE) | 0.92 to 2.46 |
Values computed directly from the calculator's formula, not estimated.
Reading the Result
- RR = 1 — the exposure has no measurable effect on risk.
- RR > 1 — the exposed group has a higher risk; an RR of 1.5, as above, means a 50% higher risk in the exposed group.
- RR < 1 — the exposure is associated with a lower risk, which is the pattern expected for a protective factor such as a vaccine.
- If the confidence interval spans 1.0, the result is not statistically significant at that confidence level, even if the point estimate looks large.
Where This Calculation Is Used
Relative risk shows up wherever a prospective study tracks two groups forward in time: vaccine efficacy trials, occupational exposure studies, drug safety monitoring, and public health surveillance of behavioral risk factors like smoking or diet. It differs from the odds ratio in an important way — RR requires knowing the actual incidence in each group, which is only possible in cohort or trial designs, not in case-control studies where the odds ratio is used instead.
How to Use This Calculator
- Enter the count of exposed subjects who experienced the event (a) and who did not (b).
- Enter the count of unexposed subjects who experienced the event (c) and who did not (d).
- Optionally set a confidence level (defaults to 95%).
- Select Calculate to get the relative risk and its confidence interval.
Related Calculations
For case-control data, use the Odds Ratio Calculator instead. To test whether the group difference reaches statistical significance, see the Chi-Square Calculator.