Skip to main content

Relative Risk Calculator

Our biostatistics calculator computes relative risk accurately. Enter measurements for results with formulas and error analysis.

Skip to calculator
Biology

Relative Risk Calculator

Calculate relative risk (risk ratio), confidence intervals, absolute risk difference, NNT, and attributable risk for epidemiological studies and clinical trials.

Last updated: December 2025

Calculator

Adjust values & calculate

Exposed Group

Unexposed (Control) Group

Relative Risk (RR)
3.000
95% CI: 1.551 - 5.803
Increased risk in exposed group (Significant)
Risk in Exposed
30.0%
30 / 100
Risk in Unexposed
10.0%
10 / 100
Absolute Risk Diff
20.0%
NNT / NNH
5
Odds Ratio
3.857
Attributable Risk %
66.7%
Z-Statistic
3.263

2x2 Contingency Table

EventNo EventTotal
Exposed3070100
Unexposed1090100
Your Result
RR = 3.000 (95% CI: 1.551-5.803) | Increased risk in exposed group | Significant
Share Your Result
Understand the Math

Formula

RR = (a/b) / (c/d)

Where a = events in exposed group, b = total in exposed group, c = events in unexposed group, d = total in unexposed group. The 95% confidence interval is calculated using the log transformation: CI = exp(ln(RR) +/- z * SE(ln(RR))), where SE(ln(RR)) = sqrt(1/a - 1/b + 1/c - 1/d).

Last reviewed: December 2025

Worked Examples

Example 1: Smoking and Lung Cancer Risk

In a cohort study, 45 out of 500 smokers developed lung cancer vs 5 out of 500 non-smokers. Calculate the relative risk.
Solution:
Risk in exposed (smokers) = 45/500 = 0.09 (9%) Risk in unexposed (non-smokers) = 5/500 = 0.01 (1%) RR = 0.09 / 0.01 = 9.0 ln(RR) = 2.197, SE(ln RR) = sqrt(1/45 - 1/500 + 1/5 - 1/500) = 0.463 95% CI = exp(2.197 +/- 1.96 * 0.463) = (3.63, 22.30) ARD = 0.09 - 0.01 = 0.08, NNT = 1/0.08 = 13
Result: RR = 9.0 (95% CI: 3.63-22.30) | Smokers have 9x the lung cancer risk | NNT = 13

Example 2: Vaccine Efficacy Study

In a vaccine trial, 8 of 1000 vaccinated participants got infected vs 40 of 1000 in the placebo group. Calculate vaccine efficacy.
Solution:
Risk in vaccinated = 8/1000 = 0.008 (0.8%) Risk in placebo = 40/1000 = 0.04 (4%) RR = 0.008 / 0.04 = 0.20 Vaccine Efficacy = (1 - RR) * 100 = 80% 95% CI for RR: (0.094, 0.426) ARD = 0.008 - 0.04 = -0.032, NNT = 1/0.032 = 32
Result: RR = 0.20 (80% vaccine efficacy) | 95% CI: 0.094-0.426 | NNT = 32 vaccinations to prevent 1 infection
Expert Insights

Background & Theory

The Relative Risk Calculator applies the following established principles and formulas. Biology is the scientific study of life, encompassing the structure, function, growth, evolution, and distribution of living organisms. At the cellular level, all life is composed of cells, the basic structural and functional units of organisms. Prokaryotic cells lack a membrane-bound nucleus, while eukaryotic cells possess a nucleus and membrane-bound organelles including mitochondria, which generate ATP through oxidative phosphorylation, and ribosomes, which synthesize proteins. Genetics quantifies the inheritance of traits. Gregor Mendel's laws describe how alleles segregate during gamete formation and assort independently for genes on different chromosomes. Punnett squares provide a visual method for calculating the probability of offspring genotypes and phenotypes from known parental genotypes. For a monohybrid cross of two heterozygotes (Aa ร— Aa), the expected phenotypic ratio is 3 dominant to 1 recessive. The Hardy-Weinberg equilibrium principle states that allele and genotype frequencies in a population remain constant from generation to generation in the absence of evolutionary forces. If p and q are the frequencies of two alleles at a locus, then p + q = 1 and genotype frequencies are pยฒ, 2pq, and qยฒ for the three possible genotypes. Deviations from equilibrium signal the action of natural selection, genetic drift, mutation, migration, or non-random mating. Population growth follows two primary models. Exponential growth, N = Nโ‚€eสณแต—, describes unlimited growth where Nโ‚€ is the initial population, r is the intrinsic rate of increase, and t is time. Logistic growth incorporates carrying capacity K, describing how growth slows as population approaches the environment's maximum sustainable size: dN/dt = rN(1 โˆ’ N/K). Enzyme kinetics describes the rate of enzyme-catalyzed reactions. The Michaelis-Menten equation, v = Vmax[S]/(Km + [S]), relates reaction velocity v to substrate concentration [S], maximum velocity Vmax, and the Michaelis constant Km, which equals the substrate concentration at half-maximal velocity. DNA replication relies on complementary base pairing: adenine pairs with thymine (two hydrogen bonds) and guanine with cytosine (three hydrogen bonds), ensuring faithful copying of genetic information.

History

The history behind the Relative Risk Calculator traces back through the following developments. The systematic study of living things began with Aristotle (384โ€“322 BCE), who classified over 500 animal species and wrote foundational texts on anatomy, reproduction, and animal behavior. His scala naturae ranked organisms in a hierarchy from simple to complex and influenced biological thought for two millennia. Theophrastus, his student, applied similar methods to plants. Carl Linnaeus established modern taxonomy in Systema Naturae (1735), introducing the binomial nomenclature system that assigns each organism a genus and species name. His hierarchical classification system โ€” species, genus, family, order, class, phylum, kingdom โ€” provided the organizational framework that biologists still use, now extended to seven ranks and supplemented by cladistics. Charles Darwin and Alfred Russel Wallace independently developed the theory of evolution by natural selection, which Darwin published in On the Origin of Species in 1859. Darwin argued that heritable variation exists within populations, that organisms with advantageous traits survive and reproduce at higher rates, and that this differential reproduction gradually changes the character of populations over generations. This unified all of biology under a single explanatory framework. Gregor Mendel's meticulous pea plant experiments, conducted from 1856 to 1863 and published in 1866, established the particulate nature of inheritance and the laws of segregation and independent assortment. Overlooked until 1900, when three botanists independently rediscovered his work, Mendel's laws laid the foundation for the science of genetics. James Watson and Francis Crick, building on Rosalind Franklin's X-ray crystallography data, determined the double-helix structure of DNA in 1953, revealing the physical basis of heredity and the mechanism by which genetic information is stored and copied. The Human Genome Project, a 13-year international collaboration, published the complete sequence of the human genome in 2003, comprising approximately 3.2 billion base pairs. The development of CRISPR-Cas9 gene editing by Jennifer Doudna, Emmanuelle Charpentier, and colleagues from 2012 onward opened an era of precise genome modification with transformative implications for medicine, agriculture, and basic research.

Share this calculator

Explore More

Frequently Asked Questions

Relative risk (RR), also called risk ratio, compares the probability of an event occurring in an exposed group versus an unexposed group. RR = (events in exposed / total exposed) / (events in unexposed / total unexposed). An RR of 2.0 means the exposed group has twice the risk of the outcome compared to the unexposed group. An RR of 0.5 means the exposed group has half the risk (protective effect). RR = 1.0 means no difference. Relative risk is used in cohort studies and randomized controlled trials where you can directly measure incidence rates in both groups.
Relative risk compares probabilities (risk in exposed / risk in unexposed), while odds ratio compares odds (odds in exposed / odds in unexposed). When the outcome is rare (< 10% incidence), RR and OR are approximately equal. As the outcome becomes more common, OR increasingly overestimates the RR. For example, if risk is 30% vs 10%, RR = 3.0 but OR = 3.86. RR is more intuitive and preferred when calculable (cohort studies, RCTs). OR is used in case-control studies where true incidence cannot be determined. Always specify which measure you are reporting.
The confidence interval (CI) provides a range of plausible values for the true population RR. A 95% CI means we are 95% confident the true RR falls within this range. The key is whether the CI crosses 1.0: if entirely above 1.0 (e.g., 1.5-3.2), the increased risk is statistically significant. If entirely below 1.0 (e.g., 0.3-0.8), the protective effect is significant. If the CI includes 1.0 (e.g., 0.8-1.4), the result is not statistically significant. Narrower CIs indicate more precise estimates, typically from larger sample sizes.
Both measures should be reported together as they provide complementary information. Relative risk is useful for understanding the strength of association between exposure and outcome across different populations. Absolute risk reduction (ARD) is better for clinical decision-making because it accounts for baseline risk. Drug advertisements often emphasize RR because it sounds more impressive: a drug that reduces heart attack risk by 50% (RR=0.5) sounds better than saying it reduces risk from 2% to 1% (ARD=1%). Health literacy research shows that patients make better decisions when given absolute risks rather than relative risks.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

RR = (a/b) / (c/d)

Where a = events in exposed group, b = total in exposed group, c = events in unexposed group, d = total in unexposed group. The 95% confidence interval is calculated using the log transformation: CI = exp(ln(RR) +/- z * SE(ln(RR))), where SE(ln(RR)) = sqrt(1/a - 1/b + 1/c - 1/d).

Worked Examples

Example 1: Smoking and Lung Cancer Risk

Problem: In a cohort study, 45 out of 500 smokers developed lung cancer vs 5 out of 500 non-smokers. Calculate the relative risk.

Solution: Risk in exposed (smokers) = 45/500 = 0.09 (9%)\nRisk in unexposed (non-smokers) = 5/500 = 0.01 (1%)\nRR = 0.09 / 0.01 = 9.0\nln(RR) = 2.197, SE(ln RR) = sqrt(1/45 - 1/500 + 1/5 - 1/500) = 0.463\n95% CI = exp(2.197 +/- 1.96 * 0.463) = (3.63, 22.30)\nARD = 0.09 - 0.01 = 0.08, NNT = 1/0.08 = 13

Result: RR = 9.0 (95% CI: 3.63-22.30) | Smokers have 9x the lung cancer risk | NNT = 13

Example 2: Vaccine Efficacy Study

Problem: In a vaccine trial, 8 of 1000 vaccinated participants got infected vs 40 of 1000 in the placebo group. Calculate vaccine efficacy.

Solution: Risk in vaccinated = 8/1000 = 0.008 (0.8%)\nRisk in placebo = 40/1000 = 0.04 (4%)\nRR = 0.008 / 0.04 = 0.20\nVaccine Efficacy = (1 - RR) * 100 = 80%\n95% CI for RR: (0.094, 0.426)\nARD = 0.008 - 0.04 = -0.032, NNT = 1/0.032 = 32

Result: RR = 0.20 (80% vaccine efficacy) | 95% CI: 0.094-0.426 | NNT = 32 vaccinations to prevent 1 infection

Frequently Asked Questions

What is relative risk and how is it calculated?

Relative risk (RR), also called risk ratio, compares the probability of an event occurring in an exposed group versus an unexposed group. RR = (events in exposed / total exposed) / (events in unexposed / total unexposed). An RR of 2.0 means the exposed group has twice the risk of the outcome compared to the unexposed group. An RR of 0.5 means the exposed group has half the risk (protective effect). RR = 1.0 means no difference. Relative risk is used in cohort studies and randomized controlled trials where you can directly measure incidence rates in both groups.

What is the difference between relative risk and odds ratio?

Relative risk compares probabilities (risk in exposed / risk in unexposed), while odds ratio compares odds (odds in exposed / odds in unexposed). When the outcome is rare (< 10% incidence), RR and OR are approximately equal. As the outcome becomes more common, OR increasingly overestimates the RR. For example, if risk is 30% vs 10%, RR = 3.0 but OR = 3.86. RR is more intuitive and preferred when calculable (cohort studies, RCTs). OR is used in case-control studies where true incidence cannot be determined. Always specify which measure you are reporting.

How do I interpret the confidence interval for relative risk?

The confidence interval (CI) provides a range of plausible values for the true population RR. A 95% CI means we are 95% confident the true RR falls within this range. The key is whether the CI crosses 1.0: if entirely above 1.0 (e.g., 1.5-3.2), the increased risk is statistically significant. If entirely below 1.0 (e.g., 0.3-0.8), the protective effect is significant. If the CI includes 1.0 (e.g., 0.8-1.4), the result is not statistically significant. Narrower CIs indicate more precise estimates, typically from larger sample sizes.

When should I use relative risk vs absolute risk reduction?

Both measures should be reported together as they provide complementary information. Relative risk is useful for understanding the strength of association between exposure and outcome across different populations. Absolute risk reduction (ARD) is better for clinical decision-making because it accounts for baseline risk. Drug advertisements often emphasize RR because it sounds more impressive: a drug that reduces heart attack risk by 50% (RR=0.5) sounds better than saying it reduces risk from 2% to 1% (ARD=1%). Health literacy research shows that patients make better decisions when given absolute risks rather than relative risks.

Can I use Relative Risk Calculator on a mobile device?

Yes. All calculators on NovaCalculator are fully responsive and work on smartphones, tablets, and desktops. The layout adapts automatically to your screen size.

How do I verify Relative Risk Calculator's result independently?

The Formula section on this page shows the equation used. You can reproduce the calculation manually or in a spreadsheet using those steps. Compare your answer against the worked examples in the Examples section, which use known reference values so you can confirm the calculator is behaving as expected.

References

Reviewed by Daniel Agrici, Founder & Lead Developer ยท Editorial policy