Relative Risk Calculator

Enter a 2x2 exposure-outcome table to compute relative risk, absolute risk difference, relative risk reduction, and number needed to treat.

Quick Facts

Formula
RR = [a/(a+b)] / [c/(c+d)]
Risk in the exposed group divided by risk in the control group.

Your Results

Calculated
Relative risk (RR)
-
Risk ratio, exposed vs control
Risk in exposed group
-
a / (a + b)
Risk in control group
-
c / (c + d)
Absolute risk difference
-
Exposed risk − control risk
Relative risk reduction
-
|difference| / control risk
Number needed to treat
-
1 / |risk difference|

Ready

Enter the four cell counts and run the calculation.

What relative risk measures

Relative risk (also called the risk ratio, RR) compares the probability of an outcome between two groups: an exposed group (for example, people taking a drug, smoking, or carrying a risk factor) and a control group. It is one of the core measures of association in epidemiology and in randomized clinical trials, because it answers a simple question: how many times more (or less) likely is the outcome when the exposure is present?

The formula

Start from a 2x2 table of counts. Let a = exposed subjects who had the outcome, b = exposed subjects who did not, c = control subjects who had the outcome, and d = control subjects who did not. Then:

  • Risk in the exposed group = a / (a + b)
  • Risk in the control group = c / (c + d)
  • Relative risk (RR) = [a / (a + b)] / [c / (c + d)]

This calculator also reports three related measures that share the same table. The absolute risk difference (RD) is the risk in the exposed group minus the risk in the control group, expressed in percentage points. The relative risk reduction (RRR) is the size of that difference relative to the control risk, |RD| / risk in control. The number needed to treat (NNT) is 1 / |RD|, the number of people who must be exposed (or treated) for one additional outcome to occur or be prevented.

How to read the value

  • RR = 1 — no difference in risk between the groups; the exposure shows no association with the outcome.
  • RR > 1 — the outcome is more likely in the exposed group. RR = 1.5 means a 50% higher risk; RR = 2 means the risk is doubled.
  • RR < 1 — the outcome is less likely in the exposed group, which is what you hope to see for a protective treatment. RR = 0.8 means a 20% reduction in risk.

Relative risk vs. odds ratio

Relative risk is a ratio of probabilities and can be calculated directly from cohort studies and randomized trials, where you know the total number of people in each exposure group. Case-control studies sample on outcome rather than exposure, so they cannot estimate absolute risks and instead report the odds ratio (OR = ad / bc). When the outcome is rare, the odds ratio closely approximates the risk ratio; when the outcome is common, the odds ratio is further from 1 than the true relative risk and can be misleading if read as one.

Why relative and absolute measures both matter

A large relative risk can hide a tiny absolute effect. If a treatment cuts risk from 2 in 10,000 to 1 in 10,000, that is a relative risk of 0.5 (a headline "50% reduction") but an absolute risk difference of only 0.01 percentage points and a number needed to treat of 10,000. Always report the absolute risk difference alongside the relative risk so readers can judge the real-world impact, not just the proportional change.

Frequently Asked Questions

What is the difference between relative risk and odds ratio?
Relative risk (RR) is the ratio of two probabilities: the risk of the outcome in the exposed group divided by the risk in the control group. The odds ratio (OR = ad/bc) is the ratio of odds, not probabilities. RR can be computed directly from cohort and randomized data, while case-control studies report OR because the underlying risks are not sampled. When the outcome is rare, OR approximates RR; when it is common, OR is more extreme than RR.
How do I interpret a relative risk value?
RR = 1 means the two groups have the same risk. RR greater than 1 means exposure is associated with higher risk (RR = 1.5 is a 50% higher risk). RR less than 1 means exposure is associated with lower risk (RR = 0.8 is a 20% reduction). Always pair the point estimate with a confidence interval: if it crosses 1, the association is not statistically significant at that level.
What happens if the control group has zero cases?
If no one in the control group had the outcome, the control risk is zero and the relative risk is undefined (division by zero). This calculator flags that case. In practice, analysts add a small continuity correction (often 0.5 to each cell) or report the absolute risk difference instead, which remains well defined even when one risk is zero.