How many visitors does your A/B test need?
Enter your current conversion rate, the smallest lift worth finding and how sure you want to be. You get the visitors each version needs and, from your daily traffic, how many days the test takes.
The rate of the version you have now: 3 means 3 percent.
A share of the current rate: 20 takes 3% to 3.6%.
95% means a 5% chance of naming a winner when there is none: a significance level of 0.05.
The chance the test finds the lift when it is really there.
Optional. Visitors who enter the test each day, both versions together.
When the test has run, check whether the winner is real with the ad test significance calculator. In its conversion rate mode, put each version's visitors where it asks for clicks.
What it works out
- Visitors per version. How many visitors each version needs so that a lift of the size you chose is found as often as the power says (8 times in 10 at 80 percent), while two equal versions are called different no more often than the confidence allows (5 times in 100 at 95 percent).
- Relative or absolute lift. A relative lift is a share of your current rate: 20 percent takes 3 percent to 3.6 percent. An absolute lift is in percentage points: 1 point takes 3 percent to 4 percent.
- How long it takes. Both versions together, divided by the visitors who enter the test each day, rounded up to whole days. Run it for whole weeks, so weekdays and weekends are both in it.
- The formula. The standard sample size for comparing two proportions, from Fleiss, Levin and Paik, Statistical Methods for Rates and Proportions (3rd edition, 2003, chapter 4): two-sided, equal traffic on both versions, without continuity correction. It is the same sum the ad test significance calculator uses at 95 percent and 80 percent.
What it does not do
It plans a test of two versions with the same traffic on each. With three or four versions, every comparison needs this many visitors per version, and each extra version raises the chance of a false winner.
The numbers hold only if you fix the sample size before you start and judge the test once, at the end. Stopping on a day when one version looks ahead makes false winners far more likely.
It assumes each visitor sees one version only and that visitors behave alike from week to week. A sale, a launch or a holiday in the middle of the test can move both versions.
It cannot make a small site fast. If the test would take months, test a bolder change, or measure a step with more traffic, such as adding to the cart instead of buying. Everything runs in your browser. Nothing you type is sent anywhere.
Questions
What lift should I plan for?
The smallest one that would change what you do. Do not plan for a lift you would not act on: halving the lift needs about four times the visitors.
What do confidence and power mean?
Confidence is how sure you want to be that a winner is not luck: at 95 percent, two versions that are really the same are called different 5 times in 100. Power is the chance of finding a lift that is really there: at 80 percent, a real lift of the size you chose is missed 2 times in 10.
Can I stop early if one version is clearly ahead?
Not if you want the numbers on this page to hold. Early leads come and go by chance. Wait until each version has the visitors it needs, then judge the result once.
Visitors or sessions?
Use the unit your testing tool splits by, and count the conversion rate on the same unit. If the tool splits by visitor, use conversions per visitor, not per session.