Free tool · A/B testing

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.

% How the control performs today, on the metric you will judge the test by.
%
Lift type
The smallest improvement worth acting on. 3% → 3.3% is a 10% relative lift.
Visitors who will see the test, all versions together.
Settings: 95% confidence · 80% power · two-sided
One-sided or two-sided
Checks if the variant is better or worse than the control. The safe default.
Estimated test duration Not yet
Total visitors required Not yet

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.

Duration by lift size

Smaller lifts take much longer to detect. The dot is your setting; hover or tap to compare.

See the numbers
LiftPer versionDuration

See where your website loses revenue.

Get a free Traffic Scan →

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.

  1. 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].
  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

Read the full A/B testing guide →

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.

Inputs give 17,943 visitors per version. Times two versions gives 35,886, divided by 1,200 a day gives 30 days.
How the calculator gets from your inputs to a number of days. The numbers come from the worked example below.

A worked example

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.

Bar chart: 35,886 visitors take 30 days at 1,200 visitors a day, and 60 days at 600 a day.
Example: the same 35,886 visitors at 1,200 visitors a day and at 600 a day.

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.

Decision tree: under 7 days, run at least 7 days; 7 days to two months, run to the planned sample; over two months, change the plan.
What to do with the number of days the calculator gives you.

Discover your website’s 3 biggest gaps for free.

Get a free Traffic Scan →

Questions about test duration

What is the difference between a one-sided and a two-sided test?
A two-sided test checks if the variant is better or worse than the control. A one-sided test only checks if it is better. One-sided needs about 20% fewer visitors, but it can't confirm that a change hurts, so two-sided is the safer default.
How long should an A/B test run?
Until it reaches the sample size you planned, and never less than one full week, so weekdays and weekends are both in the data. Enter your traffic above to get the number of days. If it comes out above two months, change the plan rather than waiting.
How long should an e-commerce A/B test run?
Between 1 and 8 weeks. A shop with 1,200 visitors a day and a 4.0% conversion rate needs about 30 days to detect a 15% lift. Below 7 days the weekday pattern is missing, and above two months the plan should change.
How many visitors do I need for an A/B test?
About 53,000 visitors per version to detect a change from 3% to 3.3%, and about 14,000 to detect 3% to 3.6% (examples at 95% confidence and 80% power). Low conversion rates and small lifts need far more visitors, so the answer depends on both.
What is the minimum detectable effect?
The smallest change in conversion rate your test can reliably pick up. Set it to the smallest lift that would be worth acting on for your business. Halving it roughly quadruples the visitors you need.
What are statistical power and confidence?
Confidence (usually 95%) limits false wins: the chance of calling a winner that isn't one. Power (usually 80%) limits missed wins: the chance of detecting a lift that is really there. The defaults suit most tests.

Sources

The other numbers are the calculator’s output or labelled examples. The 95% and 80% settings are common defaults.

  1. Evan Miller, How Not To Run an A/B Test (2010): decide the sample size in advance and wait until the test is over.