A/B test sample size calculator
Question: How many visitors do I need for my A/B test?
Plan your A/B test by calculating the required sample size. Enter your baseline conversion rate, minimum detectable effect, and desired power to find out how many visitors you need per variant.
How to use this calculator
Enter your baseline conversion rate (your current conversion rate before testing), the minimum detectable effect (the smallest improvement you want to detect), your desired confidence level, and statistical power. The calculator instantly shows how many visitors you need per variant. Adjust the MDE slider to see how smaller effects require exponentially more traffic.
Understanding the formula
Sample size is calculated using power analysis for a two-proportion z-test. The formula accounts for four key parameters: your baseline conversion rate, the minimum detectable effect size, the significance level (alpha), and the desired statistical power (1 - beta). The relationship between sample size and MDE is not linear โ halving the effect size you want to detect roughly quadruples the required sample size.
When to use this calculator
Use this calculator before launching any A/B test to determine how many visitors you need. Running a test without proper sample size planning is one of the most common mistakes in experimentation. An underpowered test may fail to detect a real improvement, wasting time and resources. An overpowered test wastes traffic that could be used for other experiments.
Common mistakes in sample size planning
Setting the MDE too small leads to impractically large sample sizes. Be realistic about what effect size matters for your business. Forgetting to account for the number of variants (each additional variant needs the same sample size) is another frequent error. Also remember that the sample size is per variant, not total โ if you need 10,000 per variant with two variants, that is 20,000 total visitors.