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|
| Cell | Meaning | Example |
|---|---|---|
| a | Exposed AND outcome (true positive) | Treated patients with event |
| b | Exposed AND no outcome | Treated patients without event |
| c | Unexposed AND outcome | Control patients with event |
| d | Unexposed AND no outcome | Control 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) | Total | Risk | |
|---|---|---|---|---|
| Treated | a = 20 | b = 80 | 100 | 20% |
| Control | c = 40 | d = 60 | 100 | 40% |
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
| Measure | Best for | Interpretation |
|---|---|---|
| Relative Risk (RR) | Cohort studies, clinical trials | More intuitive: RR=0.5 means "half the risk" |
| Odds Ratio (OR) | Case-control studies, logistic regression output | Approximates RR when outcome is rare (<10%) |
| ARR / NNT | Clinical decision-making | NNT=5 is always easier to communicate than RR=0.5 |
| RRR | Marketing, reporting | Always 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.
Related Calculators
Test if two proportions differ
Chi-Square CalculatorAssociation test for 2×2 tables
Confidence Interval CalculatorCIs for means and proportions
Effect Size ExplainedOdds ratio as an effect size
Bayes Theorem CalculatorSensitivity, specificity, PPV
Statistics HubAll statistics calculators
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.