How many visitors does your A/B test need? Plan the sample size and test duration before you launch.
To detect a move from 5.00% to 5.50% at 95% confidence and 80% power. Add your daily visitors to estimate how long the test needs to run.
Before you launch an A/B test, you need to know how many visitors each version has to receive. Stop too early and you may act on noise; run it far longer than needed and you waste traffic and time. This calculator gives you the sample size per variation for a test on a conversion rate, based on your current conversion rate, the smallest improvement you care about, and how sure you want to be.
It is the planning step that comes before the test. When the test is done, use the A/B test significance calculator to check whether the result is real.
For two groups with conversion rates p1 (control) and p2 (variant), the visitors needed in each group are:
n = (Zα/2 · √(2·p̄·(1−p̄)) + Zβ · √(p1·(1−p1) + p2·(1−p2)))² ÷ (p2 − p1)²
Here p̄ is the average of p1 and p2, Zα/2 comes from your confidence level (1.96 for 95%), and Zβ comes from your power (0.8416 for 80%). The result is rounded up. This is the standard two-sided test for comparing two proportions, so it assumes you will look at the result once, when the sample is reached.
| Baseline | Effect to detect | Per variation | Takeaway |
|---|---|---|---|
| 2% | 10% relative (2.0% → 2.2%) | 80,683 | Small lift on a low rate: needs a lot of traffic |
| 2% | 20% relative (2.0% → 2.4%) | 21,109 | Doubling the lift cuts traffic by about 4× |
| 5% | 10% relative (5.0% → 5.5%) | 31,234 | A typical landing page test |
| 5% | 20% relative (5.0% → 6.0%) | 8,158 | A bigger effect is much cheaper to detect |
| 10% | 10% relative (10.0% → 11.0%) | 14,751 | Higher baselines need fewer visitors |
| 10% | 20% relative (10.0% → 12.0%) | 3,841 | Large effect on a high-converting page |
Take the 5% baseline with a 10% relative lift. You need about 31,234 visitors in each version, 62,468 in total. With 2,000 visitors a day to the test, that is 32 days. Raising the confidence to 99% lifts the requirement to about 46,474 per variation, and raising power to 90% lifts it to about 41,815, so tightening either setting has a real cost.
Last reviewed: October 2026