Skip to content

A/B test sample size & duration

How many users you need per variant, and how long that takes at your traffic.

Percent. What the control converts at today.
The smallest lift worth detecting.
A 10% relative lift on 5% means 5.5%.
Users entering the test per day, both variants.
Percent. Chance of detecting a real effect. 80 is conventional.
Percent. False-positive rate you accept. 5 is conventional.

Readout

--
-- users per variant
  1. day 0--
  2. ----
  3. detect--
  4. false +--
  5. nextTest finished? Read your result against this plan →

Inputs live in the URL. Send this link to a colleague.

What this assumes, and what it does not cover
  • Normal approximation to the binomial. Standard for this calculation and accurate at realistic sample sizes, but it degrades when the expected number of conversions per variant drops into single digits. The tool warns you when that happens.
  • Pooled variance under the null. The null standard error is computed at the average of the two rates. Evan Miller's calculator uses the baseline rate in both arms instead and returns about 6% fewer users. Both conventions are defensible, and the comparison is published.
  • No continuity correction. Adding one (the Fleiss convention) raises the requirement by roughly 4%.
  • An even 50/50 split and equal traffic to both variants for the whole run.
  • One primary metric, analysed once. Every extra metric you check is another chance at a false positive, and so is every extra look at the same metric.
  • Not covered: revenue and other continuous metrics, more than two variants, sequential or always-valid designs, and any correction for the fact that users are not always independent.

Cross-checked against statsmodels.stats.proportion.samplesize_proportions_2indep_onetail. See the published comparison.

Part of a small suite of experimentation calculators. Every result comes with the caveat that would invalidate it, and every formula is checked against a reference implementation.

Built by Igor Lima. MIT License.

Three of your ads read, free, when we launch.

Launch date to be announced.

Join the list