A/B test duration calculator.
Find out how long your A/B test needs to run: how many visitors it needs and how many days of traffic that takes.
The short answer
Divide the total visitors your test needs by the visitors who see it each day, and round up to the next whole day. Enter your conversion rate, the lift you want to detect and your visitors per day below, and the calculator does the sum. Then run it for full weeks, and never less than 7 days.
Fill in your conversion rate, the lift you want to detect and your visitors per day to see how long your test needs to run.
Smaller lifts take much longer to detect. The dot is your setting; hover or tap to compare.
See the numbers
| Lift | Per version | Duration |
|---|
See where your website loses revenue.
A/B testing best practices
How to plan an A/B test
Go through these before you set up a test, so the result is clear when it ends.
- 01
Write the hypothesis first
Name the change, the metric and why you expect it to move. If you can't fill in the sentence, wait before testing.
If we [change], then [metric] will [move], because [reason].
- 02
Check your traffic before you build
Use the calculator above. If the test needs more than two months, don't run it as planned. Traffic shifts and other changes muddy the result.
- 03
Short on traffic? Move up the funnel
Orders may be too rare to test, but clicks or add-to-carts are not. A metric with more volume reaches significance much sooner.
- 04
Change one thing
Change one element and judge the test on one primary metric. Change three at once and you won't know which one worked.
- 05
Run full weeks on normal days
Run for at least seven days and in whole weeks. Avoid sales and holidays, or the result won't hold the rest of the year.
- 06
Fix the end date and leave it alone
Split traffic 50/50 and don't edit the versions or the audience mid-test. Read the result only when the planned sample is in.
How long should an A/B test run?
Divide the visitors you need by the visitors who see the test each day, and round up to the next whole day. The visitors you need come from your conversion rate, the smallest lift worth detecting, 95% confidence and 80% power.1 A test shorter than 7 days misses the weekday and weekend pattern, and one longer than two months picks up seasons and site changes.
A worked example
A 4.0% conversion rate, a 15% lift to detect and 1,200 visitors a day need 17,943 visitors per version, 35,886 in total, so 30 days.
The same shop with 600 visitors a day needs 60 days. To shorten a test, raise the lift you want to detect or test a metric higher in the funnel, such as add-to-carts.
What the duration tells you
The calculator shows a warning at both ends of the range. Between them, run the test to its planned sample.
Discover your website’s 3 biggest gaps for free.
Questions about test duration
What is the difference between a one-sided and a two-sided test?
How long should an A/B test run?
How long should an e-commerce A/B test run?
How many visitors do I need for an A/B test?
What is the minimum detectable effect?
What are statistical power and confidence?
Sources
The other numbers are the calculator’s output or labelled examples. The 95% and 80% settings are common defaults.
- Evan Miller, How Not To Run an A/B Test (2010): decide the sample size in advance and wait until the test is over.