Odds Ratio Calculator

Quantifying Exposure and Outcome in a 2×2 Table

Case-control studies in medicine and epidemiology often can't measure risk directly, but they can measure odds — and the odds ratio is what lets researchers compare an exposed group against an unexposed group from exactly that kind of data. An odds ratio of 1 means no association; above 1 means the exposure is linked to higher odds of the outcome; below 1 means it's linked to lower odds.

The Formula

2x2 Table:
       Outcome+   Outcome−
Exposed:    a         b
Unexposed: c        d

OR = (a × d) ÷ (b × c)
95% CI = exp( ln(OR) ± z × SE(ln OR) ), where SE(ln OR) = √(1/a + 1/b + 1/c + 1/d)

When any cell is zero, a 0.5 continuity correction is applied to every cell to keep the ratio and its confidence interval computable.

Worked Example

A case-control study of an exposure and an outcome, with 150 total subjects:

Odds ratio example: a=45, b=15, c=30, d=60
Odds Ratio95% Confidence Interval
6.002.89 to 12.46

An OR of 6.0 means the odds of the outcome are six times higher in the exposed group than the unexposed group in this sample. Because the entire 95% confidence interval sits above 1, the association is statistically significant at that level.

Where This Matters

  • Epidemiology — the standard measure of association in case-control studies, where true risk can't be calculated directly.
  • Clinical research — comparing the odds of an adverse event between a treatment group and a control group.
  • Public health policy — quantifying the strength of association between a risk factor and a health outcome to prioritize interventions.
  • Logistic regression — odds ratios are the natural way to interpret coefficients from a logistic regression model.
Note: Odds ratios are commonly (and incorrectly) read as if they were risk ratios. For common outcomes (generally above 10% prevalence), the odds ratio noticeably overstates the relative risk.

How to Use This Calculator

  1. Enter the four cell counts: a (exposed, outcome positive), b (exposed, outcome negative), c (unexposed, outcome positive), d (unexposed, outcome negative).
  2. Optionally set a confidence level (defaults to 95%).
  3. Select Calculate to get the odds ratio and its confidence interval.

Related Calculations

For a 2×2 table where you want to test statistical independence directly, see the Chi-Square Calculator. To express the result as a confidence interval built a different way, see the Confidence Interval Calculator.