Calculator inputs
Enter a separate 2×2 table for each stratum. The pooled result uses the Mantel-Haenszel common odds ratio across your chosen strata.
Example data table
This sample shows three age strata for a case-control comparison.
| Stratum | Exposed cases (a) | Exposed controls (b) | Unexposed cases (c) | Unexposed controls (d) |
|---|---|---|---|---|
| Age under 40 | 45 | 30 | 22 | 40 |
| Age 40 to 59 | 28 | 36 | 18 | 44 |
| Age 60 and above | 20 | 25 | 12 | 29 |
Formula used
The calculator uses the Mantel-Haenszel common odds ratio for stratified 2×2 tables.
Per stratum odds ratio: ORi = (ai × di) / (bi × ci)
Adjusted common odds ratio: ORMH = Σ(aidi / ni) ÷ Σ(bici / ni)
Confidence interval: exp[ ln(ORMH) ± z × SE{ln(ORMH)} ]
Mantel-Haenszel test: χ² compares the stratified association against the null value of one common odds ratio.
Here, a, b, c, and d are the four cells in each 2×2 table, and n is the total count within that stratum.
How to use this calculator
- Decide how many strata you need for your confounder or matching factor.
- Rename the exposure, reference, outcome, and non-outcome labels if needed.
- Enter the four counts for each stratum using the 2×2 table layout.
- Choose the confidence level and your preferred decimal precision.
- Enable continuity correction if any table contains a zero cell.
- Submit the form to see the pooled adjusted odds ratio above the calculator.
- Review stratum-level odds ratios, heterogeneity, and the significance test.
- Use the CSV or PDF buttons to save the summary and stratum table.
FAQs
1) What does an adjusted odds ratio show?
It estimates the association between exposure and outcome after accounting for stratification by a confounder or matching variable. Values above one suggest higher odds, while values below one suggest lower odds.
2) When should I use this calculator?
Use it for stratified 2×2 tables, especially in case-control studies, matched analyses, or simple confounder adjustment when you want one pooled odds ratio across several subgroups.
3) Is this the same as logistic regression?
No. This page uses the Mantel-Haenszel method for stratified tables. Logistic regression handles multiple predictors simultaneously and is better for continuous covariates or more complex adjustment needs.
4) Why is continuity correction useful?
Zero cells can make odds ratios infinite or unstable. Adding 0.5 to each cell in the affected stratum keeps the estimate calculable and makes confidence intervals more stable.
5) What does the crude odds ratio mean here?
It is the unadjusted odds ratio from the combined counts across strata. Comparing crude and adjusted values helps you see whether stratification materially changes the estimated relationship.
6) How should I read the confidence interval?
The interval gives a plausible range for the common adjusted odds ratio. If it includes one, the association is not clearly different from no effect at that confidence level.
7) What does heterogeneity tell me?
Heterogeneity reflects how different the stratum-specific odds ratios are from one another. High I² suggests the strata may not share one common effect estimate very well.
8) Can I use percentages instead of counts?
No. The formulas require actual frequencies in each cell. Convert percentages back to counts before using the calculator, otherwise the common odds ratio may be misleading.