# Odds Ratio Calculator

> Free odds ratio calculator for a 2x2 table. Get the OR, 95% confidence interval, chi-square and Fisher p-values, a ready-to-paste AMA sentence and the R script that reproduces it. Your data never leaves your browser.

Canonical: https://biostatkit.com/odds-ratio

Enter a 2x2 table and get the odds ratio, its 95% confidence interval and p-value, a sentence you can paste into your manuscript, and the R code that reproduces every number.

## Methods wording

The odds ratio and its 95% CI (Woolf logit method) were computed with BiostatKit [1]; the association was tested with the Pearson chi-square or Fisher exact test.

Method: Woolf logit CI, Pearson chi-square, Fisher exact.

## Frequently asked questions

### When should I use an odds ratio instead of a risk ratio?

Use the OR for case-control studies and for logistic regression, where risks cannot be estimated directly. For cohort studies and trials with a common outcome, the risk ratio is easier to interpret.

### What does a zero cell do?

The OR is undefined (division by zero) or infinite. This tool adds 0.5 to every cell and says so. Report that choice in your methods.

### Chi-square or Fisher exact: which p-value do I report?

Report Fisher exact when any expected cell count is under 5 or the total is small. Otherwise either is acceptable; say which one you used.

### Is my data stored or sent anywhere?

No. All calculations run in your browser tab. Nothing is uploaded, and the page works offline once loaded.

## Related calculators

- [Relative risk calculator](https://biostatkit.com/relative-risk)
- [NNT calculator](https://biostatkit.com/nnt)

Author: TS.BS. Vũ Duy Kiên (https://www.vuduykien.com)
