Pool dichotomous outcomes from 2x2 tables using Mantel-Haenszel (OR, RR, RD) or Peto odds ratio for rare events, with forest plot, heterogeneity statistics, and reproducible R code.
| Study | Events (Tx) | Total (Tx) | Events (Ctrl) | Total (Ctrl) | |
|---|---|---|---|---|---|
Drag & drop a file or
CSV, TSV, Excel (.xlsx/.xls) - max 500 rows
For each study, input the number of events and total participants in treatment and control groups. The calculator automatically derives non-event counts and validates that totals are consistent.
Choose from Mantel-Haenszel odds ratio, risk ratio, or risk difference depending on your clinical question. Each measure answers a different epidemiological question about the treatment effect.
Select the standard Mantel-Haenszel approach for most analyses, or the Peto odds ratio when dealing with rare events (below 1% event rate) and balanced group sizes across studies.
View the forest plot with individual study estimates displayed as squares weighted by sample size, and the pooled diamond representing the combined Mantel-Haenszel estimate with its confidence interval.
Examine Cochran Q, I-squared, and tau-squared statistics to determine whether the fixed-effect assumption is appropriate. If I-squared exceeds 50%, consider switching to a random-effects model.
Copy the auto-generated methods paragraph for your manuscript, download reproducible R code using the metafor package (rma.mh or rma.peto), or save the forest plot as PNG or PDF.
Need this done professionally? Get a complete systematic review or meta-analysis handled end-to-end.
Get a Free QuoteThe Mantel-Haenszel method computes pooled effects from raw 2x2 cell frequencies rather than log-transformed estimates and their variances. This makes it more robust for sparse data because it avoids the large-sample normality assumption required by the inverse-variance approach.
When event rates fall below 1%, the Peto odds ratio outperforms both MH and inverse-variance methods. It uses hypergeometric expectations and does not require continuity corrections, maintaining correct type I error rates even with many zero-event studies (Bradburn et al., 2007).
Studies with zero events in one arm require a continuity correction (typically 0.5 added to all four cells) to compute individual study estimates. This tool applies the correction only to affected studies, following Cochrane recommendations, preserving the integrity of studies that do not have zero cells.
MH weights each study by a function of its cell counts (b*c/N for odds ratios), while inverse-variance weights use 1/variance of the log estimate. With moderate event rates both approaches converge, but MH is preferred when individual study variances are unstable due to small samples.
Beyond pooling, the CMH framework provides a conditional test of association that adjusts for stratifying variables. The Q statistic tests whether the treatment effect is homogeneous across strata, serving as the foundation for heterogeneity assessment in fixed-effect meta-analysis.
The Peto method assumes balanced group sizes and treatment effects close to the null. When the true odds ratio is far from 1.0 or when randomization ratios differ substantially across studies, Peto estimates become biased. In these scenarios, use the standard MH odds ratio with continuity correction instead.
The Mantel-Haenszel method (Mantel and Haenszel, 1959) is the most widely used fixed-effect approach for pooling dichotomous outcomes in systematic reviews. Unlike the generic inverse-variance method, Mantel-Haenszel computes the pooled effect directly from the raw cell counts of each study's 2x2 contingency table, avoiding the need to estimate individual study log-odds ratios and their variances. The Cochrane Handbook (Deeks et al., 2023, Chapter 10) recommends Mantel-Haenszel as the default for binary outcomes because of its superior small-sample performance and robustness to sparse data.
The Peto odds ratio (Peto et al., 1977; Yusuf et al., 1985) takes a different approach using hypergeometric expectations and variances, making it specifically suited for rare events meta-analysis where event rates fall below 1%. Simulation studies (Bradburn et al., 2007; Sweeting et al., 2004) confirm that Peto maintains correct coverage with many zero-event studies, provided group sizes are balanced and the true odds ratio is not far from 1.0. When event rates exceed 5%, both Mantel-Haenszel and inverse-variance methods produce nearly identical results.
A critical consideration in dichotomous meta-analysis is zero-cell handling. When a study reports no events in one arm, the standard odds ratio or risk ratio becomes undefined. The most common solution is to apply a continuity correction of 0.5 to all four cells of the affected study. This enables computation of individual study estimates while introducing minimal bias (Sweeting et al., 2004). The Mantel-Haenszel pooled estimate, however, can often be computed without correction because it relies on cross-products of cell counts rather than individual study estimates.
When choosing between effect measures, the risk ratio is most intuitive for clinicians because it directly expresses how many times more likely the event is in the treatment group compared with the control group. The risk difference provides an absolute measure that is directly convertible to the number needed to treat (NNT = 1/RD), making it valuable for communicating clinical significance. The Mantel-Haenszel odds ratio is the traditional measure and remains the default in many Cochrane reviews, particularly because it has well-established mathematical properties and handles sparse data well.
Heterogeneity assessment is essential even with the Mantel-Haenszel fixed-effect model. The Cochran Q statistic tests the null hypothesis that all studies share a common effect, while I-squared quantifies the proportion of variability attributable to between-study differences rather than sampling error (Higgins et al., 2003). If substantial heterogeneity is detected (I-squared above 50%), the fixed-effect pooled estimate remains valid as a weighted average but its confidence interval may be too narrow. In such cases, consider switching to a random-effects model using our forest plot generator with DerSimonian-Laird or REML estimation.
The Robins-Breslow-Greenland variance estimator is used to compute the confidence interval for the Mantel-Haenszel odds ratio and risk ratio. This variance formula accounts for the correlation structure within each stratum and provides correct coverage even when individual studies are small. For risk difference pooling, the Greenland-Robins variance estimator is applied instead, reflecting the different mathematical structure of additive versus multiplicative scales.
To translate pooled odds ratios into clinically meaningful numbers, use our number needed to treat calculator. To assess publication bias visually and statistically, generate a funnel plot with Egger's test. For diagnostic test accuracy meta-analysis involving 2x2 tables of sensitivity and specificity, see our diagnostic test accuracy calculator. Compute individual study effect sizes before pooling with the effect size calculator.
Proper reporting of the Mantel-Haenszel analysis in your manuscript should specify the effect measure, the handling of zero cells, the confidence level, and the heterogeneity statistics. The PRISMA 2020 statement (Page et al., 2021) and the Cochrane Handbook (Chapter 10) both emphasize that the statistical method, model, and software must be clearly described. Our methods report generator can help you assemble a complete, properly structured methods paragraph that covers all required elements.
The Mantel-Haenszel (MH) method is a fixed-effect approach for pooling dichotomous data from multiple 2x2 tables without requiring individual study variance estimates. It computes a weighted average of stratum-specific effect measures (odds ratio, risk ratio, or risk difference) directly from cell counts. The MH method is the default fixed-effect approach in the Cochrane Handbook (Deeks et al., 2023) because it handles sparse data better than the generic inverse-variance method and does not require the large-sample normality assumption for individual study log-odds ratios.
The Peto method is specifically recommended for meta-analysis of rare events (event rates below 1%) where the Mantel-Haenszel odds ratio can be unreliable due to zero cells. Peto's method does not require continuity corrections and maintains correct type I error rates with very sparse data. However, it assumes balanced group sizes and treatment effects close to the null. If odds ratios are far from 1.0 or group sizes are very unequal, Peto can be biased, and the MH method with 0.5 continuity correction or an exact method is preferred (Bradburn et al., 2007).
When a study has a zero cell (no events in one arm), the standard MH odds ratio and risk ratio formulas can still be computed because MH uses weighted sums of cross-products rather than individual study log-estimates. However, the individual study OR or RR becomes zero or infinity. A continuity correction of 0.5 added to all cells of affected studies is the most common approach to allow computation of individual study estimates and their confidence intervals. This tool applies the correction only to studies with zero cells (not all studies), following Cochrane recommendations. For the Peto method, no continuity correction is needed.
The inverse-variance (IV) method computes each study's log-OR and its variance separately, then pools using weights proportional to 1/variance. This requires the large-sample normal approximation for each study's log-OR. The Mantel-Haenszel method bypasses individual variance estimation by computing the pooled OR directly from cell counts using study-specific weights of (b*c)/N. The MH method is more robust for sparse data because it does not rely on the normal approximation for individual studies. When event rates are moderate, both methods produce virtually identical results.
Cochran's Q tests whether the true effect sizes are homogeneous across studies. A significant Q (p < 0.10 is the conventional threshold) suggests the fixed-effect assumption is violated. I-squared quantifies the proportion of total variability due to between-study heterogeneity: 0-40% may be unimportant, 30-60% moderate, 50-90% substantial, 75-100% considerable (Higgins et al., 2003). If heterogeneity is substantial, the Mantel-Haenszel fixed-effect estimate remains valid as a weighted average but its confidence interval may be too narrow. Consider a random-effects model (DerSimonian-Laird or REML) for inference in that case.
Yes. The MH method pools risk differences (RD) using weights of (n1*n2)/N for each study, where n1 and n2 are the treatment and control group sizes and N is the total. The pooled RD and its standard error are computed directly from cell counts. Risk differences are on an absolute scale (ranging from -1 to +1) and are directly interpretable as the absolute change in event probability. They are particularly useful for computing numbers needed to treat (NNT = 1/RD). The downside is that RD can vary across baseline risk levels even when the relative effect (OR or RR) is constant.
Visualize your meta-analysis results with our forest plot generator supporting both fixed-effect and random-effects models with cumulative meta-analysis and diagnostic plots. Compute individual study effect sizes before pooling with our effect size calculator for OR, RR, and SMD. Convert pooled odds ratios to clinically meaningful numbers with our NNT calculator. Assess publication bias with our funnel plot and Egger's test tool.
Reviewed by
Dr. Sarah Mitchell holds a PhD in Biostatistics from Johns Hopkins Bloomberg School of Public Health and has over 15 years of experience in systematic review methodology and meta-analysis. She has authored or co-authored 40+ peer-reviewed publications in journals including the Journal of Clinical Epidemiology, BMC Medical Research Methodology, and Research Synthesis Methods. A former Cochrane Review Group statistician and current editorial board member of Systematic Reviews, Dr. Mitchell has supervised 200+ evidence synthesis projects across clinical medicine, public health, and social sciences. She reviews all Research Gold tools to ensure statistical accuracy and compliance with Cochrane Handbook and PRISMA 2020 standards.
Whether you have data that needs writing up, a thesis deadline approaching, or a full study to run from scratch, we handle it. Average turnaround: 2-4 weeks.