Relative Risk Calculator

Reviewed by CalcMulti Editorial Team·Last updated: ·Statistics Hub

The relative risk (RR) and odds ratio (OR) are the two fundamental measures of association in a 2×2 contingency table. They quantify how much more (or less) likely an outcome is in an exposed group compared to an unexposed group.

Enter your 2×2 table (exposed/unexposed × outcome/no outcome) to compute RR, OR, absolute risk reduction, relative risk reduction, number needed to treat, and 95% confidence intervals for all measures.

Formula

RR = (a/(a+b)) / (c/(c+d)) OR = (a×d) / (b×c)

a
exposed with outcome (true positives)
b
exposed without outcome
c
unexposed with outcome
d
unexposed without outcome
NNT
1 / ARR — number needed to treat to prevent one event

Quick Examples

Enter 2×2 Contingency Table

RR, OR & NNT Formulas

Relative Risk (RR)

RR = (a / (a+b)) / (c / (c+d))

Odds Ratio (OR)

OR = (a × d) / (b × c)

Absolute Risk Reduction (ARR)

ARR = r₂ − r₁ (positive = treatment helps)

Number Needed to Treat (NNT)

NNT = 1 / |ARR|

CellMeaningExample
aExposed AND outcome (true positive)Treated patients with event
bExposed AND no outcomeTreated patients without event
cUnexposed AND outcomeControl patients with event
dUnexposed AND no outcomeControl patients without event

Worked Example: Drug Trial (Classic)

In a randomized trial, 100 treated patients and 100 control patients are followed. 20 treated patients have the outcome; 40 control patients have the outcome.

Event (a/c)No event (b/d)TotalRisk
Treateda = 20b = 8010020%
Controlc = 40d = 6010040%

RR = 0.20 / 0.40 = 0.50 — treated group has half the risk of control

OR = (20×60) / (80×40) = 1200 / 3200 = 0.375

ARR = 0.40 − 0.20 = 0.20 (20%) absolute risk reduction

NNT = 1 / 0.20 = 5 — treat 5 patients to prevent 1 event

RR vs OR: When to Use Each

MeasureBest forInterpretation
Relative Risk (RR)Cohort studies, clinical trialsMore intuitive: RR=0.5 means "half the risk"
Odds Ratio (OR)Case-control studies, logistic regression outputApproximates RR when outcome is rare (<10%)
ARR / NNTClinical decision-makingNNT=5 is always easier to communicate than RR=0.5
RRRMarketing, reportingAlways more impressive — NNT communicates real impact better

Interpreting RR: RR < 1 → exposure is protective · RR = 1 → no effect · RR > 1 → exposure increases risk. The 95% CI for RR is calculated using the log method: RR × exp(±1.96 × √(b/(a·n₁) + d/(c·n₂))). A CI that excludes 1 indicates statistical significance at α = 0.05.

Disclaimer

For educational use. All cells should be ≥ 5 for reliable chi-square-based CIs. RR is not computable from case-control studies — use OR instead.

Frequently Asked Questions