StatGardenREF. DESK
Calculators/Statistics/Relative risk
Statistics

Relative risk calculator

Compares event risk between an exposed and an unexposed (or treated and control) group.

Published 6 August 2026 · Updated 25 September 2026

What this calculator does

Relative risk divides the event rate in one group by the rate in another. Forty events in 200 exposed against twenty in 200 unexposed gives a relative risk of 2.000, a doubling.

Relative risk alone is close to useless without the underlying rates, and this is the most consequential thing on the page. A rate going from 1.0% to 1.5% is also a 50% increase in relative terms, but the absolute difference is half a percentage point and the number needed to harm is 201. Headlines quote the relative figure because it is larger; the absolute figure is what tells you whether to care.

The formula

FormulaRR = (x₁/n₁) / (x₂/n₂); ARR = x₁/n₁ − x₂/n₂; NNT = 1/|ARR|

Each group risk is its event count divided by its size, and the relative risk is the first divided by the second. The absolute risk difference subtracts them, and the number needed to treat or harm is one divided by that difference, rounded up. It is the number of people who would need to be exposed or treated for one additional event to occur.

TermMeaning
Relative riskThe ratio of the two risks. 1 means no difference.
Absolute risk differenceThe arithmetic difference between the risks, in percentage points.
Number needed to treatHow many must be treated for one additional good outcome. Its mirror is number needed to harm.
Baseline riskThe rate in the unexposed group, which determines what a relative risk actually means in practice.

The inputs explained

FieldWhat to enter
Group 1 (exposed) sizeSize of the exposed or treated group.
Group 1 eventsEvents in that group.
Group 2 (unexposed) sizeSize of the unexposed or control group.
Group 2 eventsEvents in that group.

When to use it

Reading a health claim

Converting a reported relative risk back into absolute terms is the fastest way to judge whether a finding matters.

Reporting a trial

Good practice reports relative risk, absolute difference and number needed to treat together, since each answers a different question.

Comparing exposures

Any two-group comparison of a binary outcome, from occupational exposure to product defect rates.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How do the risk measures compare?

A range of event counts in the exposed group.

Both groups of 200, control has 20 events
Events in group 1 (of 200)Relative riskAbsolute risk differenceNumber needed to treat/harm
10 events0.5000-5.00%20
20 events1.0000.000%N/A: no difference in risk
30 events1.5005.00%21
40 events2.00010.0%10
Equal counts give a relative risk of exactly 1 and no number needed to treat, since there is no difference to divide into. Note that halving and doubling are not symmetric in absolute terms: ten events gives a relative risk of 0.5000 but only a 5 percentage point difference and an NNT of 20, while forty gives 2.000, a 10 point difference and an NNT of 10. The same relative distance from 1 can mean twice the absolute effect.

Questions

Why does relative risk overstate things?

Because it hides the baseline. A doubling of a rare risk is still a rare risk: 1 in 10,000 rising to 2 in 10,000 is a relative risk of 2 but an absolute increase of 0.01 percentage points. Always ask what the underlying rate was before reacting to a relative figure.

What is number needed to treat?

How many people must receive a treatment for one additional person to benefit. An NNT of 10 means ten treated for one extra good outcome. It converts a statistical result into something clinically interpretable, and it rises sharply when the baseline risk is low.

What is the difference between relative risk and odds ratio?

Relative risk compares probabilities; the odds ratio compares odds. They are close when the outcome is rare but diverge substantially when it is common, with the odds ratio always further from 1. Case-control studies can only produce odds ratios, which is why both measures persist.

Does a relative risk of 2 mean the exposure caused it?

No. This is an association measure. Causation requires ruling out confounding, reverse causation and selection effects, which needs study design rather than arithmetic. An observational relative risk of 2 is suggestive but a long way from established causation.

For diagnostic test performance, see the diagnostic test metrics calculator. For comparing two proportions formally, see the two-proportion z-test calculator.