Relative Risk

Calculate relative risk (risk ratio) from a 2x2 contingency table with 90/95/99% confidence intervals. Free epidemiology calculator with attributable risk, risk difference, and comparison charts.

Calculate relative risk from a 2x2 contingency table

About This Calculator

The Relative Risk Calculator (also called the risk ratio calculator) is a free online tool for epidemiologists, medical researchers, public health professionals, and students. It computes the relative risk (RR) from a 2×2 contingency table comparing an exposed group against a control group, along with confidence intervals, risk difference, and attributable risk percentage.

Relative risk is calculated using the formula RR = [a / (a+b)] / [c / (c+d)], where a and b are the numbers of diseased and healthy individuals in the exposed group, and c and d are the corresponding numbers in the control group. The confidence interval for RR is derived from the standard error of the log-transformed risk ratio: SE(ln RR) = √(1/a + 1/c − 1/(a+b) − 1/(c+d)). The calculator supports 90%, 95% (default), and 99% confidence levels using Z-scores of 1.645, 1.96, and 2.576 respectively. Results include the risk difference (absolute difference in risk between groups) and attributable risk percentage (proportion of risk attributable to the exposure).

Interpreting Results

An RR of 1 means no difference in risk. RR > 1 indicates higher risk in the exposed group (risk factor), while RR < 1 indicates lower risk (protective factor). The confidence interval shows statistical significance: if it excludes 1, the result is significant at the chosen level. The risk difference provides the absolute risk reduction or increase, which is often more clinically meaningful than the relative measure alone.

Applications in Research

Relative risk is widely used in cohort studies, randomized controlled trials, and systematic reviews across all regions. In India, the Indian Council of Medical Research (ICMR) uses RR in clinical guidelines. In the US, the FDA requires RR reporting in drug efficacy trials. In the UK, NICE guidelines reference RR in treatment recommendations. This calculator is also ideal for students learning biostatistics and epidemiology.

Frequently Asked Questions

What is relative risk?

Relative risk (RR), also called the risk ratio, compares the probability of an outcome (such as a disease) occurring in an exposed group versus a control group. An RR of 1 means no difference in risk between groups. An RR greater than 1 indicates higher risk in the exposed group, while an RR less than 1 indicates lower risk (protective effect).

How do you calculate relative risk from a 2x2 table?

Relative risk is calculated as RR = [a/(a+b)] / [c/(c+d)], where a and b are the number of diseased and healthy individuals in the exposed group, and c and d are the diseased and healthy individuals in the control group. The 95% confidence interval is computed using the natural logarithm of RR: exp[ln(RR) ± 1.96 × √(1/a + 1/c − 1/(a+b) − 1/(c+d))].

How do you interpret relative risk values?

RR = 1 means equal risk in both groups (no association). RR > 1 means the exposed group has higher risk (e.g., RR = 2 means twice the risk). RR < 1 means the exposed group has lower risk (protective factor, e.g., RR = 0.5 means half the risk). The confidence interval indicates statistical significance: if it excludes 1, the association is statistically significant at the chosen level.

What is the difference between relative risk and odds ratio?

Relative risk uses probabilities (a/(a+b) vs c/(c+d)), while the odds ratio uses odds (a/b vs c/d). RR is more intuitive for interpreting risk but requires knowing the baseline risk. OR approximates RR when the outcome is rare (<10%). For common outcomes, OR overestimates the risk compared to RR. Cohort studies typically report RR, while case-control studies report OR.

What does attributable risk percentage mean?

Attributable risk percentage (AR%) estimates the proportion of cases in the exposed group that can be attributed to the exposure. For RR > 1, AR% = (RR − 1)/RR × 100. For example, if RR = 2, AR% = 50%, meaning half of the cases in the exposed group are due to the exposure. For RR < 1 (protective), AR% = (1 − RR) × 100 represents the preventable fraction.

What is a good sample size for relative risk calculation?

Small sample sizes produce wide confidence intervals, making the RR estimate imprecise. A minimum of 5 events per cell in the 2x2 table is often recommended for reliable CI calculation. With zero events in any cell, the CI cannot be computed using the standard formula — a continuity correction (adding 0.5 to all cells) may be applied. Larger samples give narrower, more precise confidence intervals.

Is relative risk used in clinical trials and epidemiology?

Yes. Relative risk is a fundamental measure in epidemiology, clinical trials, and medical research. It is used in cohort studies, randomized controlled trials (RCTs), and meta-analyses to quantify the strength of association between an exposure (or treatment) and an outcome. Regulatory agencies like the FDA, EMA, and CDSCO require RR reporting in drug and vaccine efficacy trials.

How do I choose between 90%, 95%, and 99% confidence levels?

95% is the standard confidence level used in most medical and epidemiological research. A 90% CI gives a narrower interval but lower certainty, while a 99% CI gives a wider interval with higher certainty. The choice depends on the study context: exploratory studies may use 90%, confirmatory trials use 95%, and safety analyses sometimes use 99% to be more conservative.