Plan a test
A/B test sample size calculator
Visitors each variant needs, and how many days that takes at your traffic.
A/B testing
How long to run an A/B test depends on one number you can work out before launch: the sample size each version needs. Divide it by your daily traffic, round up to whole weeks, and do not stop early. This guide shows the calculation, a worked example and what to do when your traffic is low.
An A/B test should run until each version has reached the sample size you calculated before launch, rounded up to whole weeks. For most websites that means at least one full week, usually two or more, and never less than one full business cycle. The right length comes from your traffic and the size of change you want to detect, not from the calendar.
There is no single correct number of days. A busy store testing a big change can finish in two weeks. A small lead generation site testing a subtle change might need months, which is a sign to change the test rather than wait. The sections below show how to work out your own answer.
To calculate A/B test duration, find the sample size each variant needs, multiply it by the number of variants, divide by the number of visitors who enter the test each day, and round up to whole weeks. The formula is: days = (sample size per variant x number of variants) / daily visitors in the test.
Take the current conversion rate of the exact page or step you will test, for the visitors who will enter the test, over recent whole weeks without unusual promotions. A lower baseline needs a bigger sample.
This is the minimum detectable effect: the smallest improvement that would change what you do. Halving it roughly quadruples the sample, so be honest about what matters to the business rather than hoping to catch tiny effects.
Most teams use 95% confidence and 80% power. Higher settings protect you better against false winners and missed winners, and they make the test longer.
Enter those numbers into the free A/B test sample size calculator. It returns the visitors each variant needs, and it shows its formula.
Multiply the sample per variant by the number of variants, including the control, then divide by the visitors who actually enter the test each day. Count only the traffic that sees the tested page, not your whole site.
Round the days up to full weeks so every day of the week is counted equally. Note the planned end date, the sample and the success metric before launch, and stick to them.
Say a product page converts at 3% and you want to detect a 20% relative lift, from 3% to 3.6%, at 95% confidence and 80% power, with one variant against the control. 2,000 visitors a day reach that page.
If the same page only got a quarter of that traffic, the test would need four times as long. That is why the duration question is really a traffic question.
Traffic and the size of the change you want to detect set the length of an A/B test more than anything else. The table below shows whole weeks for a page converting at 3%, with one variant against the control, 95% confidence and 80% power. Small lifts on low traffic quickly become impractical.
| Smallest lift to detect | Visitors per variant | 500 visitors a day | 2,000 visitors a day | 10,000 visitors a day |
|---|---|---|---|---|
| 10% (3% to 3.3%) | 53,211 | 31 weeks: change the plan | 8 weeks | 2 weeks |
| 20% (3% to 3.6%) | 13,914 | 8 weeks | 2 weeks | 1 week |
| 30% (3% to 3.9%) | 6,455 | 4 weeks | 1 week | 1 week |
Every figure in the table comes from the same formula as the sample size calculator, with a one-week minimum. Anything over 8 weeks is marked "change the plan": a test that long is exposed to cookie loss, seasonality and site changes, and it ties up the page.
Seven things decide how long an A/B test takes: your baseline conversion rate, the smallest lift you want to detect, the traffic that enters the test, the number of variants, your confidence and power settings, whether the test is one-sided or two-sided, and how long your customers take to decide. The first three matter most.
| Factor | Longer test when | Shorter test when |
|---|---|---|
| Baseline conversion rate | The page converts rarely | The page converts often |
| Smallest lift to detect | You want to catch small lifts | You only care about large lifts |
| Traffic into the test | Few visitors reach the tested page | The page is one of your busiest |
| Number of variants | Several variants share the traffic | One variant against the control |
| Confidence and power | Set higher, such as 99% and 90% | Set to the usual 95% and 80% |
| One-sided or two-sided | Two-sided, which also checks for harm | One-sided, planned before launch |
| Buying cycle | Customers take weeks to decide | Customers decide in one visit |
The minimum time to run an A/B test is one full week, even when the planned sample arrives sooner. Visitors on a Monday morning and a Saturday night are often different people with different intent, so a test that only saw two weekdays has only measured those two weekdays. Two full weeks is a safer floor for most sites.
If your customers usually take a week or two to decide, or your sales follow paydays, monthly billing or a weekly email, run long enough to include at least one full cycle. Otherwise the test measures the people who decide fastest, who may not behave like everyone else.
A change can win early simply because returning visitors notice something new, then fade as the novelty wears off. A test that runs for whole weeks gives that early bump time to settle, which is one more reason not to call a result in the first few days.
Sales, holidays, a big email campaign or a press mention can bring visitors who behave differently from your normal traffic. If the test overlaps one, either extend it so normal weeks dominate or note the overlap when you read the result.
Great results. easy to work with, and do proper split-testing. Even noticed when I accidentally made a change to a page they were testing, and they stopped the test and started again to make sure I didn't distort results. The most important thing to know: they had a positive result on revenue.
Stopping an A/B test early, the moment one version looks like a winner, is one of the most common ways to get a false result. Results swing widely in the first days of a test. If you check repeatedly and stop the first time the numbers cross your significance threshold, the chance that your "winner" is only noise rises well above the level you set.
This is often called peeking. Researchers Ramesh Johari, Leo Pekelis and David Walsh describe it in Always Valid Inference: Bringing Sequential Analysis to A/B Testing (2015): standard p-values are only reliable when the sample size is fixed in advance, not when the people running the test decide when to stop by watching the results. A peer-reviewed version, with Pete Koomen as a coauthor, was published in Operations Research in 2022 (doi.org/10.1287/opre.2021.2135). The p-value calculator page sets out what a p-value does and does not tell you about a test, peeking included.
Yes, an A/B test can run too long. Over many weeks visitors clear cookies, switch devices and may see both versions, which blurs the difference you are measuring. Seasonality, new campaigns and other site changes creep in, and every extra week delays rolling out a winner or moving on from a loser.
Set a ceiling before launch. If the calculation says the test needs many months, do not start it and hope: change the plan using the options below. A test that cannot finish in a reasonable time is not a test worth running in that form.
When the numbers say an A/B test would take too long, change what you test rather than cutting the test short. Bigger changes, busier pages, a goal closer to the change and fewer variants all shorten the test. Some problems do not need a test at all.
Not sure which problems on your site are obvious fixes and which need a test? That is where Convertica's free CRO audit can help: it checks your page for people and for AI agents and gives you every finding, with how to fix each one.
Convertica's published case studies show how test length follows traffic and the size of the change. Each test below ran until it had enough data, and none was stopped on the first good day.
| Case study | What was tested | How long it ran | Stated result |
|---|---|---|---|
| dScryb | Calls to action and access levels in membership search results, desktop and mobile | 17 days, 20,000 visitors, 98% confidence | +49.4% paid membership sign-ups |
| JustThrive | Product page trust signals and auto-ship offer, then a second variation against the winner | Test 1: 7 December to 15 January. Test 2: 15 February to 24 March | +101.82% revenue, cumulative across both tests |
| Empire Flippers | A rebuilt valuation tool submission process, split-URL tested | First test: two weeks. Result after rollout: 47 days | +51.6% conversions (valuation tool submissions) in 47 days |
Before you stop an A/B test and act on the result, check each line below. If any answer is no, keep the test running or fix the problem and restart it.
Plan the length of your next A/B test before you launch it, and read the result properly when it ends. Each calculator shows its formula and a worked example.
Plan a test
Visitors each variant needs, and how many days that takes at your traffic.
Check a result
Whether a finished A/B test result is bigger than chance.
Measure
Your baseline conversion rate from visitors and conversions.
An A/B test should run until each version has reached the sample size you calculated before launch, rounded up to whole weeks. For most websites that means at least one full week, usually two or more, and never less than one full business cycle. To get the days, divide the total sample by the daily visitors who enter the test.
Run an A/B test until each variant reaches the sample size you calculated before launch, then round up to whole weeks. In practice that means at least one full week, ideally two, and long enough to cover a full business cycle. Never stop early just because one version is ahead.
To work out how long to run an A/B test, calculate the sample size each variant needs from your baseline conversion rate, the smallest lift you care about, your confidence level and your power. Multiply by the number of variants, divide by the visitors who enter the test each day, and round up to whole weeks.
The minimum is one full week, even if the planned sample arrives sooner, because people behave differently on different days of the week. Two full weeks is a safer floor for most sites, and longer if customers usually take more than a week to decide.
Yes. Over many weeks, visitors clear cookies or switch devices and can see both versions, seasonality and marketing changes creep in, and you delay rolling out a winner. If the plan says the test needs months, change the plan: test a bigger change, a busier page or a nearer goal.
No, not with a standard fixed-sample test. Checking results repeatedly and stopping the first time the result looks significant makes false winners much more likely. Wait for the planned sample, or use a testing method built for early stopping, such as a sequential test, and set its rules before launch.
Test bigger changes, test on your busiest pages, measure a step closer to the change, such as clicks to checkout, and limit the test to two variants. If that is still too slow, fix clear problems without a test and use research such as session recordings and visitor polls to guide the changes.
Email A/B tests work differently from website tests: each recipient gets one send, so the test lasts until most opens and clicks have come in, often hours rather than weeks. The rules on sample size still apply, so a small list may not give a reliable answer.
Only up to a point. More visitors narrow the uncertainty around the result, but past the planned sample the gains are small and the risks of a long test grow. Plan the sample you need, run to it in whole weeks, then decide.
Ask Convertica
Convertica
Hi, I'm Convertica's AI assistant. Ask me anything about the free CRO audit, the one page and full site rebuilds, or any of the free tools.