Works on this device
Relative Risk Calculator
Find the relative risk, also called the risk ratio, of two groups. Type a 2×2 table to get the risk ratio with its confidence interval and the working, or type two risks in percent. This page is for learning and for checking arithmetic. It is not medical advice.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to use this calculator
- Choose Relative risk from a 2×2 table, or Relative risk from two risks in percent.
- For a table, type the people of group 1 (exposed or treated) with and without the outcome, and the same for group 2 (not exposed or control). You can type the people with the outcome and the size of each group instead.
- Choose the confidence level. Tick the 0.5 correction only if a group has no one with the outcome and you want an interval.
- Choose Calculate. You get the risk ratio, its interval, the risks of both groups, the working, and the same table in the other risk measures.
The formulas
- Risk of a group = people with the outcome ÷ people in the group. Group 1: a ÷ n1. Group 2: c ÷ n2.
- Risk ratio (relative risk) = (a ÷ n1) ÷ (c ÷ n2).
- Log-method interval: exp(ln RR ± z × SE), with SE = √(1/a − 1/n1 + 1/c − 1/n2). z is 1.96 for 95%.
- Correction (an option, off by default): when a cell is 0, add 0.5 to every cell, so each group grows by 1.
- A risk ratio of 1 means the same risk in both groups. Below 1 the risk is lower in group 1; above 1 it is higher.
Worked example
In group 1, 30 of 300 people had the outcome: a risk of 10%. In group 2, 60 of 300 had it: a risk of 20%. Risk ratio = 10% ÷ 20% = 0.5, so the risk in group 1 is 50% lower.
SE = √(1/30 − 1/300 + 1/60 − 1/300) = 0.2082. The 95% interval is exp(−0.6931 ± 1.96 × 0.2082) = 0.3325 to 0.7519. The whole interval is below 1.
Other measures from the same table
The result also shows the same table as an odds ratio, an absolute risk reduction, a relative risk reduction and a number needed to treat. Each has its own calculator, and they all give the same numbers for the same table: the Odds Ratio Calculator, the Absolute Risk Reduction Calculator, the Relative Risk Reduction Calculator and the Number Needed to Treat Calculator.
A risk ratio says nothing about how common the outcome is. A risk ratio of 0.5 can mean 20% against 10%, or 0.02% against 0.01%. Look at the absolute risk reduction as well.
Limits you should know
- Risks need groups that were followed forward in time, as in a cohort study or a trial. For a case-control study use the odds ratio.
- The log-method interval is an approximation for large groups. It cannot be worked out when a group has no one with the outcome, unless you tick the correction.
- Two risks in percent give a risk ratio but no interval, because an interval needs the numbers of people.
- A risk ratio describes an association in the data. It does not show that the exposure caused the outcome.
- This page is for learning and for checking arithmetic. It is not medical advice. Talk about results that concern your own health or treatment with a clinician.