A/B test sample size and duration calculator
Find out how many visitors each variant needs, how many weeks the test will run, and the smallest lift your traffic can detect.
Test plan
Two-sided z-test—visitors per variant
- Total visitors
- —
- Days at your traffic
- —
- Run it for
- —
- Target rate
- —
Fill in your test to see the plan.
What your traffic can detect
| Run time | Visitors | Smallest lift | Target rate |
|---|
How to choose the inputs
- Baseline conversion rate. Use the last two to four weeks for the exact page and audience in the test, not your sitewide average.
- Minimum detectable effect. Pick the smallest lift that would change a decision. Smaller effects need far more traffic: halving the effect roughly quadruples the sample.
- Daily visitors and share in test. Count visitors who actually reach the tested experience. If only half your traffic is enrolled, set the share to 50%.
- Confidence and power. 95% confidence and 80% power are the common defaults. Raise power to 90% for tests you can't easily repeat.
Run whole weeks
Weekday and weekend visitors behave differently, so the plan rounds up to full weeks. Decide the run time before you launch and stop on that date. Checking every day and stopping at the first significant result inflates false positives.
The formula
Visitors per variant for a two-sided test of two proportions, where p₁ is the baseline and p₂ is the target rate:
With more than one challenger and the correction on, α is divided by the number of comparisons against control. Total visitors are n times the number of variants.
Different calculators use slightly different approximations, so expect small differences from other tools.
Bring this plan to your weekly check-in.
Loupe tracks each running test against its planned sample, so your roundtable knows what's ready to call and what needs more time.
Not sure what to test next?
A funnel and experimentation audit finds where people drop off, ranks the fixes by impact, and writes up your first experiments. From $2,000.