Relative Risk Calculator
The relative risk (risk ratio, RR) is the event risk of the exposed or treated group divided by the risk of the control group. It answers the question "by what factor does this change the risk?" directly, which makes it far easier to interpret than the odds ratio; it can, however, only be used in designs where the risks are genuinely estimable — cohort studies, randomized controlled trials, and cross-sectional research.
Alongside the RR, this calculator returns the absolute risk difference, its Newcombe hybrid score confidence interval, and the NNT/NNH, the most practical measure for a clinical decision. The relative risk describes the size of the effect proportionally; the absolute risk difference shows how many people the effect actually corresponds to in real life. When the two are not reported together, small absolute differences can be exaggerated by dramatic percentages.
Relative Risk, Risk Difference, and NNT Formulas
Table: [a b; c d], n₁ = a + b, n₂ = c + d
Risks: Risk₁ = a / n₁, Risk₂ = c / n₂
Relative risk: RR = Risk₁ / Risk₂
SE[ln(RR)]: √(1/a − 1/n₁ + 1/c − 1/n₂)
RR interval: exp( ln(RR) ± z_{1−α/2} · SE )
Risk difference: RD = Risk₁ − Risk₂
RD (Wald) SE: √( p₁(1−p₁)/n₁ + p₂(1−p₂)/n₂ )
RD interval: Newcombe hybrid score (square-and-add) method
NNT / NNH: 1 / |RD|
Relative change: (RR − 1) × 100The confidence interval for the risk difference is produced with Newcombe's square-and-add method; because it is derived from the Wilson interval of each proportion, it never crosses the [−1, 1] bounds and gives markedly better coverage than the Wald interval in small samples. The Wald interval is shown as well for comparison.
How to Calculate
- Enter the event-yes and event-no counts of the treated/exposed group and the control group in the four boxes.
- Choose whether the event is undesirable (death, relapse) or desirable (recovery, response); the NNT/NNH wording follows this choice.
- Mark the study design; if you select case-control, the calculator reports that the relative risk is invalid.
- Read the relative risk and its confidence interval: if the interval contains 1, the effect is not statistically significant.
- Always assess the absolute risk difference and the NNT together with the RR; the relative risk alone does not show the real size of the effect.
- You can copy the rows of the risk comparison table into your report as they are.
Worked Examples
Protective effect in a randomized controlled trial
The treatment group had 15 events among 100 people and the control group 30 events among 100. The risks are 15.00% and 30.00%; RR = 0.500 (95% CI: 0.287 – 0.870) with p = 0.014, so the effect is significant. The absolute risk reduction is 15.00 percentage points and NNT = 6.67: treating about 7 patients prevents one event.
Relative risk (RR): 0.5000 · 95% confidence interval for RR: 0.2872 – 0.8704 · p-value (H₀: RR = 1): p = 0.014
Harmful exposure (NNH)
The risk is 25.00% in the exposed group and 15.00% in the control group. RR = 1.667 (95% CI: 0.936 – 2.968) with p = 0.083, so the difference is not significant at α = 0.05. Since the absolute risk increase is 10.00 percentage points, NNH = 10.00; because the risk-difference interval contains zero, however, no single finite interval can be given for the NNH.
Relative risk (RR): 1.6667 · 95% confidence interval for RR: 0.9360 – 2.9678 · p-value (H₀: RR = 1): p = 0.083
A small, non-significant difference
The risks in the two groups are 20.00% and 18.00%. RR = 1.111 (95% CI: 0.626 – 1.971) with p = 0.719, so the effect is not significant. The absolute difference is only 2.00 percentage points and the Newcombe interval contains zero; a sample of this size cannot detect differences that small.
Relative risk (RR): 1.1111 · 95% confidence interval for RR: 0.6263 – 1.9712 · p-value (H₀: RR = 1): p = 0.719