Guides / odds ratio
Odds ratios: calculation and interpretation
The odds ratio is the standard effect measure for binary outcomes and the most frequently misreported statistic in health research. This guide calculates one by hand, explains precisely how it differs from a risk ratio and when that difference matters, and sets out the wording that keeps your claim aligned with your number.
An odds ratio compares the odds of an outcome occurring in one group with the odds in another. An odds ratio of 1 means the odds are identical; above 1 means the outcome is more likely in the first group; below 1 means less likely. It is calculated from a 2x2 table as (a x d) / (b x c) and is not the same as a risk ratio, which compares probabilities rather than odds.
Definition
Odds, and how they differ from probability
Odds are the ratio of something happening to it not happening; probability is the ratio of it happening to all outcomes. They describe the same underlying fact and are easy to confuse.
| Probability | Odds | In words |
|---|---|---|
| 0.10 | 0.11 | 1 to 9 against |
| 0.20 | 0.25 | 1 to 4 against |
| 0.50 | 1.00 | evens |
| 0.75 | 3.00 | 3 to 1 on |
| 0.90 | 9.00 | 9 to 1 on |
odds = p / (1 − p), and to go back, p = odds / (1 + odds). Note that odds are unbounded above while probability stops at 1 — which is precisely why odds are the quantity modelled in logistic regression.
An odds ratio divides the odds in one group by the odds in another. It answers “by what factor are the odds different?”, which is a narrower question than “by what factor is the outcome more likely?”
The asymmetry of odds is worth dwelling on, because it is the source of most confusion. Probability is bounded at both ends: it cannot fall below 0 or rise above 1. Odds are bounded only below, at zero, and rise without limit — a probability of 0.99 gives odds of 99, and 0.999 gives 999. This is why doubling the odds is a coherent operation at any starting point while doubling a probability is not: a probability of 0.6 cannot be doubled. That single property is what makes odds the natural scale for modelling, and it is also why an odds ratio and a risk ratio can differ so much for common outcomes.
When an outcome is rare, probability and odds are numerically close — a probability of 0.02 gives odds of 0.0204. That is why odds ratios and risk ratios agree well for rare outcomes and diverge sharply for common ones.
Worked example
Worked example: calculating an odds ratio
A study of 100 participants compares an intervention against a control, with improvement as the outcome.
Step 1 — the odds in each group
Intervention: 34 improved, 16 did not, so odds = 34 / 16 = 2.125.
Control: 22 improved, 28 did not, so odds = 22 / 28 = 0.786.
Step 2 — the ratio
OR = 2.125 / 0.786 = 2.705
Equivalently, and more quickly, as the cross-product: OR = (a × d) / (b × c) = (34 × 28) / (16 × 22) = 952 / 352 = 2.705.
Step 3 — what it means
The odds ratio is symmetric in a way the risk ratio is not. Swapping the rows — treating the control group as the reference — gives 1 / 2.705 = 0.370, and modelling non-improvement instead of improvement gives the same reciprocal. That relationship holds exactly, which is part of why the measure is convenient to work with and why its logarithm is symmetric around zero.
The odds of improvement were about 2.7 times higher in the intervention group. Note the wording carefully: the odds, not the probability.
A third measure is worth knowing and is often the most useful of the three for a practical decision: the absolute risk difference. Here it is 0.68 − 0.44 = 0.24, or 24 percentage points. Its reciprocal gives the number needed to treat: 1 / 0.24 = 4.2, meaning roughly four people must receive the intervention for one additional person to improve. Ratios describe the strength of an association; absolute measures describe what it is worth doing about it, and clinical and policy audiences generally want the second.
For comparison, the risk ratio
RR = (34/50) / (22/50) = 0.68 / 0.44 = 1.545. Participants were about 1.5 times as likely to improve — a considerably more modest statement than 2.7.
The odds ratio and the risk ratio are both accurate descriptions of the same table. The error is not in calculating either one; it is in describing an odds ratio using risk-ratio language. With an outcome this common — 56% overall — the gap between 2.7 and 1.5 is large enough to change how a reader judges the intervention.
Precision
The confidence interval
An odds ratio without an interval is uninterpretable, and the interval cannot be computed directly on the ratio scale because ratios are skewed. It is calculated on the log scale and then converted back.
Step 1 — the standard error of the log odds ratio
SE(ln OR) = √(1/a + 1/b + 1/c + 1/d)
= √(1/34 + 1/16 + 1/22 + 1/28) = √(0.0294 + 0.0625 + 0.0455 + 0.0357) = √0.1731 = 0.4160
Step 2 — the interval on the log scale
ln(2.705) = 0.9949, so the interval is 0.9949 ± (1.96 × 0.4160) = [0.1795, 1.8104].
Step 3 — convert back
95% CI = [e⁰·¹⁸₀, e¹·⁸¹₁] = [1.20, 6.11]
The interval excludes 1, so the association is significant at the .05 level. But it runs from 1.20 to 6.11 — the data are consistent with a modest effect and with a very large one, which is what a sample of 100 buys you.
The width of that interval is driven by the smallest cell. Look again at the standard error formula: it sums the reciprocals of all four counts, so a cell containing 5 contributes 0.20 while a cell containing 50 contributes only 0.02. One sparse cell therefore dominates the uncertainty regardless of how large the rest of the table is. This is why a study with 500 participants but only 8 events can produce an interval as wide as one with 60 participants evenly spread, and why total sample size alone is a poor guide to how precise an odds ratio will be.
2.705 does not sit in the middle of [1.20, 6.11]. That is correct, not an error: the interval is symmetric on the log scale and becomes asymmetric when exponentiated. An interval reported as symmetric around the odds ratio has been computed wrongly.
Our odds ratio calculator takes your 2×2 counts and returns the OR with its confidence interval alongside the risk ratio, so you can report whichever your design supports.
Use the calculatorComparison
Odds ratio or risk ratio?
| Baseline risk | OR = 2.0 implies | Risk ratio | Gap |
|---|---|---|---|
| 1% | 2.0% | 1.98 | negligible |
| 5% | 9.5% | 1.90 | small |
| 20% | 33.3% | 1.67 | noticeable |
| 50% | 66.7% | 1.33 | large |
| 80% | 88.9% | 1.11 | severe |
The pattern is consistent: the odds ratio always overstates the risk ratio when the outcome is more likely in the exposed group, and the overstatement grows with the baseline risk. For a rare outcome the two are practically interchangeable; for a common one, treating them as equivalent can double the apparent size of an effect.
There is a further reason the distinction is enforced so strictly in health research. Odds ratios from different studies with different baseline risks are not directly comparable as measures of practical effect, even when the underlying association is identical. Two trials of the same intervention in populations with 5% and 50% baseline risk will report similar odds ratios and very different risk ratios — and it is the risk ratios that tell a clinician what to expect in their own patients.
If the outcome occurs in less than about 10% of the unexposed group, the odds ratio approximates the risk ratio closely enough that loose wording does little harm. Above that, the distinction must be maintained in the text, and reviewers in health research will check it.
Study design
Which one your design allows
The choice is not purely stylistic. Some designs make it impossible to calculate a risk ratio at all.
| Design | Odds ratio | Risk ratio | Why |
|---|---|---|---|
| Randomised trial | Yes | Yes — preferred | Risk is directly observable |
| Cohort study | Yes | Yes — preferred | Participants followed forward from exposure |
| Case-control study | Yes — the only option | No | Cases and controls are sampled separately, so the observed proportions are set by the researcher |
| Cross-sectional | Yes | Prevalence ratio | Timing of exposure and outcome unknown |
| Logistic regression | Yes — native output | Needs conversion | The model estimates log odds |
The case-control row explains why odds ratios became standard in epidemiology. In a case-control study you decide how many cases and how many controls to recruit, so the proportion with the outcome in your sample is an artefact of your sampling, not a property of the population. A risk ratio computed from it would be meaningless. The odds ratio, remarkably, is unaffected by this and estimates the population odds ratio correctly.
Sparse cells are the other design issue worth anticipating. If any of the four counts is zero, the cross-product is either zero or undefined and the standard error formula fails, since it requires dividing by each cell. The conventional workaround is to add 0.5 to every cell — the Haldane-Anscombe correction — which produces a usable estimate but introduces a known bias towards the null. A better answer where the software allows it is Firth's penalised likelihood, which handles zero cells properly rather than by patching them.
Because the model is fitted on the log-odds scale, exp(b) is an odds ratio by construction. If your outcome is common and you want a risk ratio, you need a different model — a log-binomial or a Poisson model with robust standard errors — rather than a conversion applied afterwards.
Adjustment
Adjusted odds ratios
An odds ratio from a 2×2 table is unadjusted, or crude. An adjusted odds ratio comes from a logistic regression that includes other variables, and describes the association with those variables held constant.
| Crude OR | Adjusted OR | |
|---|---|---|
| Source | 2×2 table | Logistic regression |
| Controls for | Nothing | The covariates in the model |
| Notation | OR | aOR |
| Reported alongside | — | The list of covariates adjusted for |
Report both where possible. A crude OR of 2.70 that falls to 1.45 after adjustment tells the reader that much of the apparent association was attributable to the covariates — which is itself an informative finding, and one that disappears if only the adjusted figure is shown.
A word on how many covariates to include. Each variable entered consumes degrees of freedom and, in logistic regression, requires roughly ten events in the rarer outcome category to be estimated stably. Adding covariates because they are available rather than because they are plausible confounders inflates the standard errors, widens every interval, and can produce an adjusted odds ratio less trustworthy than the crude one it replaced. Choose the adjustment set from subject knowledge before fitting, not from which variables turn out significant.
An adjusted odds ratio holds constant only the variables you measured and entered. It says nothing about unmeasured confounders, and it does not convert an observational study into a causal one. Always list what was adjusted for, so a reader can judge what was left out.
Pitfalls
Six mistakes that cost marks
1. Saying 'times more likely' for an odds ratio
That describes a risk ratio. Say “the odds were 2.7 times higher”.
2. Reporting the odds ratio without a confidence interval
The point estimate alone conveys nothing about precision, and small studies produce very wide intervals.
3. Computing a symmetric interval
The interval must be built on the log scale and exponentiated, giving an asymmetric result.
4. Calculating a risk ratio from a case-control study
The proportion with the outcome is fixed by your sampling, so it is not a risk. Only the odds ratio is valid.
5. Comparing crude and adjusted odds ratios as if interchangeable
Label them separately and state which covariates the adjusted figure includes.
6. Interpreting an odds ratio below 1 loosely
An OR of 0.65 means the odds are 35% lower, not that the outcome is 35% less likely. The same care applies in both directions.
Reporting
Reporting odds ratios
| Situation | How to write it |
|---|---|
| Unadjusted | OR = 2.70, 95% CI [1.20, 6.11], p = .017 |
| Adjusted | aOR = 1.45, 95% CI [1.04, 2.02], adjusted for age, sex and baseline severity |
| Protective effect | OR = 0.62, 95% CI [0.41, 0.94] |
| With the risk ratio | OR = 2.70; RR = 1.55, 95% CI [1.09, 2.20] |
Forest plots of odds ratios are conventionally drawn on a logarithmic axis for the same reason the interval is computed on one: it places an odds ratio of 0.5 and one of 2.0 at equal distances either side of the null line, which is the correct visual representation of two effects of equal size in opposite directions. On a linear axis the protective effect would appear compressed and the harmful one exaggerated. If you produce your own figure, check the axis before interpreting the spread.
“Participants receiving the intervention had significantly higher odds of improvement than controls, OR = 2.70, 95% CI [1.20, 6.11], p = .017. As the outcome was common (56% overall), the corresponding risk ratio of 1.55 gives a more conservative picture of the effect size and is reported alongside.”
Send your data and design. A named statistician confirms which measure your study supports, computes it with the correct interval, and returns the interpretation in plain language.
See statistical consultancyAnswers
Frequently asked questions
What is the difference between an odds ratio and a risk ratio?
The risk ratio compares probabilities; the odds ratio compares odds. They are close when the outcome is rare and diverge sharply when it is common. An odds ratio of 2.0 with a baseline risk of 50% corresponds to a risk ratio of only 1.33, so describing an odds ratio as 'times more likely' overstates the effect.
How do you calculate an odds ratio?
From a 2x2 table, as the cross-product (a x d) / (b x c), where a and b are the outcome-positive and outcome-negative counts in the exposed group, and c and d the same in the unexposed group. Equivalently, divide the odds in one group by the odds in the other.
What does an odds ratio of 1 mean?
That the odds of the outcome are identical in both groups — no association. Above 1 means higher odds in the exposed group, below 1 means lower. If the confidence interval includes 1, the association is not statistically significant at that level.
Why is the confidence interval for an odds ratio asymmetric?
Because it is computed on the log scale, where the sampling distribution is approximately symmetric, and then exponentiated back. The result is an interval whose bounds are not equidistant from the point estimate. A symmetric interval around an odds ratio has been calculated incorrectly.
Can I calculate a risk ratio from a case-control study?
No. In a case-control study the numbers of cases and controls are chosen by the researcher, so the proportion with the outcome in the sample is an artefact of the design rather than a population risk. Only the odds ratio is valid, and it estimates the population odds ratio correctly.
What is an adjusted odds ratio?
An odds ratio from a logistic regression that includes other variables, describing the association with those covariates held constant. Report it as aOR and always list which variables were adjusted for. It controls only for what you measured and does not make an observational study causal.
Is a larger odds ratio always more important?
No. A large odds ratio from a small study may have a very wide confidence interval and little practical meaning, and a large odds ratio on a rare outcome can represent a small absolute change. Judge it against the interval and, where possible, the absolute risk difference.
How should I word an odds ratio in my results?
Use odds language: 'the odds of improvement were 2.7 times higher in the intervention group'. Avoid 'times more likely', which describes a risk ratio. If the outcome is common, consider reporting the risk ratio alongside so readers can judge the practical size of the effect.
Send the data. Get a fixed quote.
Attach your dataset or just describe the project. A named statistician replies with a price and a deadline, usually within one working day.