Relative Risk Calculator With NNT, Risk Reduction and 95% CI

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free relative risk calculator. Enter events and group sizes to get relative risk with a 95% confidence interval, absolute and relative risk reduction, and NNT.

95% confidence interval
0
Absolute risk reduction
0
Relative risk reduction
0
Number needed to treat
0
Odds ratio
0

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the relative risk calculator

  1. Enter the number of events in the treated or exposed group: the people who had the outcome you're studying, such as a heart attack or an infection.
  2. Enter the size of that group.
  3. Enter the number of events in the control or unexposed group.
  4. Enter the size of the control group.

The relative risk calculator shows the relative risk (RR) with its 95% confidence interval, the absolute risk reduction (ARR), the relative risk reduction (RRR), the number needed to treat (NNT) and the odds ratio.

What is relative risk?

Relative risk compares how likely an outcome is in one group with how likely it is in another. It's used throughout medicine and public health, in clinical trials comparing a treatment with a placebo and in studies comparing people exposed to something, such as smoking, with people who weren't.

Risk in a group = number of events ÷ number of people

Relative risk = risk in the treated group ÷ risk in the control group

A relative risk of 1 means the risk is the same in both groups. Below 1, the outcome is less likely in the treated group; above 1, it's more likely.

How the relative risk calculator works

With the default figures, 15 of 100 treated people and 30 of 100 controls had the outcome:

  1. Risk in the treated group: 15 ÷ 100 = 15%.
  2. Risk in the control group: 30 ÷ 100 = 30%.
  3. Relative risk: 0.15 ÷ 0.30 = 0.5.
  4. Absolute risk reduction: 30% − 15% = 15 percentage points.
  5. Relative risk reduction: 1 − 0.5 = 50%.
  6. Number needed to treat: 1 ÷ 0.15 ≈ 6.67, rounded up to 7.
  7. Odds ratio: (15 ÷ 85) ÷ (30 ÷ 70) ≈ 0.41.

The 95% confidence interval for the relative risk is calculated on the log scale:

SE = √(1/a − 1/n₁ + 1/c − 1/n₂)

95% CI = exp(ln RR ± 1.96 × SE)

Here, SE = √(1/15 − 1/100 + 1/30 − 1/100) ≈ 0.283, and the interval runs from about 0.29 to 0.87. Because the whole interval is below 1, the result suggests a real reduction in risk, not just chance.

Relative and absolute risk

The same treatment effect can sound very different depending on how it's described. A relative risk reduction of 50% sounds impressive, but what it means depends on the starting risk:

  • If the control risk is 30%, halving it saves 15 people in every 100, an NNT of about 7.
  • If the control risk is 2%, halving it saves 1 person in every 100, an NNT of 100.

Both have a relative risk reduction of 50%, but the absolute benefit is fifteen times larger in the first case. That's why many experts recommend reporting absolute risks and NNTs alongside relative risks, so patients and clinicians can judge whether a treatment is worthwhile.

Number needed to treat

The NNT is the number of people who need to receive a treatment for one extra person to benefit, compared with the control. It's the reciprocal of the absolute risk reduction:

NNT = 1 ÷ ARR

It's conventionally rounded up to a whole number. A smaller NNT means a more effective treatment. When the treated group has a higher risk than the control group, the same calculation gives a number needed to harm (NNH): how many people would need the treatment for one extra person to be harmed. The relative risk calculator labels this as harm when it applies.

A worked example: a harm

In a study, 30 of 1,000 people taking a medicine had a side effect, compared with 20 of 1,000 taking a placebo.

  1. Risks: 3% and 2%.
  2. Relative risk: 1.5, a 50% increase.
  3. Absolute risk increase: 1 percentage point.
  4. Number needed to harm: 100.
  5. 95% CI for RR: about 0.86 to 2.62.

Enter these figures in the relative risk calculator to check. The confidence interval includes 1, so the study can't rule out chance as the explanation for the difference.

Relative risk and odds ratio

The odds ratio compares odds rather than risks: the odds of an event are events ÷ non-events. When the outcome is rare, below about 10% in both groups, the odds ratio and relative risk are similar. When the outcome is common, the odds ratio is further from 1 than the relative risk and can exaggerate the effect if misread as a relative risk. Case-control studies can estimate odds ratios but not relative risks directly, which is why both measures appear in research. Our odds ratio calculator focuses on that measure.

Who uses a relative risk calculator

Medical students and doctors use it to interpret clinical trials. Epidemiologists and public health analysts use it to compare risks between groups. Pharmacists use it to explain the benefits and harms of medicines. Health journalists use it to check claims in research press releases, and statistics students use it to learn measures of association.

Need more customers from Google?

This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.

Limits of the calculation

The relative risk calculator uses a simple two-group comparison. Real studies often need to account for differences between groups, follow-up time, people who drop out, and other factors, using more advanced statistical methods. Results from a single study also need to be considered alongside other evidence. When the number of events is small, confidence intervals are wide, and estimates are uncertain.

Common mistakes

  • Reporting only the relative risk reduction without the absolute risk.
  • Treating an odds ratio as a relative risk for common outcomes.
  • Ignoring the confidence interval, especially when it includes 1.
  • Rounding the NNT down instead of up.

Setting up a two-by-two table

The figures the relative risk calculator needs come from a two-by-two table, the standard way of summarising a study with two groups and a yes-or-no outcome:

Event No event Total
Treated or exposed a n₁ − a n₁
Control or unexposed c n₂ − c n₂

Reading a trial report, you can usually find the number of participants in each group and the number who had the outcome, often in a results table or the abstract. Enter a, n₁, c and n₂ into the calculator. Make sure the event counts and group sizes refer to the same outcome and the same follow-up period.

Confidence intervals in practice

A confidence interval shows the range of relative risks that are compatible with the data. A narrow interval means the estimate is precise, usually because the study was large or the outcome was common. A wide interval means there's a lot of uncertainty. If the interval includes 1, the study hasn't shown a clear difference between the groups, though that doesn't prove there's no difference: it may simply have been too small. Looking at where the interval lies, not just whether it crosses 1, helps judge whether an effect might be large enough to matter.

Time and follow-up

Risks depend on how long people are followed. A 10% risk over one year is very different from a 10% risk over ten years. The NNT, in particular, should always be stated with its time frame, such as "7 people treated for one year to prevent one event". When comparing NNTs between studies, check that the follow-up periods are similar.

Applying results to an individual

Relative risks from trials are often assumed to apply across groups of patients, while the absolute benefit depends on each person's own baseline risk. A person with a higher baseline risk usually gains more in absolute terms from the same relative reduction. That's why clinicians often estimate a patient's own risk first, then apply the relative risk from the evidence to estimate the absolute benefit for that person. The relative risk calculator helps show how these numbers fit together.

Zero events

If no one in the control group had the outcome, the relative risk can't be calculated, because it would mean dividing by zero. If either group has no events, the standard confidence interval formula also fails. Statisticians sometimes add a small correction, such as 0.5, to each cell of the table in that case; the relative risk calculator doesn't, and tells you instead.

Sources and further reading

Frequently asked questions

How do I calculate relative risk?

Divide the risk in the treated or exposed group by the risk in the control group.

What does a relative risk of 0.5 mean?

The outcome is half as likely in the treated group.

How is the number needed to treat calculated?

1 ÷ the absolute risk reduction, rounded up to a whole number.

What's the difference between relative and absolute risk reduction?

Relative is the proportional reduction; absolute is the difference in percentage points.

When is the odds ratio close to the relative risk?

When the outcome is rare in both groups.

Is the relative risk calculator free?

Yes. It's free, needs no sign-up, and works in your browser.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep