What this answers
This calculator answers "how much higher or lower are the odds of an event in one group compared to another, and how precisely is that ratio estimated?" It works on any 2 by 2 table of counts, whether from a case-control study, a cross-sectional survey, or any other design that produces a table shaped this way.
How it is calculated
The odds ratio is (a times d) divided by (b times c) using the table's four cells. Because the odds ratio's sampling distribution is skewed on its natural scale but approximately normal on the log scale, the confidence interval is built in log space, using a standard error from the reciprocals of all four cell counts, then converted back with the exponential function. When any single cell is exactly 0, the log odds ratio would otherwise be undefined, so this calculator automatically applies the standard 0.5 (Haldane-Anscombe) continuity correction to every cell and flags that it did so.
Worked example
For a table of 10 events and 20 non-events in Group 1, and 5 events and 25 non-events in Group 2, the odds ratio is (10 times 25) divided by (20 times 5), exactly 2.5. The 95% confidence interval, built from the log-odds standard error of about .625, spans roughly .74 to 8.5, a wide range reflecting the relatively small cell counts involved.
Assumption audit
What this result does not mean
An odds ratio is not the same as a risk ratio, and treating it as one overstates the effect whenever the outcome is not rare; use the Risk Ratio Confidence Interval Calculator directly if you have cohort-style data with a known denominator and want a risk ratio instead.
Limitations
The automatic continuity correction changes the estimate itself, not just the interval, so a table with a zero cell should be treated as a genuinely uncertain estimate regardless of how narrow the corrected interval happens to look.