Relative Risk Calculator

Enter cases and totals for exposed and unexposed groups to assess the strength of association between exposure and outcome.

Exposed Group

Unexposed Group

Decimal (e.g., 0.95). Snaps to nearest standard z-score.

Incidence (Exposed)

0.150

a / b

Incidence (Unexposed)

0.055

c / d

Relative Risk

2.750

Risk ratio (RR)

RR Confidence Interval

1.448 5.223

95.0% CI

Absolute Risk Difference

-0.095

Incidence unexposed − incidence exposed

Number Needed to Treat / Harm

10.5

Positive ARR → NNT, negative ARR → Number Needed to Harm (NNH)

Exposure appears associated with increased risk.

How to Use This Calculator

  1. Enter the number of cases and total participants for the exposed group.
  2. Enter the cases and total for the unexposed (control) group.
  3. Set a confidence level to compute relative risk confidence intervals.
  4. Review incidence, risk ratio, absolute difference, and number needed to treat/harm.

Formula

Incidence (exposed) = a / b

Incidence (unexposed) = c / d

Relative Risk = (a / b) / (c / d)

SE(log RR) = √(1/a − 1/b + 1/c − 1/d)

CI(log RR) = log(RR) ± z · SE(log RR)

CI(RR) = exp(CI(log RR))

Absolute Risk Difference = (c/d) − (a/b)

NNT/NNH = 1 / |Absolute Risk Difference|

Full Description

Relative risk compares the probability of an outcome between exposed and unexposed groups. It is central in cohort studies, randomized trials, and public health surveillance. A relative risk above 1 suggests harmful exposure, while below 1 suggests a protective effect.

Confidence intervals quantify precision: if they cross 1, the effect may not be statistically significant. Absolute risk difference and NNT/NNH translate relative effects into practical terms for clinical decisions.

Frequently Asked Questions

What if a cell count is zero?

Zero counts make the log transformation unstable. Consider adding a continuity correction (e.g., add 0.5 to each cell) or use exact methods.

When should I use odds ratio instead?

Odds ratios are preferred in case-control studies where incidence cannot be measured. For cohort or randomized studies, relative risk is more intuitive.

How do I interpret NNT?

NNT tells you how many individuals must receive the exposure (treatment) to prevent one additional adverse outcome compared to the control group. Negative ARR indicates harm, yielding number needed to harm (NNH).

Can I adjust for confounders?

This calculator uses raw counts. Adjusted relative risks require regression models or stratified analyses beyond the scope of this tool.