Relative Risk Calculator
Whether you're a doctor, a statistician, or a researcher, you will find this relative risk calculator to be of great help. With just a few clicks, you will be able to determine the risk ratio between two groups of various exposure levels. And that's not all! Scroll down to discover the relative risk formula and a thorough explanation of how to calculate the relative risk and its confidence interval.
What is the risk ratio?
According to the definition, relative risk, also called the risk ratio, compares the probability of a disease being developed in a group exposed to a particular factor to the probability of the same disease being developed in a control group. But what does it mean in plain English?
Let's say you hypothesize that drinking substantial amounts of alcohol (more than two drinks a day) increases the risk of liver failure. You choose two groups of 100 patients each. The members of the control group keep the two drinks limit, while the others don't. You discover that in the control group, only one person experienced liver failure, while in the other  eight people did.
The relative risk associated with that study would be equal to eight. It means that the risk of liver failure is eight times higher for heavy drinkers.
How did we calculate that? Keep reading to find out!
Relative risk formula
We used the relative risk formula to calculate the risk ratio between the control group and the group of heavy drinkers. The formula looks as follows:
RR = [a / (a + b)] / [c / (c + d)]
where:

a is the number of members of the exposed group who developed the disease;

b is the number of members of the exposed group who didn't develop the disease;

c is the number of members of the control group who developed the disease;

d is the number of members of the control group who didn't develop the disease;

RR is the relative risk.
After calculating the risk ratio, you will probably want to understand what the result means. You can interpret it according to the guidelines below:

If the relative risk is equal to 1, it means that there is no difference in the risk between the two groups. In our example, it would mean that the drinking habits don't influence the probability of liver failure.

If relative risk is lower than 1, it means that the risk is lower in the exposed group. In our example, it would suggest that heavy drinkers are more immune to liver failure than the control group.

If relative risk is higher than 1, it means that the risk is higher in the exposed group. In our example, it would mean that heavy drinkers are more prone to liver failure than the control group  precisely as we calculated.
How to calculate relative risk and the confidence interval
Now that you know the relative risk formula, we can substitute the numbers from the drinking example into it to check whether the result was correct:
RR = [a / (a + b)] / [c / (c + d)]
RR = [8 / 100] / [1 / 100]
RR = 8 / 1
RR = 8
How accurate is this result, though? It all depends on the confidence level you choose. In short, the confidence level describes how sure we can be that the result lies within a particular range, called the confidence interval.
You can calculate the bounds of the confidence interval according to the following equations:
lower bound = exp[ ln(RR)  Zc * √(1/a + 1/c  1/(a + b)  1/(c + d))]
upper bound = exp[ ln(RR) + Zc * √(1/a + 1/c  1/(a + b)  1/(c + d))]
where Zc stands for the Zscore corresponding to the chosen confidence level.
Let's come back to our example with the drinkers. You can use this relative risk calculator to find out that, for the confidence level of 95%, the confidence interval is between 1.02 and 62.7. It means you can be 95% sure that the real relative ratio lies between these two numbers. That doesn't look like an exact answer, does it?
Let's see what happens if we take two groups of 1000 members each instead, keeping the proportions exactly as before (this time, 80 liver failures among heavy drinkers and 10 in the control group). While the relative risk stays the same, the confidence interval shrinks from 4.17 to 15.34. That's much better!
As you can see in this example, it's crucial to analyze a sample big enough to ensure that the confidence interval is sufficiently small. You can look at the sample size calculator to learn more about this principle.