Free tool
Lighthouse required-runs calculator
“We ran it five times and the score went up two points” isn't evidence — Lighthouse is noisy enough that a small before/after change can be pure run-to-run variance. This tool measures your page's real variance for you (a short PageSpeed Insights pilot, per metric), tells you how many runs a claim actually needs, hands you the scripts that run it — and when you've run it, drop your before/after Lighthouse JSONs below for the statistical verdict.
Where to start
- I haven't run it yet Plan the experiment Measure this page's real run-to-run noise, then get the number of runs a claim of a given size actually needs.
- I already have the runs Judge what I measured Drop the before/after Lighthouse JSONs. Comparability checks first, then a per-metric verdict with intervals.
- I want to understand it Why five runs isn't proof The arithmetic behind the run count, the published variance data it rests on, and where aggregating by median costs you.
Plan the experiment
- Historical example a published page, not yours — this answer stands here
- Measured on your URL a PSI pilot here, or a σ you measured yourself — not reached yet
- From your own runs the spread in the reports you uploaded — not reached yet
n = ⌈π/2 · 2·(z₁₋α/₂+z_power)²·σ²/δ²⌉ — the π/2 because the verdict compares medians
- Metric
- Performance score
- Run-to-run σ
- 2.7 preset · Heričko-derived
- Change to detect (δ)
- 3 points
- Comparison
- independent runs
- α / power
- 0.05 / 0.8
- Estimator
- median — what the verdict compares by mean: 13 runs
- Run-to-run spread
- 3.64 points normal-theory from σ
That σ is an assumption, not your page. σ enters the formula squared, so the run count moves fast when it is wrong — with a short PageSpeed pilot.
Quick check — a number, no files
Enter the change you measured and how many runs produced it, and this judges it against the σ above. Got the actual Lighthouse JSONs? Upload them instead — that reads your real spread per metric rather than assuming this one, and checks the runs are comparable first.
| Runs n | 95% CI half-width | Min. detectable Δ | Enough for your target? |
|---|---|---|---|
| 3 | ±5.42 | 7.74 | No |
| 5 | ±4.19 | 6 | No |
| 7 | ±3.55 | 5.07 | No |
| 10 | ±2.97 | 4.24 | No |
| 15 | ±2.42 | 3.46 | No |
| 20 | ±2.1 | 3 | Yes |
| 30 | ±1.71 | 2.45 | Yes |
| 50 | ±1.33 | 1.9 | Yes |
| 75 | ±1.08 | 1.55 | Yes |
| 100 | ±0.94 | 1.34 | Yes |
Your experiment kit
The protocol is a checklist your team can follow — run order, freeze list, decision rule.
The files below are the experiment: the runners read plan.json, so the
run count, device profile and Lighthouse version are never retyped, and their output drops
straight back into the verdict box below.
Your target is smaller than the gap between two runs of the same page, which the kit records
(targetBelowRunSpread in plan.json). That is not a reason not to run it — it is the
reason the plan asks for 20 runs a side rather than five.
- Download
plan.jsonthe plan itself — every runner reads this, so the numbers exist once - Download
run-lighthouse.mjsNode runner: npm install lighthouse, then one command per arm - Download
run-lighthouse.shthe same experiment through the CLI, no repo dependency - Download
lighthouserc.jsonfor a repository already running Lighthouse CI
No Lighthouse version is pinned, because this tool has not seen one for this plan —
plan.json carries a placeholder for you to fill in. Run the pilot, or upload
reports, and the version travels with the plan. A σ measured on one version does not price
an experiment run on another.
3 · Ran the experiment? Upload the runs — get the verdict.
Drop your before and after Lighthouse JSON files (raw Lighthouse reports or PageSpeed Insights API exports, any number per side). The verdict comes from your runs' own measured spread — median difference, a deterministic bootstrap confidence interval, and a noise floor — per metric. Your files are parsed in memory for this session only — never written to disk, never stored, and gone when you leave the page.
Raw Lighthouse reports or PageSpeed Insights API exports, as .json — up to
500 files and 400 MB per side.
Load at least one file on each side and the per-metric verdict appears here — including the consistency checks (mixed Lighthouse versions, mixed device profiles, mixed throttling) that silently invalidate most spreadsheet comparisons.
Why “just run it five times” isn't proof
Running Lighthouse five times and taking the median is excellent advice — for getting a stable single estimate of where a page sits today. It is not the same as having enough statistical power to prove a small before/after change is real. Those are different jobs, and the second one is governed by the spread of the runs:
n ≥ 2 · (z₁₋α/₂ + z_power)² · σ² ⁄ δ² (independent, equal n)
at α = 0.05 and 80% power: n ≈ 15.7 · σ² ⁄ δ²
this formula is for the difference of two MEANS. Aggregating by the median
instead costs precision (≈π/2 the variance under normality), so budget ~1.5×
the runs — the calculator above already does, and the upload verdict tests the
medians directly.
The dependence on σ²/δ² is what bites. Halving the change you want to detect
quadruples the runs you need. On a moderately noisy page — σ ≈ 2.7 points, the middle
of the published range the presets above are derived from — proving a 3-point change needs about
13 runs per condition by the mean, and 20 by the median, which is what the calculator above sizes
for and the verdict below tests; a 2-point change needs 29 (45 by median). Five runs on that page
reach 80% power only around a five-point change by the mean — nearer six by the median, which is
the aggregation the advice actually names — and on the noisiest sites in that study (σ ≈ 4.3) it
takes 33 runs to prove 3 points (51 by median). Fine for a big regression, useless for the
single-digit gains most optimisation work
produces. Note what that number is: the effect size this design would usually catch, not a
floor below which a measured difference cannot be significant. The threshold a measured difference
must clear is smaller (√(π/2) · z₁₋α/₂ · σ · √(2/n) for the median comparison the verdict
makes), which is exactly why the upload verdict
tests your actual runs instead of comparing them to a planning number.
What the pilot measures — and what it can't. The “measure it for me” pilot runs your page through PageSpeed Insights repeatedly and takes the per-metric standard deviation. That σ includes Google's runner mix (we report the CPU-benchmark spread when it's material), so it's the honest σ for PSI-based before/afters; a pinned local or CI setup is usually tighter, so measure there if that's where your experiment will run. A small pilot's σ̂ is itself uncertain — we show its 90% band and the conservative run count from the upper bound rather than hiding it. And note the pilot yields the run-level σ: a paired design needs the SD of paired differences from your own harness. Lab CLS is often deterministic; when the pilot measures σ = 0, any before/after CLS difference is directly interpretable and there is no sample-size question to answer.
How the upload verdict decides. The before/after comparison never trusts a single number: it takes the median of each side, builds a deterministic bootstrap confidence interval on the median difference from your runs' own spread, and sets a noise floor from the within-arm variation. A change is called real only when the interval excludes zero and the change clears the floor — and an apparent regression larger than the page's own baseline is treated as instability, not as a confident result. It also checks what spreadsheets silently miss: mixed Lighthouse versions, mixed device profiles, mixed throttling, and multiple URLs in one comparison.
The full method, the secondary evidence, and the registered protocol behind this calculator are in the study “How many Lighthouse runs prove a change?”
Free 5-day email course
Read your PageSpeed report like an auditor
The statistics behind this calculator are day 5 of the course — the other four days teach the rest of the method, every number from our published worked example:
- Day 1The 81% problem — 21 representative flags from real adjudications, and why only 4 deserved effort.
- Day 2The four verdicts — Real, Wrong, Trivial, Locked — and the test each flag must pass.
- Day 3Falsifying a flag — three places the disproof hides, starting with the tool's own numbers.
- Day 4Hearing the silence — the five-minute field-vs-lab drill that outranks every flag.
- Day 5Predict, prove, confirm — this calculator's math and the 28-day rule that make a fix provable.
The course lives in email only — it isn't published anywhere on the site.