Calculators
Relative Risk Calculator
Compute relative risk from a 2×2 table with 95% confidence interval and p-value — the natural measure of association for cohort studies and randomized trials.
The Formula Behind the Result
- Enter the four counts: events and non-events in the exposed group (a, b) and in the unexposed group (c, d).
- Risk in each group is computed as events ÷ total, and RR = risk exposed ÷ risk unexposed.
- The 95% confidence interval uses the standard log-scale (Katz) method, and a two-sided p-value is reported.
- Absolute risk difference and the number needed to treat (NNT) are included, because relative and absolute effects answer different questions.
Worked Example
Common Questions
How is relative risk different from odds ratio?
RR compares probabilities (risk ÷ risk); OR compares odds (odds ÷ odds). They agree when the outcome is rare (<10%) but diverge for common outcomes, where OR exaggerates the effect. Cohort designs can estimate RR directly; case-control designs cannot.
What is number needed to treat (NNT)?
NNT = 1 divided by the absolute risk difference. It answers the practical question: how many patients must receive the intervention for one additional event to be prevented? It only makes sense when the intervention reduces risk.
Can RR be negative or above 1 for a benefit?
RR ranges from 0 to infinity. An RR below 1 means the exposure reduces risk (a benefit); above 1 means it increases risk. The calculator labels the direction for you so a "protective" number is never misread as harm.
What if a group has zero events?
RR = 0 or infinity is not interpretable, and the log-scale interval fails. Standard practice adds 0.5 to all four cells (the Haldane correction) or reports an exact interval; the tool flags the situation instead of printing a misleading value.
Related Calculators
Odds Ratio Calculator
Compute the odds ratio from a 2×2 contingency table with 95% confidence interval and p-value — the standard measure of association for case-control studies.
Confidence Interval Calculator (Proportion)
Build a confidence interval for a proportion from successes and trials — with the Wilson interval that stays accurate for small samples and 0% or 100% results.
P-Value Calculator
Convert a test statistic (z, t, or χ²) into its p-value — one- and two-sided — with plain-language guidance on what the number does and does not mean.