Relative Risk Calculator

Compare the risk of an outcome between an exposed and unexposed group. Enter the four counts from your 2x2 table.

Learn how to calculate it yourself

Enter your values

Results update as you type.

Relative risk

2
95% CI
1.149 to 3.482
Calculated in your browser. No data is sent to us.

Calculate it yourself

Use a = 30 exposed people with the outcome, b = 70 exposed without it, c = 15 unexposed with it and d = 85 unexposed without it.

Follow this worked example, then repeat the steps with your own numbers.

  1. Calculate outcome risk in each group

    Exposed risk = a/(a + b) = 30/100 = 0.30. Unexposed risk = c/(c + d) = 15/100 = 0.15.
  2. Divide the two risks

    RR = 0.30 ÷ 0.15 = 2.
  3. Calculate the standard error on the log scale

    SE = √[1/30 − 1/100 + 1/15 − 1/100] = √0.08 ≈ 0.28284.
  4. Transform the confidence limits back

    95% limits = exp[ln(2) ± 1.96 × SE] ≈ 1.15 to 3.48.

    ln is the natural logarithm and exp reverses it. A ratio of 2 means the observed outcome risk in the exposed group is twice that in the comparison group.

To match this calculator, add 0.5 to all four cells if any cell is zero. Comparisons of observed risks do not by themselves establish a causal effect.

Check your answer in the calculator

Built into PaperSurvey.io

Choose exposure and outcome questions to compare observed risks using the Relative risk figure in the Odds Ratio widget.

PaperSurvey Odds Ratio widget showing relative risk 0.36 beside odds ratio 0.27.
View full-size screenshot
Example from PaperSurvey.ioThe Relative risk value is 0.36; the confidence interval shown in this widget belongs to the odds ratio.

Relative risk vs odds ratio

Relative risk is the probability of the outcome in the exposed group divided by the probability in the unexposed group. A value of 1 means no difference, above 1 means higher risk with exposure and below 1 means lower risk. It is more intuitive than the odds ratio, which compares odds rather than probabilities, though the two agree closely when the outcome is rare.

How the counts map

Enter exposed-with-outcome, exposed-without-outcome, unexposed-with-outcome and unexposed-without-outcome. If any cell is zero, a Haldane-Anscombe correction of 0.5 is added to every cell so the ratio and its confidence interval stay defined. A 95% interval that excludes 1 points to a statistically significant association.

Frequently asked questions

Should I report relative risk or the odds ratio?

For cohort and experimental data where you can measure risk directly, relative risk is usually the clearer choice. Case-control studies typically report the odds ratio instead.

Embed this calculator on your site

Free to use. Paste this snippet wherever you want the calculator to appear.


Get Started with PaperSurvey.io Software

Get Started

Start your 14-day free trial now, no credit card required.