Odds Ratio Calculator

The odds ratio (OR) is one of the most widely used measures of association in epidemiology and clinical research. It compares the odds of an outcome in an exposed group to the odds in a non-exposed group using a 2x2 contingency table. Enter the four cell counts (a, b, c, d) where a = exposed with outcome, b = exposed without outcome, c = unexposed with outcome, d = unexposed without outcome. The calculator returns the odds ratio and its 95% confidence interval.

0.00
0.00
0.00

Odds ratio formula

OR = (a / b) / (c / d) = (a × d) / (b × c)
SE(ln OR) = √(1/a + 1/b + 1/c + 1/d)
95% CI: e^(ln(OR) ± 1.96 × SE)

The confidence interval is computed on the natural log scale for symmetry, then back-transformed by exponentiation.

Interpreting the odds ratio

  • OR = 1.00: no association between exposure and outcome.
  • OR greater than 1.00: exposure associated with increased odds of outcome.
  • OR less than 1.00: exposure associated with decreased odds of outcome (protective).
  • If the 95% CI does not include 1.00, the association is statistically significant at alpha = 0.05.

Frequently asked questions

What is an odds ratio?

An odds ratio (OR) compares the odds of an event occurring in an exposed group to the odds in a non-exposed (control) group. An OR of 1 means equal odds; OR greater than 1 means the event is more likely in the exposed group; OR less than 1 means less likely.

What is a 2x2 contingency table?

A 2x2 contingency table has two rows (exposed and not exposed) and two columns (event occurred and did not occur). Cell a = exposed with event, b = exposed without event, c = not exposed with event, d = not exposed without event.

How is the 95% confidence interval for the odds ratio calculated?

The 95% CI uses the log-odds: ln(OR) plus or minus 1.96 times the standard error. The SE = sqrt(1/a + 1/b + 1/c + 1/d). Exponentiate the bounds to get the CI on the OR scale. This is the Woolf (Haldane-Anscombe) formula.

What is the difference between odds ratio and relative risk?

Relative risk (RR) compares the probabilities of an event: RR = (a/(a+b)) divided by (c/(c+d)). Odds ratio compares the odds: OR = (a/b) divided by (c/d). For rare events (small event proportions), the OR closely approximates the RR. For common events, they can differ substantially.

When is the odds ratio used instead of relative risk?

Odds ratios are used when the study design prevents computing true risk: in case-control studies, where you sample by disease status, you cannot compute incidence rates, so you compute odds instead. Logistic regression also outputs log-odds and odds ratios.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 15 June 2026. See our methodology.