Most A/B tests fail before they start. Teams stop a test as soon as the result looks promising after a few days, or run it on a page with too few visitors to detect any real difference. The decisions that follow rest on chance: a winning variant whose advantage vanishes after rollout, or a genuine improvement rejected because the test was too small to see it.
The fix is to set the sample size before launch, using a power analysis for two proportions as described by Cohen in 1988 and in Fleiss's book on rates and proportions. Four inputs drive it: the current conversion rate, the smallest lift you care to detect, the significance level, which is the chance of declaring a difference that is not there, and the power, which is the chance of detecting a difference that is. The smaller the lift or the lower the baseline rate, the more visitors you need. With more than two variants, the significance level is split across the comparisons with a Bonferroni correction.
In the default example the current conversion rate is 10% and we want to detect a 20% relative lift, which means reaching 12%. At 5% significance and 80% power each variant needs 3,841 visitors, 7,682 in total. With a thousand visitors a day the test is complete in 8 days. Adding a third variant would raise the requirement to 4,652 visitors per variant because of the multiple-comparison correction.
The number that matters is visitors per variant. Do not read the result before you reach it, and do not stop early because the gap looked large at first; repeated peeking raises the chance of crowning a false winner. If the test would run longer than eight weeks, test a bolder change that should have a bigger effect, or move the test to a busier page, because long tests get distorted by seasons and campaigns.
People often confuse relative and absolute lift. Going from 10% to 12% is a 2-point absolute lift and a 20% relative one, so pick the right type in the tool. Another mistake is ending a test mid-week; cover whole weeks, because visitors behave differently on working days and weekends. This calculation is for metrics expressed as a proportion, such as conversion or click-through. Average order value needs a different formula based on variance.