Odds Ratio Calculator
The odds ratio from a 2×2 table, with its confidence interval — and the relative risk beside it, because the two are routinely confused.
The odds ratio is (a/b) ÷ (c/d) = ad ÷ bc.
How the odds ratio calculator works
The odds ratio is (a/b) ÷ (c/d) = ad ÷ bc. Its confidence interval is computed on the log scale, where it is approximately normal, using the standard error √(1/a + 1/b + 1/c + 1/d).
An odds ratio always looks more dramatic than the corresponding relative risk, and the gap widens as the outcome gets more common. Reporting an odds ratio as though it were a risk ratio is one of the most common errors in health reporting.
Formula: OR = ad / bc; CI = exp(ln OR ± z √(1/a+1/b+1/c+1/d))
Worked examples
| Inputs | Odds ratio | Note |
|---|---|---|
| 30/70 against 15/85 | 2.428571 | OR = 2.43, RR = 2.00 |
| No association | 1 | OR = 1 |
| A protective effect | 0.259259 | OR = 0.26 |
FAQFrequently asked questions
What is an odds ratio?
The odds of an outcome in one group divided by the odds in another. Above 1 means the exposure is associated with more of the outcome.
How is it different from relative risk?
Relative risk compares probabilities; the odds ratio compares odds. They agree only when the outcome is rare — below about 10%.
Why is the distinction important?
Because an odds ratio always overstates the risk ratio. "Doubles your odds" and "doubles your risk" are different claims, and the first is routinely reported as the second.
Why use odds ratios at all?
Because they can be estimated from case-control studies, where risks cannot, and because logistic regression produces them naturally.
What if a cell is zero?
The ratio becomes undefined or infinite. The Haldane–Anscombe correction adds 0.5 to every cell, which gives a usable estimate with wide intervals.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Common Core State Standards — Mathematics — the terms and methods taught in US schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.