How to Create a Forest Plot for Your Meta-Analysis (Step-by-Step Guide)
A forest plot is the visual backbone of any meta-analysis. This guide walks you through building one from scratch, interpreting every element, and using diagnostic plots to check your model assumptions.
Dr. Sarah Mitchell
March 9, 2026
Want to try this yourself? Use our free research tools, no sign-up required.
Key Takeaways
Assemble effect sizes, variances, and study labels before generating any plot.
Choose REML over DerSimonian-Laird for less biased tau-squared estimates, especially with fewer than 20 studies.
Square size reflects inverse-variance weight; diamond tips show the pooled confidence interval.
Always report the prediction interval alongside I-squared to communicate real-world variability.
Galbraith and Baujat plots identify outlier studies that drive heterogeneity before you decide whether to exclude them.
Export R code from the tool to reproduce the plot programmatically for journal revision rounds.
A forest plot is the single most recognizable output of a meta-analysis. It displays each study's effect estimate alongside a pooled summary, letting readers instantly see where studies agree, where they diverge, and how much weight each one carries. If you are preparing a manuscript, a grant, or a thesis, knowing how to build and interpret this plot correctly is non-negotiable.
Try our free free forest plot maker to build publication-ready plots without writing a single line of code.
What You Need Before You Start
Forest plot: 8-item pre-build checklist
Before generating a forest plot, you need three things assembled in a clean spreadsheet or data file.
Effect size estimates for each study: odds ratios, risk ratios, standardized mean differences (Cohen's d or Hedges' g), or correlation coefficients depending on your outcome type.
Variance or confidence interval bounds for each estimate. Most software accepts either standard errors or the lower and upper bounds of the 95% confidence interval directly.
Study labels: author names, publication years, and sample sizes. These appear on the left axis and help readers locate familiar studies.
If you have not yet computed your effect sizes, use the free effect size tool to convert raw group means, proportions, or correlation coefficients into a common metric before importing them.
Choosing Your Heterogeneity Model: REML vs DerSimonian-Laird
The choice of variance estimator determines how much weight your random-effects model assigns to smaller versus larger studies, and it affects the width of the pooled confidence interval.
DerSimonian-Laird (DL) is the classic method. It uses a method-of-moments estimator for between-study variance (tau-squared) that is fast and widely cited. However, it tends to underestimate tau-squared when the number of studies is small, which can produce confidence intervals that are too narrow.
REML (Restricted Maximum Likelihood) is the modern default in most software packages including R's metafor and Stata's metan. REML produces less biased tau-squared estimates, especially with fewer than 20 studies, and is now recommended by the Cochrane Handbook for most applications.
For a fixed-effect model, the choice does not apply because fixed-effect models assume no between-study variance. Use a fixed-effect model only when you have a strong theoretical reason to believe all studies are estimating exactly the same underlying true effect, which is rare in practice.
Practical guidance: default to REML unless a specific journal or method requires DL. When you switch estimators, recheck your I-squared, tau-squared, and the prediction interval width, because these will change.
Building the Plot: A Step-by-Step Walkthrough
Forest plot: 6 steps from raw data to publication
Step 1: Import your data. In the forest plot creator, paste your study labels, effect sizes, and confidence interval bounds into the data entry panel. The tool accepts Cohen's d, Hedges' g, odds ratios, risk ratios, and correlation coefficients.
Step 2: Select your effect measure and model. Choose the effect size type that matches your data. Select random-effects with REML as your starting model. The plot will render immediately with study squares scaled by inverse variance weight.
Step 3: Read the study squares and lines. Each square represents one study's point estimate. The square's size reflects the study's weight in the analysis: larger squares mean more weight. The horizontal line through the square is the 95% confidence interval. A line that crosses the null (zero for mean differences, one for ratios) indicates a non-statistically-significant result for that study individually.
Step 4: Interpret the diamond. The pooled effect appears as a diamond at the bottom. The center of the diamond is the summary estimate. The left and right tips are the confidence interval limits. A narrow diamond means more precise pooled evidence; a wide diamond indicates high heterogeneity or few studies.
Step 5: Add the prediction interval. The prediction interval is the range where you expect 95% of true effects to fall in future similar studies. It is wider than the confidence interval and is arguably more important for clinical decision-making. If your confidence interval excludes the null but your prediction interval crosses it, the pooled effect may not replicate in every population. Always report the prediction interval alongside I-squared.
Step 6: Check your heterogeneity statistics. I-squared above 50% suggests substantial heterogeneity. Tau-squared gives the absolute variance in true effects. The Q statistic p-value tests whether heterogeneity exceeds chance, though it has low power with few studies.
Need help with your meta-analysis?
Our PhD statisticians run complete meta-analyses: effect sizes, forest plots, heterogeneity testing, and publication-ready results sections.
A point-and-click tool is fine for a first plot, but a thesis committee will expect you to know what the software is doing. This is the same analysis from raw data to finished figure in metafor, the package most journals expect for a reproducible meta-analysis.
Start with six randomized trials of a continuous outcome, each with group means, standard deviations, and sample sizes:
library(metafor)
dat <- data.frame(
study = c("Allen 2018", "Brooks 2019", "Cardoso 2020",
"Devi 2021", "Esposito 2022", "Farouk 2023"),
m1i = c(52, 49, 55, 47, 51, 50), sd1i = c(10, 9, 11, 8, 10, 12), n1i = c(40, 35, 60, 28, 45, 33),
m2i = c(48, 47, 50, 46, 45, 49), sd2i = c(11, 10, 10, 9, 11, 10), n2i = c(38, 36, 58, 30, 44, 31)
)
# Step 1: compute Hedges' g and its variance for every study
dat <- escalc(measure = "SMD",
m1i = m1i, sd1i = sd1i, n1i = n1i,
m2i = m2i, sd2i = sd2i, n2i = n2i,
data = dat, slab = study)
# Step 2: fit the random-effects model (REML is the default and recommended)
res <- rma(yi, vi, data = dat, method = "REML")
res # pooled g, 95% CI, tau^2, I^2, Q-test
# Step 3: draw a publication-ready forest plot with a prediction interval
forest(res, addpred = TRUE, header = "Study",
xlab = "Standardized Mean Difference (Hedges' g)",
mlab = "Random-effects model (REML)")
Read the output in this order. The res summary gives the pooled Hedges' g with its 95% confidence interval (the diamond), tau^2 and I^2 for heterogeneity, and the Q-test. The addpred = TRUE argument draws the prediction interval as a dashed line through the diamond, which is the single most under-reported element on a forest plot: the confidence interval describes uncertainty in the average effect, while the prediction interval describes the range of true effects a new study might show. When I² is non-trivial, the prediction interval is usually much wider than the confidence interval, and reporting only the latter overstates consistency.
To express the diamond as an odds ratio or risk ratio instead, set measure = "OR" in escalc() (supplying event and non-event counts) and add atransf = exp to forest() so the axis displays the ratio rather than its logarithm. The underlying inverse-variance machinery, the weights, the pooled estimate, and the confidence interval, is identical to what our forest plot interpretation guide walks through by hand. If you would rather not write code, our forest plot generator produces the same model output and a downloadable figure.
Subgroup Analysis on a Forest Plot
Subgroup analysis lets you test whether the pooled effect differs across pre-specified categories: intervention type, risk of bias level, patient age group, or geographic region.
To add subgroups in the Forest Plot Generator, assign each study a group label in the subgroup column. The plot will render each group as a separate mini-forest with its own diamond, then display a test for subgroup differences (the Q-between statistic with a p-value).
Interpret subgroup results conservatively. A statistically significant Q-between only confirms that subgroup effects differ from each other; it does not prove that the subgroup variable causes the difference. Always pre-register subgroup hypotheses before analysis to avoid data-dredging.
Diagnostic Plots: Galbraith and Baujat
Once you have your main forest plot, two additional diagnostic plots reveal information that the standard forest plot cannot.
The Galbraith plot (also called a radial plot) plots each study's z-score divided by its standard error on the y-axis against one divided by its standard error on the x-axis. Studies that sit far from the regression line are outliers contributing disproportionately to heterogeneity. See our detailed guide on Galbraith and Baujat diagnostic plots for a full walkthrough.
The Baujat plot places each study's contribution to the overall Q statistic on the x-axis and its influence on the pooled estimate on the y-axis. Studies in the upper-right quadrant are both heterogeneous and influential; these are the studies to examine first when your I-squared is unacceptably high.
The cumulative meta-analysis tab re-runs the pooled estimate each time a new study is added, ordered by publication date. This shows when the evidence first crossed statistical significance and whether the summary effect has been stable or drifting. See the dedicated guide on cumulative meta-analysis for interpretation strategies.
Exporting Your Plot
The Forest Plot Generator exports publication-ready SVG and PNG files suitable for journal submission. It also provides the equivalent R code using the metafor package so you can reproduce the exact plot in your own environment, adjust axis labels, and add custom annotations required by specific journals.
Run a sensitivity analysis after finalizing your main plot to test how the pooled estimate changes when you remove each study one at a time. The robustness check tool integrates directly with the same effect size data and highlights which studies are responsible for the bulk of your summary estimate.
For publication bias assessment, pair your forest plot with a funnel plot. The funnel plot software generates Egger's test and trim-and-fill estimates alongside the visual asymmetry check.
Key Takeaways
Assemble effect sizes, variances, and study labels before generating any plot.
Choose REML over DerSimonian-Laird for less biased tau-squared estimates, especially with fewer than 20 studies.
Square size reflects inverse-variance weight; diamond tips show the pooled confidence interval.
Always report the prediction interval alongside I-squared to communicate real-world variability.
Want a publication-ready forest plot for your own data? Our professional meta-analysis support produces journal-grade forest plots with subgroups, prediction intervals, and reproducible R code. Get a custom quote.
A forest plot displays each included study as a square (effect estimate) with a horizontal line (confidence interval) and combines them into a pooled summary diamond at the bottom. It allows readers to see individual study results and the overall synthesis in one figure.
Use a random-effects model in most cases. A fixed-effect model assumes all studies estimate an identical true effect, which is rarely justified when studies differ in population, intervention, or follow-up duration. Random-effects models account for between-study variance and produce more conservative, generalizable pooled estimates.
A wide prediction interval means the true effect is likely to vary considerably across different settings or populations. Even if the pooled estimate is statistically significant, a prediction interval that crosses the null line suggests the intervention may not work everywhere and clinical application should be cautious.
There is no hard minimum, but a random-effects meta-analysis with fewer than 5 studies produces highly unstable tau-squared estimates. With 2 to 4 studies, consider a fixed-effect model or a narrative synthesis with a table instead of a pooled diamond.
Yes, but power is very limited. A subgroup analysis comparing two groups of 5 studies each will rarely detect a real subgroup difference even if one exists. Pre-register your subgroups, report the Q-between p-value, and note the low power explicitly in your manuscript.
I-squared expresses heterogeneity as a percentage of total variance that is due to between-study differences rather than chance, making it a relative measure. Tau-squared is the absolute variance of true effects across studies. A small I-squared can accompany a clinically meaningful tau-squared if study precision is high, so always report both.
First, use the Galbraith or Baujat plot to identify which studies are outliers and whether they are also influential. Then perform a sensitivity analysis removing those studies one at a time. Report both the full-set and leave-one-out results; do not silently exclude studies without a pre-registered justification. Need help with your systematic review or meta-analysis? [Get a free quote](/get-a-quote) from our team of PhD researchers.
Share
Found this useful? Share it with your colleagues.
Need help with your meta-analysis?
Our PhD statisticians run complete meta-analyses: effect sizes, forest plots, heterogeneity testing, and publication-ready results sections.
Reading About Meta-Analysis? Our PhD Team Runs Them Every Day.
From data extraction to forest plots, sensitivity analysis, and a journal-ready manuscript. We handle the full meta-analysis so you can focus on your research question.
Our promise: Free re-run of the pooled analysis if reviewers question the estimate or model.
4.9 / 5Quote within a few hoursmetafor R + Cochrane HandbookPhD methodologistConfidential by default
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.
Need professional help with your systematic review or meta-analysis? Get a free quote from our team of PhD researchers.
Reading About Meta-Analysis? Our PhD Team Runs Them Every Day.
From data extraction to forest plots, sensitivity analysis, and a journal-ready manuscript. We handle the full meta-analysis so you can focus on your research question.
Meta-analysis in psychology pools the effect sizes from many studies into one reliable result. Learn the definition, real examples, and how researchers run one.
Human-written, AI-assisted, AI-screened: the labels have stopped being descriptive. Here is the single threshold journals actually use, what you must disclose, and where Research Gold draws the line.
Roughly 80 systematic reviews are published daily. The average takes 67.3 weeks, uses 5 authors, and costs about $141,195 in researcher time. Every figure sourced and linked.