![Forest plot of six clinical trials showing odds ratios on a log scale with pooled random-effects REML diamond at 0.72 [0.63, 0.83]](/images/examples/forest-plot-generator/forest-plot-odds-ratio-example.webp)
Odds ratio forest plot (6 RCTs)
Six demonstration trials on 30-day hospital readmission plotted on a logarithmic axis around 1. Pooled REML OR is 0.72 [0.63, 0.83] with Q = 3.37 (p = 0.643) and I² = 0.0%.
Paste study effect sizes, 2×2 event counts, or arm means and SDs to calculate pooled meta-analysis estimates and export a journal-ready forest plot.
6 studies ready
| Pooled OR [95% CI] | z / p | Q (df, p) | I² | τ² |
|---|---|---|---|---|
| 0.72 [0.63, 0.83] | -4.64 (< 0.0001) | 3.37 (5, 0.643) | 0.0% | 0.0000 |
1. Analysis scale, standard errors, and inverse-variance weights
Ratio measures (OR) are transformed with natural logs: y_i = ln(OR) and SE = (ln(Upper) − ln(Lower)) / 3.92. Each study's variance is v_i = SE².
| Study | ln(OR) | SE | v = SE² | Weight w_i (%) |
|---|---|---|---|---|
| Alvarez 2019 | -0.3285 | 0.1768 | 0.0313 | 31.98 (15.7%) |
| Chen 2020 | -0.4463 | 0.1796 | 0.0323 | 30.99 (15.2%) |
| Kowalski 2021 | -0.1278 | 0.1789 | 0.0320 | 31.25 (15.3%) |
| Okafor 2021 | -0.5978 | 0.2455 | 0.0603 | 16.59 (8.1%) |
| Patel 2022 | -0.2485 | 0.1329 | 0.0177 | 56.66 (27.8%) |
| Lindholm 2024 | -0.3857 | 0.1662 | 0.0276 | 36.20 (17.8%) |
2. Fixed-effect inverse-variance baseline
Σw_i = 203.68, θ_FE = -0.3255, SE_FE = 0.0701
3. Between-study heterogeneity
Q = 3.372, df = 5, p = 0.643 · I² = 0.0% · τ² = 0.00000 (τ = 0.0000)
τ² estimated by Restricted Maximum Likelihood (REML) via Fisher scoring; random-effects weight w_i* = 1 / (v_i + τ²).
4. Pooled estimate, z-test, and prediction interval
θ = -0.3255, SE = 0.0701 → OR = 0.72 [0.63, 0.83] · z = -4.64, p = < 0.0001
95% PI (t_4 = 2.776): [0.59, 0.88]
Calculations and SVG rendering run inside your browser while you edit. Downloading saves your table and settings to your history so you can reopen the plot later.
Every figure below is rendered directly by this forest plot generator from its built-in demonstration datasets, unedited. Click any example to inspect its table, switch pooling models, or adjust labels.
![Forest plot of six clinical trials showing odds ratios on a log scale with pooled random-effects REML diamond at 0.72 [0.63, 0.83]](/images/examples/forest-plot-generator/forest-plot-odds-ratio-example.webp)
Six demonstration trials on 30-day hospital readmission plotted on a logarithmic axis around 1. Pooled REML OR is 0.72 [0.63, 0.83] with Q = 3.37 (p = 0.643) and I² = 0.0%.
![Hazard ratio forest plot of seven survival trials using Okabe-Ito blue squares and orange pooled diamond at HR 0.73 [0.65, 0.82]](/images/examples/forest-plot-generator/forest-plot-hazard-ratio-survival.webp)
Seven time-to-event trials comparing combination therapy against monotherapy on a log scale (pooled HR 0.73 [0.65, 0.82], z = -5.45, p < 0.0001), using the colorblind-safe Okabe-Ito palette.

Eight trials split into High dose (OR 0.58 [0.48, 0.69]) and Low dose (OR 0.86 [0.73, 1.01]), showing separate subtotal diamonds and a significant test for subgroup differences (Q = 10.58, df = 1, p = 0.001).
![Risk ratio forest plot calculated from 2x2 binary event counts showing arm totals, 0.5 zero-cell footnote, and pooled DL RR 0.60 [0.45, 0.78]](/images/examples/forest-plot-generator/forest-plot-2x2-binary-risk-ratio.webp)
Computed straight from raw events and arm totals. Study Gomez 2020 has 0/42 events in treatment, triggering a flagged 0.5 continuity correction and a left truncation arrow where the wide CI extends past the axis.
![Mean difference forest plot of systolic blood pressure change on a linear axis around 0 with pooled diamond at -4.63 [-5.50, -3.75]](/images/examples/forest-plot-generator/forest-plot-mean-difference.webp)
Five blood-pressure trials entered as arm-level sample sizes, means, and standard deviations. Plotted on a linear axis with the line of no effect at 0 (pooled MD −4.63 mmHg [−5.50, −3.75]).

Eight Hedges' g studies with substantial heterogeneity (I² = 73.1%, τ² = 0.0783). While the pooled 95% CI is [−0.78, −0.33], the 95% prediction interval spans [−1.30, 0.18], showing future settings could cross zero.
A forest plot (also called a confidence interval plot or blobbogram, popularized in clinical reviews by Lewis & Clarke, 2001) is the primary graphic used to display the results of a meta-analysis alongside every included study on a single aligned axis. Each study appears on its own row with a square marking its point estimate—sized so the square's area is proportional to the study's meta-analysis weight—and a horizontal line spanning its 95% confidence interval (CI). At the bottom, a diamond represents the pooled summary estimate, with its horizontal tips marking the pooled 95% CI.
A vertical line of no effect anchors the reading: it sits at 1 for ratio measures (odds ratio, risk ratio, hazard ratio) plotted on a logarithmic scale, and at 0 for difference measures (mean difference, standardized mean difference, or risk difference) plotted on a linear scale. Following Cochrane Handbook Chapter 10 and PRISMA 2020 items 12, 13d, 19, and 20b, a publication-ready forest plot pairs these markers with study-level numbers, percentage weights, named direction labels (Favours …), the pooling model and τ² estimator, and heterogeneity statistics (Q, I², and τ²).
To build an accurate forest plot for a systematic review, you transform ratio measures onto the natural log scale, weight each study by the inverse of its variance, estimate between-study heterogeneity, and plot every row against the null line. Here are the five steps worked out on the six-trial odds ratio dataset loaded in the tool.
Match the measure to your outcome type (forest plots are meant for two or more independent studies—Cochrane discourages plotting a single study as a forest plot). Use Odds Ratio (OR) or Risk Ratio (RR) for binary outcomes, Hazard Ratio (HR) for time-to-event data, Mean Difference (MD) when every study uses the same unit (such as mmHg), and Standardized Mean Difference (Hedges' g) when studies measure the same construct on different scales (binary Risk Difference, RD, also sits on a linear scale around 0). Ratio measures use a logarithmic axis with a null line at 1; difference measures use a linear axis with a null line at 0.
Gather either each trial's reported effect estimate with its 95% confidence interval (Study, OR, Lower, Upper), or raw arm-level counts (Events_T, Total_T, Events_C, Total_C) / continuous summaries (N, Mean, SD per arm). Keep the event definition identical across all studies so the left/right direction stays consistent—especially for Risk Ratios, where coding an event versus its complement changes the pooled estimate.
Per Cochrane Handbook Chapter 6, odds ratios, risk ratios, and hazard ratios are pooled on the natural log scale: y_i = ln(OR) and SE = (ln(Upper) − ln(Lower)) / 3.92. Under inverse-variance weighting, each study's variance is v_i = SE² and fixed-effect weight is w_i = 1 / v_i:
| Study | OR [95% CI] | ln(OR) | SE[ln(OR)] | Weight |
|---|---|---|---|---|
| Alvarez 2019 | 0.72 [0.51, 1.02] | -0.329 | 0.177 | 15.7% |
| Chen 2020 | 0.64 [0.45, 0.91] | -0.446 | 0.180 | 15.2% |
| Kowalski 2021 | 0.88 [0.62, 1.25] | -0.128 | 0.179 | 15.3% |
| Okafor 2021 | 0.55 [0.34, 0.89] | -0.598 | 0.245 | 8.1% |
| Patel 2022 | 0.78 [0.60, 1.01] | -0.248 | 0.133 | 27.8% |
| Lindholm 2024 | 0.68 [0.49, 0.94] | -0.386 | 0.166 | 17.8% |
| Pooled (DL) | 0.72 [0.63, 0.83] | -0.325 | 0.070 | I² = 0.0%, p < 0.0001 |
Compute Cochran's Q (df = k − 1), I², and between-study variance τ² using either REML (default in R metafor and available in RevMan) or DerSimonian–Laird (DL). Under a random-effects model, each study's weight becomes w_i* = 1 / (v_i + τ²), giving smaller studies relatively more weight when heterogeneity is present. In the worked example above, Q = 3.37 (p = 0.643, I² = 0.0%, τ² = 0), so fixed-effect and random-effects pooling agree at OR = 0.72 [0.63, 0.83].
Scale each square's area to its percentage weight, label the logarithmic ticks in original anti-logged numbers (e.g., 0.4, 0.5, 1, 1.25), replace generic axis labels with the actual named intervention and comparator (e.g., Favours intervention vs Favours usual care), and export an editable SVG or 300 DPI PNG for your manuscript.

Three steps in your browser
Every calculation—from 2×2 counts and Hedges' g to REML τ² and 95% prediction intervals—runs locally as you type.
Choose Effect + CI (OR, RR, HR, MD, SMD, or Effect + SE), 2×2 Counts, or Mean & SD, and paste rows straight from Excel or Google Sheets. Add a Subgroup column to generate subtotal diamonds and Q_between automatically. Have numbers inside a Results paragraph? Use Describe with AI (2 credits).
Switch between Random-effects (REML), Random-effects (DerSimonian–Laird), Fixed-effect (Inverse-Variance), or No pooling. Sort studies by order, effect size, or weight; toggle the 95% prediction interval; name your Favours left/right labels; and choose Cochrane, Okabe-Ito, Paul Tol, or Journal B&W.
Download an editable SVG (real <text> elements for Illustrator, Inkscape, or PowerPoint) or a 300 DPI PNG meeting journal raster thresholds, copy the pooled summary table into Word, and open Show steps to audit every intermediate weight and heterogeneity figure.
Read a forest plot in five quick checks before citing its conclusion:
z and p values).p value does not prove homogeneity. I² reports the percentage of variability due to heterogeneity rather than chance. The Cochrane Handbook rough guide notes overlapping bands: 0–40% might not be important, 30–60% may represent moderate heterogeneity, 50–90% substantial, and 75–100% considerable. τ² estimates the actual between-study variance on the analysis scale.θ ± t_{k−2} · √(τ² + SE²) formula for k ≥ 3, matching R meta; Cochrane Handbook Chapter 10 illustrates an approximate t_{k−1} variant) shows the range of true effects expected in a new, similar study. Cochrane encourages reporting prediction intervals when at least ~5 studies are pooled without clear funnel asymmetry.Subgroup column is included, inspect the footer's Test for subgroup differences (Q, df, p) rather than judging significance solely by whether two subtotal diamonds visually overlap.Choose the statistical model based on clinical and methodological assumptions before looking at the p-value:
| Model | Core assumption | Weight formula | Best used when |
|---|---|---|---|
| Fixed-effect (IV) | All studies estimate one single true effect; differences are sampling error | w_i = 1 / v_i | Nearly identical protocols, populations, and interventions (or a common-effect sensitivity check) |
| Random-effects (REML) | True effects vary across studies around a mean; τ² estimated by restricted maximum likelihood | w_i* = 1 / (v_i + τ²_REML) | Default in R metafor::rma.uni and recommended in Cochrane's updated guidance for most clinical meta-analyses |
| Random-effects (DL) | Same random-effects model; τ² estimated via DerSimonian–Laird method of moments | w_i* = 1 / (v_i + τ²_DL) | Reproducing legacy RevMan 5 analyses or textbook worked examples (note: Cochrane cautions DL can underestimate uncertainty when k is small) |
| No pooling | Displays individual study estimates without a summary diamond | Equal square size | Studies are too clinically heterogeneous to combine into a single pooled number |
When I² = 0% and τ² = 0, all three pooling models yield the exact same pooled estimate and study weights.
Paste tab-separated cells directly from Excel or Google Sheets, or comma/semicolon-separated CSV. Wrap study names that contain commas in double quotes (for example, "Smith et al., 2021").
| Input tab | Columns | Notes |
|---|---|---|
| Effect + CI | Study, Effect, Lower, Upper [, Subgroup] or Study, Effect, SE [, Subgroup] | Ratio measures (OR, RR, HR) must have strictly positive values; SE for ratios must be on the natural-log scale (SE[ln(OR)]). |
| 2×2 Counts | Study, Events_T, Total_T, Events_C, Total_C [, Subgroup] | Computes OR or RR with Woolf variance. Single zero-event cells receive a 0.5 continuity correction (flagged with * and a footnote; Cochrane notes this can bias sparse-event estimates). Studies with 0 events in both arms (double-zero) are marked Not estimable and excluded from relative pooling per Cochrane guidance. |
| Mean & SD | Study, N1, Mean1, SD1, N2, Mean2, SD2 [, Subgroup] | Computes raw Mean Difference (MD) or small-sample bias-corrected Hedges' g (SMD) using Cochrane RevMan's variance formula. |
Need to pull numeric data out of a published figure before pooling? Extract coordinates first with the plot digitizer. Building the companion flow diagram for your review? Pair this page with our PRISMA 2020 flow diagram generator and CONSORT flow diagram generator.
Researchers often ask how this browser tool compares to standard review software, when to use a different chart, and how to report the method under PRISMA 2020:
metafor / meta), JASP, jamovi & Stata. Essential when you need Hartung–Knapp–Sidik–Jonkman (HKSJ) CIs, leave-one-out sensitivity diagnostics, multilevel meta-regression, or network meta-analysis. Our REML and DL inverse-variance outputs align with metafor::rma.uni(yi, vi, method = "REML") and method = "DL".Built for systematic reviews and journal manuscripts
All statistical pooling and SVG drawing run by deterministic code in your browser—never drawn by an image model—so every confidence interval, diamond tip, weight, and p-value matches your data.
ModelsInverse-variance pooling with full audit steps
Switch between Random-effects (REML), DerSimonian–Laird (DL), Fixed-effect (IV), or unpooled display in one click, and inspect every log transform, variance, Q, I², and τ² in Show steps.
SubgroupsAutomatic stratified analysis
Add a Subgroup column to group trials under bold headings, draw subtotal diamonds for each stratum, and compute the formal test for subgroup differences (Q, df, p).
BinaryAutomatic 0.5 zero-cell & double-zero handling
Paste raw event counts and arm totals to calculate Odds Ratios or Risk Ratios directly, with Cochrane-standard 0.5 continuity correction for single-zero cells and clear double-zero disclosure.
ContinuousLinear axis anchored at zero
Enter arm sample sizes, means, and standard deviations to pool raw Mean Differences or bias-corrected Standardized Mean Differences (Hedges' g) on a clean linear axis.
HeterogeneityShow expected effect range in future studies
Overlay a 95% prediction interval bar beneath the random-effects diamond (k ≥ 3) alongside Q, I², and τ² so readers see how wide true effects may vary across settings.
ExportVector text ready for Illustrator or Word
Export clean SVG vector graphics with real editable text or 300 DPI PNG figures—including a classic Journal B&W theme—meeting NEJM and major journal resolution guidelines.
FAQ
Paste your study estimates or 2×2 counts, audit REML or DL statistics, and download an editable SVG or 300 DPI PNG—free in your browser.
Explore more AI diagram tools across subjects — from the same discipline and beyond.
NewTurn your screening counts into a PRISMA 2020 flow diagram — three phases, exclusion boxes, and PNG 300 DPI or SVG export for systematic reviews and meta-analyses.
NewPaste your trial's participant flow and get a CONSORT 2025 flow diagram, counts typeset by code from your text: two to five arms, reasons listed, PNG 300 DPI or SVG.
NewUpload a chart image, paste a screenshot or box a figure in a PDF, and AI reads the axes and every series into a table. Check it against a re-plot, fix any cell, then export CSV or Excel or redraw the data as a clean figure.
NewPaste your data and get a violin plot in your browser — grouped or single, box or quartiles inside, adjustable bandwidth, editable SVG and 300 DPI PNG. Free to paste and download; or describe your data and let AI fill it in.
NewPaste your data or a five-number summary and get a box and whisker plot with quartiles, outliers and labels. Choose the TI-84, Excel or R quartile method; export editable SVG or 300 DPI PNG. Free to paste and download.
NewPaste two columns from Excel or a CSV and get a scatter plot with the line of best fit, its equation, r and R². Groups, point labels and step-by-step working; export editable SVG or 300 DPI PNG. Free to paste and download.