Relative Risk Calculator
A relative risk of 2.00 means the exposed group is twice as likely to see the outcome. With 40 sick out of 200 exposed and 20 sick out of 200 unexposed, 0.20 / 0.10 = 2.00, the risk difference is 0.10, the odds ratio is 2.25, and the 95 percent interval runs from 1.21 to 3.30.
Enter the four counts from a two by two table. Row one is the exposed group, row two is the comparison group.
| Relative risk | |
| Risk in the exposed group | |
| Risk in the unexposed group | |
| 95 percent confidence interval | |
| Risk difference | |
| Odds ratio | |
| Relative change | |
| People per one extra or prevented case | |
Relative risk = (a / (a + b)) / (c / (c + d)). The interval uses the log method with 1.96 for 95 percent. Everything runs in your browser and nothing you enter is stored.
Enter the four counts from a two by two table to get the risk in each group, the relative risk, the risk difference, the odds ratio and a 95 percent confidence interval.
Key takeaways
- Relative risk is the risk in the exposed group divided by the risk in the unexposed group, so 40 of 200 against 20 of 200 gives 0.20 / 0.10 = 2.00.
- A value of 1.00 means no difference, above 1.00 means more risk and below 1.00 means less risk.
- The same table gives a risk difference of 0.10, which is 10 extra cases per 100 people and a number needed to harm of 10.
- The odds ratio for that table is 2.25, not 2.00, because the outcome shows up in 20 percent of the exposed group.
- A 95 percent interval of 1.21 to 3.30 clears 1, so the increase is statistically significant but its size is still uncertain.
On this page
- What relative risk measures
- The two by two table behind the number
- Worked example: potato salad at a company picnic
- Reading values above, below and at one
- Relative risk and odds ratio diverge on common outcomes
- Confidence intervals and statistical significance
- Absolute risk, risk difference and number needed to harm
- Mistakes that change the answer
What relative risk measures
Relative risk compares the chance of an outcome in one group with the chance in another group. Public health texts also call it the risk ratio, and the CDC Principles of Epidemiology defines it as the risk in the group of interest divided by the risk in the comparison group. The arithmetic is one division, but the two numbers that go into it decide what the answer means.
Risk here means the share of a group that develops the outcome. Forty cases in a group of 200 is a risk of 40 / 200 = 0.20, or 20 percent. A relative risk of 2.00 says the first group is twice as likely to see the outcome as the second. A relative risk of 1.00 says the two groups look the same at the precision reported.
| Relative risk | Plain reading | How it usually gets written |
|---|---|---|
| 0.50 | Half the risk of the comparison group | 50 percent lower risk |
| 0.80 | One fifth lower | 20 percent lower risk |
| 1.00 | No difference between the groups | the same risk |
| 1.50 | Half again as likely | 50 percent higher risk |
| 2.00 | Twice as likely | double the risk |
| 3.00 | Three times as likely | triple the risk |
Both parts of the ratio carry the same unit, so the result is a pure number. That portability is why news reports, package inserts and outbreak notices quote relative figures instead of raw counts, and it is also why they can mislead when the baseline is left out.
The two by two table behind the number
Almost every relative risk starts as a two by two table. Rows are exposure status, columns are outcome status, and the cells hold four counts: a is exposed with the outcome, b is exposed without it, c is unexposed with the outcome, and d is unexposed without it.
| Outcome | No outcome | Total | |
|---|---|---|---|
| Exposed | a | b | a + b |
| Unexposed | c | d | c + d |
Risk in the exposed group is a / (a + b). Risk in the unexposed group is c / (c + d). Relative risk divides the first risk by the second. Two habits keep the work straight: write the denominator in words before dividing, and keep the counts beside the percentages so a reader can check the arithmetic.
This calculator takes the four raw counts rather than percentages, because percentages are already rounded. With counts of 40, 160, 20 and 180 the two risks are 0.20 and 0.10 and the ratio is 2.00. Percentages of 20 and 10 would give the same answer here, but a table reported as 33 percent and 67 percent has lost the counts that a confidence interval needs.
Worked example: potato salad at a company picnic
At a picnic, 200 people ate the potato salad and 200 did not. Forty of the people who ate it reported stomach trouble within 12 hours, and 20 of the people who skipped it did too. The counts go into the table in one pass.
| Group | Sick | Not sick | Total | Risk |
|---|---|---|---|---|
| Ate potato salad | 40 | 160 | 200 | 40 / 200 = 0.20 |
| Did not eat it | 20 | 180 | 200 | 20 / 200 = 0.10 |
| Total | 60 | 340 | 400 | 60 / 400 = 0.15 |
Risk in the exposed group is 40 / 200 = 0.20, or 20 percent. Risk in the unexposed group is 20 / 200 = 0.10, or 10 percent. Relative risk is 0.20 / 0.10 = 2.00, so people who ate the salad were twice as likely to get sick.
The odds ratio uses the same four cells: 40 x 180 / (160 x 20) = 2.25. The two measures agree on the direction and disagree on the size, which is expected whenever the outcome is common enough to show up in 20 percent of a group.
A relative risk of 2.00 is not proof that the salad caused the illness. It is a signal that points at the salad, and an investigator still has to culture the leftovers, check the handling timeline and interview the people who did not get sick before calling it a foodborne outbreak.
Reading values above, below and at one
One is the fulcrum. A value above one means the exposed group had more of the outcome. A value below one means it had less. A value of exactly 1.00 means the two groups were the same at the precision reported, not that the exposure is harmless.
Values below one need careful wording. A relative risk of 0.20 after vaccination means the vaccinated group had one fifth the risk, which is the same statement as an 80 percent reduction. That reduction is relative. The absolute drop depends on how common the outcome was to begin with, so the same 0.20 can mean 16 cases prevented per 100 people or 2 cases prevented per 100,000.
| Relative risk | Change in risk | Sentence that matches |
|---|---|---|
| 0.90 | 10 percent lower | The exposed group had 10 percent less risk. |
| 0.75 | 25 percent lower | Risk fell by a quarter. |
| 0.50 | 50 percent lower | Risk was halved. |
| 0.20 | 80 percent lower | Risk was one fifth as high. |
| 1.25 | 25 percent higher | The exposed group had a quarter more risk. |
| 3.00 | 200 percent higher | Risk tripled. |
Watch the difference between 200 percent higher and 200 percent of. A relative risk of 3.00 is three times the risk, which is an increase of 200 percent. Reports that write 300 percent higher when they mean three times as high overstate the change by a factor of two.
Relative risk and odds ratio diverge on common outcomes
The odds ratio divides the odds of the outcome in the exposed group by the odds in the unexposed group: a x d / (b x c). It is the only measure a case-control study can produce, because the researcher fixes how many cases and controls enter the study and the resulting risks are artifacts of that choice.
When the outcome is rare, the odds ratio sits close to the relative risk, which is why textbooks allow the shortcut. The gap grows as the outcome becomes more common. In the picnic table the relative risk is 2.00 and the odds ratio is 2.25, a 12.5 percent difference that comes entirely from the 20 percent baseline.
| Measure | Formula | Picnic value | Typical use |
|---|---|---|---|
| Risk, exposed | a / (a + b) | 0.20 | Describing one group |
| Risk, unexposed | c / (c + d) | 0.10 | Describing the comparison group |
| Relative risk | 0.20 / 0.10 | 2.00 | Cohort studies, trials, outbreaks |
| Odds ratio | a x d / (b x c) | 2.25 | Case-control studies |
| Risk difference | 0.20 - 0.10 | 0.10 | Public health impact, NNT |
If a paper reports an odds ratio of 4.0 for a common outcome, the relative risk is smaller, often much smaller. Converting one to the other needs the baseline risk, and the worked example in this review of odds ratios shows how far apart the two can drift when the outcome is not rare.
Confidence intervals and statistical significance
A point estimate from one sample is not the whole story. A 95 percent confidence interval gives the range of values compatible with the observed counts, and for a ratio it is computed on the log scale so the interval stays symmetric after exponentiation.
The standard error of the log relative risk is the square root of 1 / a - 1 / (a + b) + 1 / c - 1 / (c + d). For the picnic table that sum is 1 / 40 - 1 / 200 + 1 / 20 - 1 / 200 = 0.065, so the standard error is 0.2550.
The log of 2.00 is 0.6931. The lower end of the interval is 0.6931 - 1.96 x 0.2550 = 0.1933 and the upper end is 0.6931 + 1.96 x 0.2550 = 1.1929. Exponentiating those two values gives 1.21 and 3.30, so the 95 percent interval runs from 1.21 to 3.30.
| Example | Relative risk | 95 percent interval | Reading |
|---|---|---|---|
| Picnic potato salad | 2.00 | 1.21 to 3.30 | Higher risk, interval clears 1 |
| Vaccine, 5 of 2,000 against 25 of 2,000 | 0.20 | 0.08 to 0.52 | Lower risk, interval clears 1 |
| Small sample, 3 of 20 against 2 of 20 | 1.50 | 0.28 to 8.0 | Too wide to call |
The same log method is what statistical software prints. Epi Info's output for a cohort table in these San Jose State epidemiology notes reports a risk ratio of 4.99 with 95 percent limits of 1.55 to 16.03, and a hand calculation from the four counts lands on the same pair.
An interval entirely above 1 supports a real increase. An interval entirely below 1 supports a real decrease. An interval that contains 1 is compatible with no difference, which is not the same as proving there is none. The width matters too: a range of 1.21 to 3.30 rules out no effect but leaves the size open.
Absolute risk, risk difference and number needed to harm
Relative numbers travel well and hide the base rate. The risk difference keeps it. Subtracting one risk from the other in the picnic table gives 0.20 - 0.10 = 0.10, or 10 percentage points. Ten extra cases per 100 people is a different message from twice the risk, even though both come from the same four counts.
The reciprocal of the risk difference is the number needed to harm. Here 1 / 0.10 = 10, so about ten people have to eat the salad for one extra illness to appear. When the exposure helps instead of harms, the same arithmetic gives the number needed to treat. In the vaccine example the risk difference is 0.0125 - 0.0025 = 0.01, so 1 / 0.01 = 100 people need the vaccine for one case to be prevented.
| Measure | Picnic table | Vaccine table |
|---|---|---|
| Risk in the exposed group | 0.20 | 0.0025 |
| Risk in the unexposed group | 0.10 | 0.0125 |
| Relative risk | 2.00 | 0.20 |
| Risk difference | 0.10 | 0.01 |
| People per one extra or prevented case | 10 | 100 |
Both tables describe a real effect and they lead to different decisions. A relative risk of 2.00 on a baseline of 1 case per 100,000 moves the exposed group to 2 cases per 100,000, an absolute change of 1 case per 100,000. That is a small change for an individual and a large one for a regulator looking at a whole population, and the risk difference is the number that keeps both views honest.
Mistakes that change the answer
Wrong denominator. Dividing cases by the whole sample instead of by the exposed total turns a risk into a share of everyone and shrinks the ratio. Write the denominator in words first: risk among the exposed, risk among the unexposed.
Odds ratio reported as relative risk. With the picnic numbers the gap is 2.25 against 2.00. With a 50 percent baseline the same data can produce an odds ratio near 3 while the relative risk stays at 2, and a headline built on the odds ratio overstates the effect.
Ignoring the baseline. Doubling a risk of 1 in a million is not a public health emergency. The relative figure is the same as doubling a risk of 1 in 10, and the consequences are not.
Reading a wide interval as a finding. A relative risk of 1.50 with an interval of 0.28 to 8.0 is consistent with a strong benefit, no effect and a strong harm. The point estimate alone invites a conclusion the data cannot support.
Confounding and healthy-worker effects. People who take a supplement may also exercise more, and people well enough to work are healthier than people who are not. A ratio computed from two groups that differ in age, smoking or income describes those differences as much as the exposure.
Case-control data pushed into a risk. When cases and controls are enrolled by design, the proportion with the exposure is set by the sampling, so a risk built from those counts is meaningless. Report the odds ratio and leave relative risk out of it.
Frequently asked questions
What is relative risk?
A ratio of two risks. Divide the share of the exposed group that had the outcome by the share of the unexposed group that had it. With 40 of 200 exposed and 20 of 200 unexposed, 0.20 / 0.10 = 2.00.
How do I calculate relative risk from a two by two table?
Label the cells a, b, c and d, where a and c are the cases in the exposed and unexposed groups. Compute a / (a + b) for the exposed risk and c / (c + d) for the unexposed risk, then divide the first by the second.
What does a relative risk of 1.00 mean?
The two groups had the same risk at the precision reported. It does not mean the exposure has no effect. A small study can produce a ratio near 1.00 with an interval that still includes a meaningful increase.
How do I read a relative risk of 0.75?
The exposed group had three quarters of the comparison risk, which is a 25 percent reduction. The absolute change depends on the baseline: 25 percent off a risk of 0.20 saves 0.05, while 25 percent off 0.0004 saves almost nothing.
What is a good confidence interval for relative risk?
One that does not cross 1 and is narrow enough to be useful. The picnic example gives 1.21 to 3.30, which rules out no effect but leaves the size of the effect uncertain. An interval of 0.90 to 1.10 says the data cannot settle the question.
Why is the odds ratio 2.25 when the relative risk is 2.00?
The odds ratio divides odds instead of risks, and odds run ahead of risks as the outcome gets more common. With a 20 percent baseline in the exposed group the two measures differ by about 12 percent. The gap shrinks toward zero as the outcome becomes rarer.
Can relative risk be negative?
No. Both risks are counts divided by totals, so both are zero or positive, and their ratio cannot go below zero. A value under 1 still describes a real reduction, and the smallest possible value is 0 when the exposed group has no cases.
What is the difference between relative risk and risk difference?
Relative risk divides one risk by the other and answers how many times as likely. Risk difference subtracts and answers how many extra cases per group of 100. In the picnic example the relative risk is 2.00 and the risk difference is 0.10, or 10 percentage points.
What is relative risk reduction?
One minus the relative risk, read as a percent. A relative risk of 0.20 is a reduction of 1 - 0.20 = 0.80, or 80 percent. It is the figure vaccine trials usually report, and it always needs the absolute numbers beside it.
How many events do I need for a stable relative risk?
A common rule of thumb is at least 5 events in each group. With 3 cases in one arm the interval is wide and unstable. The picnic table has 40 and 20 cases, which is comfortable. Counts of 2 and 1 produce an interval that spans an order of magnitude.
Is relative risk the same as a hazard ratio?
No. A hazard ratio compares event rates over time and accounts for when each event happened, while relative risk compares the share of each group that had the event by the end of the follow-up. The two are close when events are rare and follow-up is complete.
Can I use relative risk with case-control data?
No. In a case-control study the number of cases and controls is fixed by the researcher, so the risks in each exposure group are artifacts of the sampling plan. The odds ratio is the measure to report, and it approximates the relative risk only when the outcome is rare.
What happens when one cell of the table is zero?
The standard error formula divides by a and by c, so a zero cell breaks it. This calculator adds 0.5 to all four cells for the interval only, the Haldane-Anscombe correction, and says so in the result. The point estimate still uses your raw counts.
Is a relative risk of 2.00 a large effect?
Depends on the baseline. Doubling a risk of 0.0004 adds 4 cases per 10,000 people. Doubling a risk of 0.20 adds 2,000 cases per 10,000. The ratio is identical and the public health meaning is not, which is why both measures belong in a report.
Does this page give medical advice?
No. It performs the arithmetic of a risk ratio from the counts you enter. For a diagnosis, a treatment decision or an interpretation of your own lab results, talk to a clinician who can see your history.
Spotted a wrong number or a broken result?
More Everyday tools
- 1 Hour Cycling Calories Calculator
- 1 Hour Lunch Break Calculator
- 1 Million in Numbers
- 1 Weeks Ago From Today
- 1 in 60 Rule Calculator
- 10 Day Payoff Calculator
- 10 Hour Shift Schedule Calculator
- 10 Minutes From Now
- 10 Months Ago From Today
- 10 to 1 Arm Workout Calculator
- 10207 2: Log Base 2 Calculator
- 1099 Hourly Rate Calculator
- 11 Months Ago From Today
- 11 Weeks Ago From Today
- 12 Hour Shift Pay Calculator
- 12 Months Ago From Today
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.