Statistics & Probability

Relative Risk and Odds Ratio Calculator

Compare outcomes between an exposed group and an unexposed group.

Your numbers

Your results

Relative risk
Relative risk
—
Risk difference
—
Odds ratio
—
Number needed to treat / harm
—

Relative Risk and Odds Ratio Calculator by TheCalcTools

How the Relative Risk and Odds Ratio Calculator works

Enter the counts for each cell of the 2×2 table.

Risk is the share of each group that has the outcome.

Relative risk compares the two risks; the odds ratio compares the odds.

The formula

RR = [a ÷ (a + b)] ÷ [c ÷ (c + d)]OR = (a × d) ÷ (b × c)

Worked example

Using the default values shown in the calculator:

Exposed, with outcome30
Exposed, no outcome70
Unexposed, with outcome15
Unexposed, no outcome85
  1. Risk in the exposed group = 30 ÷ 100 = 30%; unexposed = 15 ÷ 100 = 15%.
  2. Relative risk = 0.30 ÷ 0.15 = 2.00.
  3. Odds ratio = (30 × 85) ÷ (70 × 15) = 2.429.

Result:

Relative risk2.000
Risk difference15.00%
Odds ratio2.429
Number needed to treat / harm6.7

Frequently asked questions

When do the odds ratio and relative risk differ?

They are similar when the outcome is rare. When it is common the odds ratio overstates the relative risk.

What does an RR of 2 mean?

The exposed group is twice as likely to have the outcome as the unexposed group.

Sources and further reading

More in Statistics & Probability · All calculators

This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.