What an odds ratio measures
An odds ratio compares two odds. In a case-control study you compare the odds that a case was exposed against the odds that a control was exposed; the ratio of those two numbers tells you how much more (or less) common the exposure is among people who developed the outcome.
Odds are not risks. If 30 of 45 cases were exposed, the risk of exposure among cases is 30/45 = 0.667, but the odds are 30/15 = 2.0 — successes divided by failures, not by the total. That distinction is the whole reason the odds ratio exists. In a case-control study you choose how many cases and how many controls to recruit, so any quantity computed down the columns of your table is an artefact of your sampling. The cross-product ratio a·d ÷ b·c is the one measure that survives that sampling untouched, and it is why case-control studies report odds ratios rather than risk ratios.
The same invariance makes the odds ratio symmetric: the odds of exposure given disease and the odds of disease given exposure give exactly the same number. Swap the roles of rows and columns in the table and the answer does not move. No other common measure of association behaves that way. If your data come from a cohort or a trial where you followed a fixed group forward in time, you can and should report a risk ratio as well — use the relative risk calculator for that.
The formula, and why the interval is built on the log scale
The point estimate is easy: multiply the two diagonal cells and divide. Everything interesting happens in the interval.
An odds ratio lives on a multiplicative scale. It runs from 0 to 1 for protective associations and from 1 to infinity for harmful ones, so the two directions are wildly asymmetric in raw units: an OR of 4 and an OR of 0.25 are equally strong but sit 3 units and 0.75 units away from the null. Take logarithms and that asymmetry disappears — ln(4) = 1.386 and ln(0.25) = −1.386, mirror images about zero. On the log scale the sampling distribution is close to normal even in modest samples, so a plain estimate ± z × standard error interval works.
The standard error is Woolf's formula, published in 1955: the square root of the sum of the reciprocals of the four cell counts. Its shape tells you where precision comes from. Because the terms are reciprocals, the smallest cell dominates. A table with 5,000, 5,000, 5,000 and 4 contributes 0.0002 + 0.0002 + 0.0002 + 0.25 — the tiny cell supplies 99.8% of the variance. Adding thousands more observations to the three large cells will barely narrow the interval. This is the single most useful thing Woolf's formula teaches you about study design.
Finally, exponentiate both limits. Because you did the arithmetic in logs, the interval comes back asymmetric around the estimate: the point estimate always sits at the geometric mean of the two limits, so lower × upper = OR². That identity is a quick check that an interval you have read in a paper was computed this way.
Worked example: 30 exposed cases, 10 exposed controls
Suppose a case-control study of 100 people finds 30 exposed cases, 10 exposed controls, 15 unexposed cases and 45 unexposed controls.
- Cross products. a·d = 30 × 45 = 1,350. b·c = 10 × 15 = 150.
- Odds ratio. 1,350 ÷ 150 = 9.00. The odds of exposure among cases are nine times the odds among controls.
- Log it. ln(9.00) = 2.19722.
- Woolf standard error. 1/30 + 1/10 + 1/15 + 1/45 = 0.03333 + 0.10000 + 0.06667 + 0.02222 = 0.22222. Its square root is 0.47140.
- Margin. 1.95996 × 0.47140 = 0.92394.
- Limits on the log scale. 2.19722 − 0.92394 = 1.27329 and 2.19722 + 0.92394 = 3.12116.
- Exponentiate. e1.27329 = 3.573 and e3.12116 = 22.673. So the 95% interval is 3.57 to 22.67.
Check the geometric-mean identity: 3.573 × 22.673 = 81.0 = 9.00². It holds, so the arithmetic is self-consistent.
Now the test. The row totals are 40 and 60, the column totals 45 and 55, N = 100. The Pearson statistic is N(ad − bc)² ÷ (r₁r₂k₁k₂) = 100 × 1,200² ÷ (40 × 60 × 45 × 55) = 144,000,000 ÷ 5,940,000 = 24.24 on 1 degree of freedom, well past the 3.84 critical value, so p is far below 0.001. Report the interval, not the p-value: 3.57 to 22.67 tells a reader both that the association is strong and that with 100 subjects you cannot pin it down within a factor of two.
How to read the number you get
An odds ratio of 1.00 means the exposure is equally common in cases and controls. Above 1 the exposure is more common among cases; below 1 it is less common. There is no universal threshold for “large”, because what counts as a meaningful association depends on how common the outcome is and on what else could explain it — but epidemiologists are generally wary of ratios below about 2 from observational data, because confounding and measurement error of that size are easy to produce accidentally.
Read the interval first and the point estimate second. An OR of 3.6 with limits of 2.07 and 6.25 says something quite different from an OR of 3.6 with limits of 0.9 and 14. Both have the same best guess; only one is informative. And an interval that spans 1 does not mean “no effect” — it means the data are compatible with no effect and with everything else inside the limits.
The most common misreading is treating an odds ratio as a risk ratio. The two agree closely only when the outcome is rare. As the baseline risk in the unexposed group rises, the odds ratio moves further from the risk ratio, always away from 1. At a 50% baseline risk an odds ratio of 5 corresponds to a risk ratio of only 1.67. Newspapers reporting “five times more likely” from an odds ratio in a common-outcome study are usually overstating the effect by a wide margin. The table below gives the exact conversion.
Converting an odds ratio to a risk ratio
| Risk in unexposed (p₀) | OR = 0.5 | OR = 2 | OR = 5 |
|---|---|---|---|
| 1% | 0.503 | 1.980 | 4.808 |
| 5% | 0.513 | 1.905 | 4.167 |
| 10% | 0.526 | 1.818 | 3.571 |
| 20% | 0.556 | 1.667 | 2.778 |
| 50% | 0.667 | 1.333 | 1.667 |
The conversion needs a baseline risk, which a case-control study cannot supply — you must take p₀ from a cohort, a registry or a control arm. Below about 10% baseline risk the two measures agree to within roughly a fifth of their distance from 1.
Zero cells and small tables
A single empty cell breaks the estimator. If a = 0 the cross product collapses to zero; if b or c is 0 it runs to infinity; and in every case at least one reciprocal in Woolf's formula is undefined, so no interval can be formed at all.
The usual repair is the Haldane–Anscombe correction: add 0.5 to all four cells before computing anything. Haldane proposed it in 1956 and it is the default here. Two things are worth knowing about it. First, it is a genuine estimator adjustment, not a cosmetic patch — adding 0.5 to every cell reduces the small-sample bias of the log odds ratio. Second, it pulls the estimate towards 1, and in a very small table it pulls hard: a table of 0, 10, 10, 10 gives a corrected OR of 0.0476 rather than an uncorrected 0.
This calculator applies the correction only when a cell is actually zero, and it never applies it to the chi-square statistic, which is computed from your counts as entered. If any expected cell count falls below about 5, neither the chi-square approximation nor the logit interval should be trusted; use Fisher's exact test and an exact conditional interval. The chi-square test of independence calculator handles larger contingency tables where the same expected-count rule applies.
Mistakes that make an odds ratio wrong or misleading
- Reporting it as a risk. “Three times the odds” is not “three times the risk” unless the outcome is rare. Use the conversion table above.
- Transposing the table. Entering controls where cases belong inverts the ratio. A quick sanity check: 1 ÷ your OR should be the answer you would get with the columns swapped.
- Averaging odds ratios across strata by hand. Confounding is not removed by pooling raw tables. Use a Mantel–Haenszel summary or a logistic model.
- Quoting a p-value without the interval. A p-value tells you nothing about the size of the association or the precision of the estimate; the interval tells you both.
- Ignoring the smallest cell. Woolf's formula is dominated by it, so recruiting more of an already-plentiful group buys almost no precision.
- Using an unadjusted odds ratio as a causal claim. The calculation says nothing about confounding, selection of controls, recall bias, or the direction of time.
- Applying the 0.5 correction to a table with no zero. It biases the estimate towards the null for no benefit.
Where the odds ratio sits among the alternatives
Choose your measure from your design, not your preference. A cohort study or randomised trial follows people forward, so risks are estimable and you should report a risk ratio and a risk difference; the risk difference converts directly into a number needed to treat. A case-control study samples on the outcome, so only the odds ratio is estimable. A study with person-time at risk rather than a fixed denominator calls for a rate ratio — see the incidence rate calculator.
The odds ratio also turns up outside epidemiology as the diagnostic odds ratio, which combines a test's sensitivity and specificity into a single number and equals the ratio of its two likelihood ratios. That version is computed by the diagnostic likelihood ratio calculator, and the underlying sensitivity and specificity by the sensitivity and specificity calculator. And because logistic regression models the log odds directly, every coefficient it reports exponentiates to an odds ratio — which is the real reason the measure is so ubiquitous in modern medical literature.
When you need an interval for one of the four proportions in your table rather than for their cross-product, the confidence interval for a proportion calculator gives the Wilson score interval, which behaves far better than the textbook normal approximation at small counts.
Key terms
- Odds
- The number of events divided by the number of non-events, not by the total. A probability of 0.75 corresponds to odds of 3.
- Cross-product ratio
- The name for a·d ÷ b·c. The two diagonals of the 2×2 table, divided.
- Woolf's method
- The logit approach to a confidence interval: work on the log scale with SE = √(Σ 1/cell), then exponentiate.
- Haldane–Anscombe correction
- Adding 0.5 to every cell so that a table containing a zero yields a finite estimate and a finite interval.
- Case-control study
- A design that recruits people by outcome status and looks backwards at exposure. Estimates odds ratios but not risks.
