A/B Test Duration Calculator
Days and whole weeks an A/B test needs from sample size, daily visitors and traffic share.
Enter your current conversion rate and the smallest lift worth detecting to see how many visitors each variant needs before you start the test.
Relative 20% on a 5% baseline means you want to detect 5% rising to 6%. Everything runs in your browser.
| Input or step | Value |
|---|

The free A/B test sample size calculator tells you how many visitors each version of a page needs before you can trust the result. Enter your baseline conversion rate, the smallest lift you care about, the significance level and the power, and it shows the per variant sample size with the formula worked out.
An A/B test sample size calculator gives the visitors each variant needs to detect a chosen lift. It uses n = (z1-α/2 + z1-β)² × 2p̄(1 - p̄) / (p2 - p1)². For a 5% baseline, a 20% relative lift, 95% confidence and 80% power, you need 8,159 visitors per variant.
An A/B test sample size calculator is a tool that works out, before a test starts, how many visitors each version must see so that a real difference of a chosen size is likely to show up as statistically significant. It needs four inputs: the conversion rate you have now, the minimum detectable effect, the significance level and the power. Deciding the sample size first, then waiting until you reach it, is what stops you from calling a winner on noise.
The calculator uses the normal approximation sample size formula for comparing two proportions with equal group sizes, the same formula Penn State's STAT 509 course notes give for a binary outcome. With more than two variants it can split the significance level across the comparisons, and it shows a warning when so few conversions are expected that the approximation is weak. To check the result once the test has finished, use the A/B test significance calculator.

Use n = (z1-α/2 + z1-β)² × 2p̄(1 - p̄) / (p2 - p1)², where p1 is the baseline rate, p2 the rate you want to detect, p̄ their average, z1-α/2 the normal critical value for the two-sided significance level and z1-β the one for power. NIST's Engineering Statistics Handbook uses the same (z1-α/2 + z1-β)² structure for a two-sided test and calls these "critical values from the normal distribution".
With p1 = 5% and p2 = 6%, p̄ is 5.5%, z1-α/2 is 1.9600 at 95% confidence and z1-β is 0.8416 at 80% power. That gives 7.8489 × 0.10395 / 0.0001 = 8,158.91, rounded up to 8,159 per variant. Always round up, never down.
The minimum detectable effect (MDE) is the smallest change in conversion rate your test is designed to catch reliably. A relative MDE is a share of the baseline: 20% of 5% is 1 percentage point, so 5% to 6%. An absolute MDE is the gap in percentage points. Halving the MDE roughly quadruples the sample size, because the difference is squared in the formula, so choose the smallest lift that would really change a business decision.
Significance (α) is the risk of declaring a winner when there is no real difference. NIST defines α as "the probability of rejecting the null hypothesis when it is true". Power (1 - β) is the chance of detecting a real effect of your chosen size, so 80% power means a 20% risk of missing it. Higher confidence or higher power both need more visitors.
| Baseline rate | Relative MDE | Target rate | Visitors per variant |
|---|---|---|---|
| 2% | 20% | 2.40% | 21,110 |
| 5% | 10% | 5.50% | 31,235 |
| 5% | 20% | 6.00% | 8,159 |
| 10% | 20% | 12.00% | 3,843 |
| 25% (absolute +25 points, 90% power) | 100% | 50.00% | 79 (Penn State example) |
Example: an online shop converts 5% of product page visitors and wants to test a new checkout button. A lift to 6% (20% relative) would justify the change, so the MDE is 20% relative. At 95% confidence and 80% power, the calculator gives 8,159 visitors per variant and 16,318 in total for a control and one variant. As a cross-check, entering Penn State's worked example, 25% against 50% at 90% power, returns 79 per group, the same answer as the course notes.
Rare events are noisy. With a 2% baseline, a 20% relative lift is only 0.4 percentage points, and spotting such a small gap reliably takes about 21,110 visitors per variant at 95% confidence and 80% power.
Use whichever you think in, but be clear. Many testing tools report relative lift, so a 20% relative MDE on 5% means 6%. A 20 point absolute MDE would mean 25%, which is a very different test.
Each extra variant compared with the control is another chance of a false winner. The Bonferroni option divides the significance level by the number of comparisons, which keeps the overall risk near your chosen level but needs more visitors.
Not with this method. The calculation assumes you look once, at the planned sample size. Checking repeatedly and stopping at the first significant result raises the false positive rate, unless you use a sequential testing method designed for it.
Some calculators use separate variances for the two groups, a continuity correction or a one-sided test. Those choices shift the answer a little. This tool uses the pooled two-sided formula shown on the page, so you can check every step.
No. The calculator runs entirely in your browser with JavaScript. Your conversion rates and test plans are never uploaded or stored, so you can use real business numbers safely.
Checked 23 Oct 2026. Facts checked against these official pages. Read how I check facts in my editorial policy.
Days and whole weeks an A/B test needs from sample size, daily visitors and traffic share.
Two-proportion z-test for A/B tests: p-value, confidence level and uplift with its range.
A conversion rate calculator is a tool that shows what percentage of visitors complete a goal such as a sale,…
Step conversion, drop-off and overall rate for each funnel step, with the biggest leak and a what if.
Send your website and I will check it for you, free.
One short email when something new goes live: articles, free SEO tools, package updates, discounts and price alerts. No spam, unsubscribe in one click.