Guide
Planning an A/B test: sample size and how many days it needs
The most common mistake in A/B testing is to start without knowing how long it will take. People stop when the result looks good, or run on for weeks with too little traffic to ever see a difference. Both lead to wrong decisions. Before you start, work out how many visitors each version needs, and then how many days that will take at your traffic. This calculator does both.
The inputs
Enter your current conversion rate and choose how to describe the smallest change worth detecting: as a relative change, such as 20% more conversions, or in percentage points, such as one point more. Choose a significance level of 10%, 5% or 1% and a power of 80% or 90%. Then give the number of versions, including the original, the visitors per day on the tested page and the share of those visitors who take part in the test.
How the sample is calculated
The tool uses the standard formula for comparing two proportions in a two-sided test with equal groups. It combines the baseline and the new rate, the critical values for your significance and power, and the variance of each rate, and gives the number of visitors per version, rounded up. Multiplying by the number of versions gives the total. The smaller the difference you want to detect, the larger the sample.
From visitors to days
Divide the total visitors by the daily visitors multiplied by the share in the test, and you have the days. The tool rounds the run time up to whole weeks, because behaviour differs by day of the week, and a test that stops mid-week gives a biased view. The result gives the days at your traffic and the run time in weeks and days.
When the answer is too long
If the test would take more than three months, a note says so. Options are to look for a bigger change, to test on a page with more traffic, to test a step that converts better or to accept a smaller power. Running a test for months invites other changes to the site and to the audience that make the result unreliable.
Worked examples
The first sample starts with a 5% rate and a smallest change of 20% relative, which means detecting a move from 5.00% to 6.00%, at 5% significance and 80% power, for two versions with 600 visitors a day. It needs 8,158 visitors per version, 16,316 in total, 28 days of traffic and a run of 4 weeks. The second sample looks for a change from 2.00% to 2.20% on a smaller page: it needs 80,682 per version and 161,364 in total, which takes 538 days, about 77 weeks, and triggers the warning.
Limits
The calculation assumes a steady conversion rate and independent visitors. It does not account for seasonality, repeat visitors, several goals or testing more than two versions with corrections for multiple comparisons. Wait until the planned number of visitors is reached before reading the result, and use the A/B Test Calculator on this site to judge it.
Related tools
- A/B Test Calculator judges the result once the planned sample has been collected.
- SEO CTR Calculator estimates clicks from positions, which helps pick a page to test.
- Viral Coefficient Calculator projects growth from referrals.
- Traffic Drop Calculator measures traffic change to check your daily visitor estimate.
Checked against the current version of the A/B Test Sample Size & Duration Calculator on .

