A/B Test Sample Size Calculator
Enter your baseline conversion rate, the effect you want to detect, and your confidence and power to see how many visitors each variant needs before you start.
Your numbers
Results update live
Sample size per variant
3,839
Visitors needed in each of A and B
Total sample
7,678
Across both variants
Estimated duration
8 days
At the traffic you entered
How this is calculated
- Baseline rate is p1. The target rate p2 is the baseline lifted by your minimum detectable effect.
- The z-scores for confidence (two-sided) and power come from the inverse normal distribution.
- Sample per variant = (z_alpha + z_beta) squared x (p1(1-p1) + p2(1-p2)) / (p2 - p1) squared.
- Duration divides the total sample by your daily visitors.
This is a fixed-horizon test calculation. Decide the sample size first and run to it. If you plan to measure the result afterward, the A/B test significance calculator does the other half, and the incrementality testing guide covers when an on-site test is the wrong tool entirely.
Frequently asked questions
Why do I need a sample size before testing?
Deciding the sample size up front is what keeps an A/B test honest. If you watch the numbers and stop the moment they look significant, your real false-positive rate is far higher than the 5 percent you think you are running.
What is minimum detectable effect?
It is the smallest relative lift you care about catching. A smaller effect needs a much larger sample, so be realistic. Chasing a 1 percent relative lift can take more traffic than you will ever get.
Confidence vs power, what is the difference?
Confidence controls false positives (calling a flat test a winner). Power controls false negatives (missing a real winner). The common defaults are 95 percent confidence and 80 percent power.