Relative Risk & Odds Ratio Calculator

This calculator computes Relative Risk (RR), Odds Ratio (OR), and related measures from 2×2 contingency tables. These statistics are essential for analyzing the association between exposure and outcome in cohort and case-control studies.

Understanding the 2×2 Table

Cases (Disease)Controls (No Disease)
Exposedab
Unexposedcd

Relative Risk (Risk Ratio)

Relative Risk compares the risk of an outcome in the exposed group to the risk in the unexposed group. It's commonly used in cohort studies where you know the exposure status and follow for outcomes.

RR = Risk in Exposed / Risk in Unexposed = (a/(a+b)) / (c/(c+d))

Interpreting Relative Risk

  • RR = 1: No association between exposure and outcome
  • RR > 1: Increased risk (harmful exposure)
  • RR < 1: Decreased risk (protective exposure)
  • RR = 2: Exposed group has 2× the risk of unexposed group

Odds Ratio

Odds Ratio compares the odds of exposure in cases to the odds of exposure in controls. It's the measure of choice for case-control studies.

OR = (a × d) / (b × c)

Interpreting Odds Ratio

  • OR = 1: No association
  • OR > 1: Exposure associated with higher odds of outcome
  • OR < 1: Exposure associated with lower odds of outcome
  • OR ≈ RR: When the outcome is rare (<10%), OR approximates RR

Attributable Risk

Attributable Risk measures the excess risk that can be attributed to the exposure. It tells us how much of the risk in the exposed group is due specifically to the exposure.

AR = Risk in Exposed - Risk in Unexposed

AR% = (AR / Risk in Exposed) × 100

Key Differences: RR vs OR

FeatureRelative RiskOdds Ratio
Study TypeCohort studiesCase-control studies
OutcomeCommon outcomes OKAny prevalence
InterpretationDirect probabilityOdds comparison