Forest plot generator
This forest plot generator pools your studies by inverse-variance weighting, each study weighted by one over the square of its standard error, in a fixed-effect or a DerSimonian and Laird random-effects meta-analysis. It reports the pooled estimate with its 95% CI, z and P, Cochran’s Q, I² and τ², and draws the forest plot for you to download.
Updated
Runs in your browser. Nothing you enter is uploaded, stored or sent anywhere.
How the meta-analysis is calculated
Each study gives an effect estimate yᵢ and its variance vᵢ, on the log scale for a ratio. The formulas are the Cochrane Handbook’s (10.3 and 10.10) and RevMan’s (Deeks and Higgins):
| Step | Formula |
|---|---|
| Weights | wᵢ = 1 ÷ vᵢ |
| Fixed-effect estimate | θ = Σwᵢyᵢ ÷ Σwᵢ, with SE = 1 ÷ √Σwᵢ |
| Heterogeneity | Q = Σwᵢ(yᵢ − θ)² on k − 1 degrees of freedom |
| I² | I² = max(0, (Q − (k − 1)) ÷ Q) |
| Between-study variance (DerSimonian and Laird) | τ² = max(0, (Q − (k − 1)) ÷ (Σwᵢ − Σwᵢ² ÷ Σwᵢ)) |
| Random-effects estimate | The same, with wᵢ* = 1 ÷ (vᵢ + τ²) |
| 95% CI, z and P | θ ± 1.96 × SE, z = θ ÷ SE, P from z |
| 95% prediction interval | θ ± t(k − 2) × √(τ² + SE²), for three or more studies |
The prediction interval is Higgins, Thompson and Spiegelhalter’s (2009), with a t distribution on k − 2 degrees of freedom. The Handbook’s simpler version uses k − 1, which gives a slightly narrower interval.
Each study’s effect
- An effect and its 95% CI:
SE = (upper − lower) ÷ (2 × 1.96), after taking logs for a ratio (Cochrane 6.3). - Events and totals: the log odds ratio, log risk ratio or risk difference, with their usual variances. For the ratios, 0.5 is added to every cell of a table with a zero cell, and a study with no events (or only events) in both groups is left out, as the Handbook advises (10.4.4).
- Means, SDs and Ns: the mean difference, or Hedges’ g with the exact small-sample correction and the variance
1/n₁ + 1/n₂ + g² ÷ (2(n₁ + n₂)), metafor’s default (escalc). The effect size calculator shows the other variance conventions.
The arithmetic is a port of OtterSR’s own meta-analysis code, and its tests check this page against the same metafor results that code is pinned to.
Worked example: a forest plot of odds ratios
The generator opens on dataset 2 from Borenstein and colleagues, chapter 14: six fictional trials with a binary outcome, pooled as odds ratios.
| Study | Treated | Control |
|---|---|---|
| Saint | 12 of 65 | 16 of 65 |
| Kelly | 8 of 40 | 10 of 40 |
| Pilbeam | 14 of 80 | 19 of 80 |
| Lane | 25 of 400 | 80 of 400 |
| Wright | 8 of 40 | 11 of 40 |
| Day | 16 of 65 | 18 of 65 |
Example: The results
Fixed effect: OR 0.48 (95% CI 0.36 to 0.66). Lane, the largest trial, carries 41% of the weight.
Heterogeneity: Q = 10.55 on 5 degrees of freedom (P = 0.061), I² = 53% and τ² = 0.173.
Random effects: OR 0.57 (95% CI 0.36 to 0.91), z = −2.37, P = 0.018. Lane’s weight falls to 25%, since the model gives smaller studies relatively more.
The 95% prediction interval is 0.15 to 2.15: the true effect in a similar new trial could lie anywhere from a large benefit to a harm.
These match the book’s results as reproduced with metafor. The tests also reproduce the set-shifting example in Higgins and colleagues’ paper (SMD 0.36, 95% CI 0.19 to 0.53) and OtterSR’s own test cases.
Choosing a model, and other caveats
- Choose fixed or random effects by design, not by I². A fixed-effect model assumes one true effect; a random-effects model, a distribution of them. Decide which describes your studies before you see the results. The Handbook is explicit that the choice “should never be made on the basis of a statistical test for heterogeneity” (10.10.4.1).
- I² is uncertain with few studies. The Handbook’s rough guide reads 0% to 40% as possibly unimportant and 75% to 100% as considerable, with overlapping bands in between, and warns against simple thresholds (10.10.2).
- DerSimonian and Laird is the simplest estimator, not the best. Since 2024 RevMan defaults to REML, and prompts for the Hartung, Knapp, Sidik and Jonkman interval when τ² is above zero and there are more than two studies (10.10.4.4). This tool uses DerSimonian and Laird with a Wald interval, which is also OtterSR’s default, though OtterSR can use REML, Paule-Mandel or maximum likelihood and the HKSJ interval instead. With few studies, the Wald interval may be too narrow (10.10.4.5).
- Random effects can amplify small-study bias. If small studies show bigger effects, giving them more weight pulls the pooled result their way (10.10.4.1).
- Rare events. Inverse-variance and DerSimonian and Laird methods should be avoided when events are rare, and the 0.5 correction biases results towards no difference (10.4.4.1 and 10.4.4.3).
- Prediction intervals with few studies can be spuriously wide or narrow; the Handbook encourages them from about five studies (10.10.4.3).
- Count each person once. A study with two intervention arms and one control can’t enter twice with the same control group (6.2.9).
What to report
What to report: What PRISMA 2020 asks for
In the methods: the effect measure (item 12), and the model, how you assessed heterogeneity, and the software (item 13d) (PRISMA 2020). For this tool, that’s inverse variance with a DerSimonian and Laird τ², Wald 95% CIs, and any 0.5 corrections.
In the results: the pooled estimate with its 95% CI and the heterogeneity statistics (item 20b), with the forest plot. Give τ² and the prediction interval alongside I², since I² alone doesn’t say how much the effects vary.
OtterSR’s Write stage makes forest plots like this from your extracted data: ask for one, and it runs the same DerSimonian and Laird meta-analysis by default and draws the plot, which refreshes when the data change. It can also pool by Mantel-Haenszel or Peto, and draws a subgroup analysis by subgroup, with the test for subgroup differences. See how OtterSR works.
Frequently asked questions
Is this forest plot maker free to use online?
Yes, with no account. The meta-analysis and the drawing run in your browser, and nothing you enter leaves it. Download the plot as SVG for a journal or as PNG for slides, and copy the numbers from the table under it.
Can I make a forest plot of odds ratios?
Yes: choose events and totals, or enter each study’s odds ratio with its 95% CI. Ratios are pooled on the log scale and drawn on a log axis, so an OR of 0.5 sits as far from 1 as an OR of 2.
Is this a heterogeneity (I²) calculator too?
Yes. It gives Cochran’s Q with its P value, I², τ² and τ, and the prediction interval. To get I² for published results, enter each study’s estimate and confidence interval.
Should I use a fixed-effect or a random-effects meta-analysis?
Decide from what you expect of the studies, before seeing the results, not from I² or the Q test (Cochrane 10.10.4.1). If the populations, interventions or settings differ, a random-effects model, which allows the true effect to vary, is usually the honest choice; then report the prediction interval too.
How to cite this tool
OtterSR. Forest plot generator. https://www.ottersr.com/tools/forest-plot-generator (accessed today’s date).
Please cite the method as well:
Deeks JJ, Higgins JPT, Altman DG, McKenzie JE, Veroniki AA, Simmonds M (editors). Chapter 10: Analysing data and undertaking meta-analyses [last updated November 2026]. In: Higgins JPT, Thomas J, Chandler J, et al (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.5.1. Cochrane, 2026.
Higgins JPT, Thompson SG, Spiegelhalter DJ. A re-evaluation of random-effects meta-analysis. Journal of the Royal Statistical Society Series A 2009;172(1):137–59.
Related guides
- How to read a forest plot in a meta-analysisHow to read a forest plot: what the squares, lines, diamond and line of no effect mean, how to spot heterogeneity, and what the I² and P values beneath it say.
- How to do a meta-analysis: a step-by-step guideHow to do a meta-analysis: deciding whether to pool, choosing the effect measure, fixed or random effects, heterogeneity, sensitivity analyses and reporting.
- Heterogeneity in meta-analysis: what I², τ² and Q tell youHeterogeneity in meta-analysis: Cochran’s Q, I², τ² and prediction intervals, fixed vs random effects, and exploring it with subgroups and meta-regression.
Related tools
- Effect size calculator: Cohen’s d and Hedges’ gUse this when studies measure the same outcome on different scales and you need a standardized mean difference.
- Funnel plot generator and Egger’s testUse this when your meta-analysis has 10 or more studies and you need to check the funnel plot for small-study effects or publication bias.
- I² heterogeneity calculatorUse this when a meta-analysis reports Q but not I², or you need a confidence interval for I² that your software didn’t give.
Sources
- Deeks JJ, Higgins JPT, Altman DG, McKenzie JE, Veroniki AA, Simmonds M (editors). Chapter 10: Analysing data and undertaking meta-analyses [last updated November 2026]. In: Higgins JPT, Thomas J, Chandler J, et al (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.5.1. Cochrane, 2026. https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/chapter-10
- Higgins JP, Li T, Deeks JJ (editors). Chapter 6: Choosing effect measures and computing estimates of effect [last updated August 2023]. In: Higgins JP, Thomas J, Chandler J, et al (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.5. Cochrane, 2024. https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/chapter-06
- Deeks JJ, Higgins JPT, on behalf of the Statistical Methods Group of The Cochrane Collaboration. Statistical algorithms in Review Manager 5. August 2010. https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/statistical-methods-revman5
- Higgins JPT, Thompson SG, Spiegelhalter DJ. A re-evaluation of random-effects meta-analysis. Journal of the Royal Statistical Society Series A 2009;172(1):137–59. https://doi.org/10.1111/j.1467-985X.2008.00552.x
- Viechtbauer W. escalc: calculate effect sizes and outcome measures. Reference manual of the metafor package for R. https://wviechtb.github.io/metafor/reference/escalc.html
- Borenstein M, Hedges LV, Higgins JPT, Rothstein HR. Introduction to Meta-Analysis. Chichester: John Wiley & Sons, 2009. Chapters 4, 5 and 14. https://doi.org/10.1002/9780470743386
- Viechtbauer W. Borenstein et al. (2009): the book’s worked examples reproduced with the metafor package for R. https://wviechtb.github.io/meta_analysis_books/borenstein2009.html
- Page MJ, McKenzie JE, Bossuyt PM, et al. The PRISMA 2020 statement: an updated guideline for reporting systematic reviews. BMJ 2021;372:n71. https://doi.org/10.1136/bmj.n71