Relative Risk Calculator

This relative risk calculator takes the four cells of a cohort study. Example: 30 of 100 exposed and 15 of 100 unexposed people fall ill, which gives RR = 2 with a 95% confidence interval of 1.149 to 3.482.

Example: Exposed with event (a) 30 · Exposed without event (b) 70 · Unexposed with event (c) 15 · Unexposed without event (d) 85 → Result: Relative risk RR = 2 (95% CI: 1.149 to 3.482). Source: Wikipedia – Relative risk. Updated: .

My ToolboxYour inputs are saved in this browser only.

Result

Result
Relative risk RR = 2 (95% CI: 1.149 to 3.482)
All values
QuantityValue
Risk in the exposed R₁0.3
Risk in the unexposed R₀0.15
Relative risk RR2
95% confidence interval1.149 – 3.482
Risk difference R₁ − R₀0.15
NNT or NNH (1 / |difference|)6.66667
Calculation steps
  • R₁ = 30 / 100 = 0.3 and R₀ = 15 / 100 = 0.15.
  • RR = 0.3 / 0.15 = 2.
  • Standard error of ln(RR): SE = √(1/30 − 1/100 + 1/15 − 1/100) = 0.282843.
  • Confidence interval: exp(ln(2) ± 1.96 · 0.282843) = 1.149 to 3.482.
The interval does not include 1: the difference is noteworthy at the 5% level. Statements about causes also depend on sound study design.

How it is calculated

The relative risk (risk ratio) compares how likely an event is in two groups: it divides the risk in the exposed group by the risk in the unexposed group.

Formula and working

From the 2×2 table, R₁ = a / (a + b) and R₀ = c / (c + d). The relative risk is RR = R₁ / R₀. The confidence interval is built on the log scale because ln(RR) is approximately normal: SE = √(1/a − 1/(a + b) + 1/c − 1/(c + d)), limits = exp(ln RR ± 1.96 · SE). Converting back with the exponential makes the interval asymmetric.

Worked example

In a cohort, 30 of 100 exposed people fall ill (R₁ = 0.3) and 15 of 100 unexposed people (R₀ = 0.15). So RR = 0.3 / 0.15 = 2. The standard error is √(1/30 − 1/100 + 1/15 − 1/100) = √0.08 = 0.282843, and ln 2 = 0.693147. The interval runs from exp(0.693147 − 0.554372) = 1.149 to exp(0.693147 + 0.554372) = 3.482. Because 1 lies outside it, the data point to a raised risk.

How to read the result

RR = 1 means equal risk, above 1 a higher and below 1 a lower risk in the exposed group. The relative risk needs group sizes that were truly observed, as in cohort studies or trials. In case-control studies the number of cases is fixed by design, so only the odds ratio is valid.

Frequently asked questions

How do you calculate relative risk?

Divide the risk in the exposed group, a / (a + b), by the risk in the unexposed group, c / (c + d). With 30 of 100 against 15 of 100 this gives 0.3 / 0.15 = 2.

What does the 95% confidence interval tell me?

It shows how uncertain RR is because of sampling. If it contains 1, a difference is not established; if it lies entirely above 1 (here 1.149 to 3.482), the risk is clearly raised.

How does it differ from the odds ratio?

The odds ratio compares odds a/b and c/d, the relative risk compares probabilities. For rare events the two are close; for common events the odds ratio exaggerates.

Sources and legal basis

As of: · Editorial policy

Related tools