This odds ratio calculator takes a 2×2 table — exposed/unexposed × outcome/no outcome — and returns the odds ratio with its 95% confidence interval, plus relative risk alongside for comparison.
Reading: OR 1 = no association; above 1 = exposure linked to higher odds of outcome. The OR and RR agree closely only when the outcome is rare (< ~10%) — with common outcomes the OR exaggerates the RR, the single most misreported point in health headlines. Case-control studies can only estimate the OR (sampling fixes the margins), which is why epidemiology speaks odds.
OR = (a·d) ÷ (b·c) — The Cross-Product Ratio
Odds of outcome in the exposed (a/b) divided by odds in the unexposed (c/d) collapses to the diagonal product ratio. Its sampling distribution is log-normal — CIs are built on ln(OR) with SE = √(1/a + 1/b + 1/c + 1/d) (Woolf’s method), then exponentiated back, which is why OR intervals are asymmetric around the estimate. Part of our Statistics Calculators collection.
Worked Example (Verified)
- a=30, b=70, c=20, d=80 (defaults): OR = (30×80)/(70×20) = 1.714, 95% CI 0.895 – 3.285 · RR = (30/100)/(20/100) = 1.500 — the interval crosses 1, so at 5% the association is not established despite the point estimate suggesting +71% odds: sample size speaking
- The rare-outcome convergence: with risks of 3% vs 2%, OR ≈ 1.52 vs RR 1.50 — nearly interchangeable; at 30% vs 20% (defaults) they’ve visibly diverged (1.71 vs 1.50)
- Protective mirror: swapping exposure rows inverts both measures (OR 0.583) — an OR of 0.58 is the same strength of association as 1.71, in the protective direction
- Zero cells break the formula (division) — the Haldane–Anscombe fix adds 0.5 to every cell; if you hit a zero, add the halves before entering and note the adjustment in any report
OR vs RR — The Interpretation Discipline
- Say “odds” for OR and “risk/probability” for RR. “1.7 times the odds” is correct; “1.7 times more likely” quietly upgrades it to RR and overstates when outcomes are common.
- Case-control designs yield only OR (outcome margins are chosen by the investigator); cohort/RCT data support both.
- Logistic regression outputs adjusted ORs — this page’s crude OR is the unadjusted starting point; confounders move it.
- A CI containing 1.0 = not statistically distinguishable from no association at that confidence level.
Related Tools
- Chi-Square Calculator — the association test on the same tables
- Confidence Interval Calculator — intervals for means and proportions
- Statistics Calculators — the full collection
Frequently Asked Questions
How do you calculate an odds ratio?
OR = (a × d) ÷ (b × c) from the 2×2 table — exposed/outcome a, exposed/no-outcome b, unexposed/outcome c, unexposed/no-outcome d. The defaults give (30×80)/(70×20) = 1.714, with 95% CI 0.895–3.285 by Woolf’s log method.
What does an odds ratio of 1.7 mean?
The exposed group’s odds of the outcome are 1.7 times the unexposed group’s odds (about 70% higher odds). It does not mean 70% higher probability unless the outcome is rare — with a 20% baseline risk as in the defaults, the risk ratio is 1.5, not 1.7.
When is the odds ratio approximately the relative risk?
When the outcome is uncommon in both groups (rule of thumb: under ~10%). OR and RR diverge as outcomes get common, always with OR farther from 1. This is why converting headline ORs into personal risk requires the baseline risk too.
What if my table has a zero cell?
The OR becomes 0 or infinite and the SE formula divides by zero. The standard patch is Haldane–Anscombe: add 0.5 to all four cells before computing (do it before entering values here). For small samples generally, exact methods (Fisher) complement the large-sample intervals shown.
Why do case-control studies report odds ratios?
Because investigators choose how many cases and controls to sample, the outcome proportions in the data are artifacts of that choice — risks and RR can’t be estimated. The OR is invariant to that sampling scheme (a beautiful algebraic accident), so it’s the measure case-control data can honestly produce.
Is this odds ratio calculator free?
Yes — free, instant, no sign-up.