Experiment decision card builder
Enter an experiment plan and get a one-page card that says what you will do for a win, a loss or an inconclusive result, written before the test runs.
Neil Baksi Last updated
Who this is for
Anyone about to run an A/B test on a rate, such as sign-up or click-through, who wants the decision settled before the data arrives.
The question
If we agree what we will do for each outcome first, how long does the test need to run, and is it worth running at all?
The calls I made
Two variants only: a control and one change. (My view) One primary metric that is a rate. Guardrails are recorded on the card but not sized. (My view) A test that needs more than 8 weeks is flagged as too slow. You can change the limit. The tool contains no code that sends data (checked by a source scan; not tested in every browser) (T03).
What this is and is not
Is
- A planning sheet that fixes your decisions before the test.
- A sample-size and run-length calculator for one rate and two variants.
- A card you can print or copy as plain text.
Is not
- A tool that reads results. It does not analyse data.
- A guarantee that a test is valid. It assumes one look, at the end.
- Advice on which metric or change to test.
- Storage. The draft stays in this browser. You can clear it.
Builder
Fill in the fields, or load the worked example. The card and the sample size update as you type. Fields marked (required) must be filled for the card to appear.
How the numbers work
- The tool asks how many visitors each variant needs so that, if the true change is the size you entered, the test would usually detect it. A simplified version of the formula uses a factor of 2.8, which is the sum of the z-value for 5% significance and the z-value for 80% power (C01). I cite that blog for the 2.8 factor only, not as the source of the formula below. Public calculators differ in their inputs. The one I read asks for a baseline rate, a minimum detectable effect, power and a significance level, and its defaults are 80% power and 5% significance (C03).
- The formula this tool uses is: n per variant = (z_conf × sqrt(2·p̄·(1−p̄)) + z_power × sqrt(p1(1−p1) + p2(1−p2)))² ÷ (p2 − p1)², where p̄ is the average of p1 and p2, and the result is rounded up (T01). The source for this form is NIST Technical Note 2106, section 2.1.3.1, equation 2.5, which includes the pooled term (PN-02). NIST writes a minus sign before the power term; that matches the plus sign here if NIST's z-value is the lower-tail one. Inferred NIST does not say so. My view The tool rounds up to whole visitors, so a few results can be one higher than a table that rounds to the nearest whole number.
- Run length in weeks is total visitors divided by weekly traffic, rounded up (T02).
- The z-values are fixed constants: 1.959964 (95% confidence, two-sided), 1.644854 (90%, two-sided), 2.575829 (99%, two-sided), 0.841621 (80% power) and 1.281552 (90% power). They match the Python standard library to six decimals (C08). The 95% value rounds to the familiar 1.96 (C06).
- Checked against five worked cases: 3841, 42693, 199, 5142 and 31234 visitors per variant, calculated by hand and matched by a script (C09). The same five cases are unit tests in the tool's code, and they passed when I ran them on 22 November 2026 (T05).
- When the baseline rate is small, the number of conversions, not visitors, becomes the limit (C02, small-rate approximation). The tool shows the expected conversions per variant as a calculated line, not a forecast.
- Guardrail metrics should be included in the sample size calculation (C04). My view: the largest required sample should govern the test. This tool sizes only the primary metric.
- Weekly cycle: the tool suggests running at least one full week. My view (D02). GrowthBook's best-practice docs give typical test durations of one to two weeks and note that a test started on a Friday and ended on a Monday may miss weekday traffic (D02-support). The 8-week limit is my view too, a design choice rather than a statistical result (D01), and you can change it.
- Privacy: a test that scans the tool's source finds no code that sends data anywhere (T03, partial: I did not watch the browser's network panel). The draft is kept in your browser's local storage, with a Clear draft button (T04, partial: tested with stand-in storage and in one browser run, not in every browser). In one Chromium print-media run (A4, 2026-11-26) the card printed on one page.
Why agree decisions first
My view A decision written before the data arrives is harder to bend afterwards. If you have to argue about what a flat result means once the test has finished, you have already lost some of the value of running it.
My view A stop rule written in advance, for example on a guardrail breach, takes the stop decision out of the heat of the moment.
My view The card is short on purpose. If you cannot fill in a line, the plan is not ready.
Not known Whether this practice improves outcomes for a team. I have no evidence on that.
Limits of this tool
- Two variants only. More variants need a different calculation, and this tool does not adjust for extra comparisons. (My view)
- One look, at the end. This sample size assumes you do not stop early on a good-looking result. In one worked example by Evan Miller (2010), a test checked after every observation and stopped at the first 5% result gave a false positive 26.1% of the time (PN-PEEK). That is one setup, not a general rate. Not known How much early stopping would change the error rate for your check pattern.
- A short test may show a change that fades as novelty wears off. GrowthBook's docs describe this and say running the test longer is one way to handle it (PN-NOVELTY). Not known How long novelty lasts: the docs give no duration, and I have none for your product.
- Guardrail metrics need sizing too (C04). This tool sizes only the primary metric.
- Weekly traffic is treated as steady. Real traffic varies. Inferred from the formula's inputs.
Sources are summarised in my words. Illustrative numbers in the worked example are not from any source.
Sources
- [C01] A blog on A/B sample sizes says the factor 2.8 in its simplified two-proportion formula comes from critical z values for alpha 0.05 and power 0.8 (1.959964 + 0.841621 = 2.801585). varunprajan.github.io (accessed 26 November 2026)
- [C02] The blog gives a small-rate approximation (pC and pT small) for the two-proportion sample size. varunprajan.github.io (accessed 20 November 2026)
- [C03] Evan Miller's sample size calculator has inputs for baseline conversion rate, minimum detectable effect, statistical power (1-beta) and significance level (alpha); its page script defaults to 80% power and 5% significance. www.evanmiller.org (accessed 26 November 2026)
- [C04] Guardrail metrics should be included in the sample size calculation. varunprajan.github.io (accessed 20 November 2026)
- [C05] Standard normal table row 1.6 gives 0.94950 at +0.04 and 0.95053 at +0.05. en.wikipedia.org (accessed 20 November 2026)
- [C06] The Wikipedia sample size article uses 1.96 as the z value for a 95% confidence interval. en.wikipedia.org (accessed 20 November 2026)
- [C08] Standard normal constants 1.959964, 0.841621, 1.281552, 1.644854, 2.575829 match Python statistics.NormalDist().inv_cdf at six decimals (97.5%, 80%, 90%, 95%, 99.5% points). repo: computed in this job with python3 -I statistics.NormalDist (accessed 26 November 2026)
- [C09] Five reference cases re-derived with exact z constants give n per variant 3841, 42693, 199, 5142, 31234 (ceiling). repo: computed in this job with python3 -I (accessed 26 November 2026)
- [PN-02] NIST Technical Note 2106 gives the sample size per group for testing equality of two proportions (eq. 2.5): n' = (z_(1-alpha/2) sqrt(2 Pbar(1-Pbar)) - z_beta sqrt(P1(1-P1)+P2(1-P2)))^2 / (P2-P1)^2, Pbar = (P1+P2)/2, equal group sizes. NIST writes minus z_beta, which equals the page's plus z_power when z_beta is the lower-tail quantile of beta (Inferred). nvlpubs.nist.gov (accessed 26 November 2026)
- [D01] The tool flags a test as too slow when run length is greater than 8 weeks. This is a design choice, not a statistical result. product-lab/_plan/research/calculator.md:72-80 (accessed 20 November 2026)
- [D02] The tool suggests running for at least one full weekly cycle. This is a design choice, not sourced. product-lab/_plan/research/calculator.md:88 (accessed 20 November 2026)
- [D02-support] GrowthBook best-practice docs say a test started Friday and ended Monday may not give a complete picture of weekday traffic, and typical durations are 1 to 2 weeks. docs.growthbook.io (accessed 26 November 2026)
- [PN-PEEK] In one worked example by Evan Miller (2010): conversion rate 50%, a significance test run after every observation, stopping at the first 5% result or after 150 observations; with a logo that does nothing, the experiment wrongly finds significance 26.1% of the time. He calls this worst-case. www.evanmiller.org (accessed 26 November 2026)
- [PN-NOVELTY] GrowthBook's docs say novelty effects make a new design look better at first and one mitigation is running tests longer so novelty wears off. docs.growthbook.io (accessed 26 November 2026)
- [T01] The tool computes visitors per variant with the pooled-variance two-proportion formula (two variants, equal split), rounded up; the five reference cases display correctly in the built page. product-lab/src/islands/experiment-decision-card/sampleSize.ts:17-24; browser run 2026-11-26 on localhost:5921 (Chromium via Playwright) (accessed 26 November 2026)
- [T02] Run length is ceil(total sample / weekly visitors) weeks, total = 2n; displayed in the built page. product-lab/src/islands/experiment-decision-card/sampleSize.ts:25-28; browser run 2026-11-26 (accessed 26 November 2026)
- [T03] No network request left localhost during a full interaction (type, calculate, copy, print, reload) on the preview build, and the island source has no fetch, XMLHttpRequest, sendBeacon or WebSocket. product-lab/src/islands/experiment-decision-card/card.test.ts:122-132; Playwright request log 2026-11-26 (accessed 26 November 2026)
- [T04]partial The draft is saved in localStorage under one key, restores after reload, is removed by Clear draft, and the tool keeps working with a visible note when storage throws. product-lab/src/islands/experiment-decision-card/draftStore.ts:4-29; browser run 2026-11-26 (accessed 26 November 2026)
- [T05] Unit tests check the five reference cases at exact-integer tolerance, and the built page shows the same five numbers. product-lab/src/islands/experiment-decision-card/sampleSize.test.ts:5-23; browser run 2026-11-26 (accessed 26 November 2026)