BiostatKit Tiếng Việt

BiostatKit / Risk & odds / Relative risk

Relative Risk Calculator

Enter a 2x2 table from a cohort study or a trial and get the relative risk, the absolute risk reduction (ARR) and the relative risk reduction (RRR), each with a 95% confidence interval, plus a sentence for your manuscript.

Your data never leaves your browser. No sign-up, no ads.

Your 2x2 table

Counts of people, not percentages. Each row is one group.

Outcome
present
Outcome
absent
Total
Exposedor treated
100
Unexposedor control
100
Total
30
170
200

Result

Relative risk, exposed vs unexposed.

Sentence for your manuscript

Written in AMA style from your numbers. Check it against your own study design before you submit.

Reporting checklist

  • STROBE 2007 (cohort studies): give the statistical methods (item 12) and unadjusted estimates with their precision (item 16a); say how many people had the outcome in each group (item 15).
  • CONSORT 2010 (trials): report the effect size with its precision (item 17a); for a binary outcome give both relative and absolute effects (item 17b). This page gives RR, ARR and RRR together.

Methods wording. The risk ratio and its 95% CI (Katz log method) and the absolute risk reduction with its 95% CI (Newcombe hybrid score method) were computed with BiostatKit [1].
[1] BiostatKit. Relative risk calculator. Accessed [date]. [URL]

Reproduce it in R

The script is filled in with your numbers. Paste it into R or RStudio and compare.

R 4.x · base R only

    

This calculator was checked against SciPy and statsmodels on 2 reference cases and matched to 4 significant digits. See the verification log.

How to read a relative risk

What it is

The relative risk (RR, risk ratio) divides the risk of the outcome in the exposed group by the risk in the unexposed group. RR = 1 means no difference, RR above 1 means higher risk with exposure, RR below 1 means lower risk. The relative risk reduction is RRR = 1 - RR.

How this page computes it

RR = [a/(a+b)] / [c/(c+d)]

The 95% CI is built on the log scale (Katz): exp( ln RR ± 1.96 x SE ) with SE = sqrt(1/a - 1/(a+b) + 1/c - 1/(c+d)). The RRR limits are 1 minus the RR limits.

The absolute risk reduction is ARR = risk(unexposed) - risk(exposed), with a Newcombe hybrid score 95% CI, which behaves well with small counts and risks near 0% or 100%.

Assumptions

  • Risks are real: people were followed from exposure or allocation to outcome (cohort study or trial), so each group size is meaningful. Do not use RR for a case-control study; use the odds ratio.
  • Participants are independent and follow-up time is similar in both groups.
  • The RR is unadjusted.

Common mistakes

  • Reporting only the RRR. A 50% RRR can mean 2% falling to 1% (ARR 1 percentage point) or 40% falling to 20%. Always give the baseline risk and the ARR.
  • Using RR with unequal follow-up. Use rates and the hazard ratio instead.
  • Reading a negative ARR or RRR as an error. It means the exposed group had the higher risk.

Frequently asked questions

What is the difference between relative risk and odds ratio?

The RR compares risks (events divided by group size), the OR compares odds (events divided by non-events). They are close when the outcome is rare. For common outcomes the OR is further from 1 than the RR.

What is the difference between ARR and RRR?

The ARR is the difference in risk between the groups, in percentage points. The RRR is that difference divided by the risk in the unexposed group. The ARR tells you how many people benefit, the RRR hides the baseline risk.

What happens with a zero cell?

The RR or its CI cannot be computed from a zero count. This tool adds 0.5 to every cell for the RR and its CI and tells you so; report that choice.

Is my data stored or sent anywhere?

No. All calculations run in your browser tab. Nothing is uploaded, and the page works offline once loaded.

Related calculators: Odds ratio calculator · NNT calculator