Odds Ratio Calculator

Find the odds ratio from a 2×2 table.

How it is calculated

The odds ratio compares the odds of an outcome in an exposed group with the odds in an unexposed group, from a 2×2 table: OR = (a × d) ÷ (b × c). Cell a = exposed with outcome, b = exposed without outcome, c = unexposed with outcome, d = unexposed without outcome. An OR of 1 means no association, above 1 means the outcome is more likely in the exposed group, below 1 means less likely. All four counts must be non-negative, and b and c must be above zero or the ratio is undefined. The result is shown to four decimals. No confidence interval is calculated.

Worked example

Exposed: 20 with the outcome, 80 without. Unexposed: 10 with, 90 without. Odds in exposed = 20 ÷ 80 = 0.25, odds in unexposed = 10 ÷ 90 = 0.1111. OR = (20 × 90) ÷ (80 × 10) = 1800 ÷ 800 = 2.2500. The odds of the outcome are 2.25 times higher in the exposed group.

Try this example →

Common mistakes

  • Reading the odds ratio as a risk ratio: here the risks are 20% and 10%, a ratio of 2.0, while the OR is 2.25; the two diverge when the outcome is common.
  • Putting the table in a different order, which inverts the ratio (the result becomes 1 ÷ OR).
  • Entering percentages or rates instead of raw counts of people.
  • Entering zero in b or c; the ratio is undefined and gets no result, so a small continuity correction is often added by hand.
  • Concluding significance from the OR alone; without a confidence interval a value like 1.3 may be chance.

About this calculator

This calculator finds the odds ratio, OR = (a·d)/(b·c), from a 2×2 contingency table cross-tabulating exposure (or treatment) against outcome, where a and b are the exposed cases and non-cases and c and d the unexposed ones, so the ratio compares the a·d diagonal with the b·c diagonal. An OR of 1 means no association between exposure and outcome, an OR greater than 1 means the exposed group has higher odds of the outcome, and an OR less than 1 means lower odds — it's the standard measure of association in case-control studies, where relative risk can't be calculated directly.

Epidemiologists and medical researchers use it constantly to quantify how strongly a risk factor — smoking, a genetic variant, an environmental exposure — is associated with a disease or outcome, and it's the statistic most commonly pooled across studies in meta-analyses. Public health students, biostatisticians, and authors of systematic reviews all rely on this calculation when reading or reporting case-control study results.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Odds ratios are easy to misread as risk ratios. When the outcome is rare they are close, but when it is common the odds ratio looks much bigger. If 60 of 100 exposed people and 30 of 100 unexposed people have the outcome, the risk is exactly doubled while the tool gives 3.5. Is your table from a case-control or a cohort study? Tell us which, since it changes how the number is read.

Popular calculators

All Calculators