A/B Test Duration Calculator

Calculate the required sample size and test duration before making a decision.

Quick Presets

Your current conversion rate

%

Smallest improvement to detect. 10% means 3.0% β†’ 3.30%

%

100% of traffic goes to the test

100%

Results

πŸ‘€
53,224
Per Variant
πŸ‘₯
106,448
Total Sample
πŸ“…
22
Days Needed
🏁
Apr 20, 2026
End Date

Test Timeline

Start
Mar 29, 2026
25%
Apr 4, 2026
50%
Apr 9, 2026
75%
Apr 15, 2026
Complete
Apr 20, 2026

Sensitivity Analysis

MDESample / VariantTotal SampleDays
5%207,997415,99484
10%53,224106,44822
15%24,19848,39610
20%13,91527,8306
25%9,10018,2004
30%6,45412,9083

⚠️ Should I Stop Early?

Stopping an A/B test before reaching statistical significance leads to false positives. If you stop at 50% of the required sample, there's a 30–40% chance your β€œwinner” is actually a fluke. Always run the test for the full calculated duration of 22 days before making decisions.

How It Works

This calculator uses the two-proportion z-test formula to determine the minimum sample size needed per variant:

n = (ZΞ±/2 + ZΞ²)2 Γ— (p1(1-p1) + p2(1-p2)) / (p2 - p1)2

Where p1 is your baseline conversion rate, p2 is the expected rate after improvement (p1 Γ— (1 + MDE)), ZΞ±/2 is the z-score for your significance level, and ZΞ² is the z-score for your chosen power.

Last updated: March 2026

How to Calculate A/B Test Sample Size

Determining the right sample size is the most important step in A/B testing. Too few visitors and your results are unreliable. Too many and you waste time that could be spent on the next test. This calculator uses the two-proportion z-test to find the exact number of visitors you need per variant.

The required sample size depends on four factors: your baseline conversion rate, the minimum detectable effect (how small an improvement you want to catch), your significance level (how sure you want to be), and statistical power (probability of detecting a real winner).

Frequently Asked Questions

How do I calculate sample size for an A/B test?

Use the two-proportion z-test formula. Enter your baseline conversion rate, the minimum improvement you want to detect (MDE), your desired significance level (typically 95%), and statistical power (typically 80%). The calculator determines the minimum visitors needed per variant.

Why does a smaller MDE require more samples?

Detecting a small difference between two groups requires more data points to distinguish the signal from noise. A 5% relative improvement needs about 4x more samples than a 10% improvement.

What sample size do I need for 95% confidence?

It depends on your baseline conversion rate and MDE. For example, a site with 3% conversion rate wanting to detect a 10% relative improvement at 95% confidence and 80% power needs roughly 12,500 visitors per variant.

Can I use this for multivariate tests?

Yes. Select 3 or 4 variants to see the total sample needed. More variants mean a larger total sample and longer test duration, since each variant needs the same minimum sample size.

Related Tools