Research learning · Free tool
Study Risk Difference & Relative Risk Calculator
Compare event proportions in two study groups using a 2×2 table. Calculate risk difference in percentage points and relative risk, with zero-denominator limits explained.
No sign-up · Calculations in this browser · Copy and download results
For learning and preparation. This tool does not diagnose conditions or recommend treatment. Do not enter patient identifiers.
Loading the calculator. JavaScript is required to calculate. Instructions and sources are available below.
Your result
How to use this tool
- Use aggregate counts for two groups observed for the same outcome over a comparable follow-up period.
- Count each participant once as event or no event within their group; the two cells sum to that group’s denominator.
- Read the direction carefully: the difference is A minus B, and the ratio is A divided by B.
Worked example
Group A: 20 events and 80 non-events. Group B: 10 events and 90 non-events. The proportions are 20% and 10%, the risk difference is +10 percentage points, and relative risk is 2.
Assumptions and limits
- Event proportion = participants with an event ÷ all participants in the group. Risk difference = proportion A − proportion B, shown as percentage points. Relative risk = proportion A ÷ proportion B.
- This simple model is suitable for teaching with cohort or trial counts where the group denominators represent participants at risk. It is not a case-control odds-ratio calculation, a person-time rate ratio, or a survival analysis.
- The calculation does not account for missing outcomes, unequal follow-up, repeated events, censoring, clustering, confounding, or sampling uncertainty. Use a suitable study analysis for those situations.
- A zero group total is rejected. If Group B has no events, relative risk is undefined, including when both groups have no events; the risk difference is still shown. No 0.5 continuity correction is added.