A/B Test Sample Size Calculator

Calculate the minimum number of visitors each variant needs before your A/B test can detect a real difference with statistical confidence. Enter your baseline rate, desired effect size, and confidence settings to get your sample size instantly.

Sample Size Per Variant
visitors needed in each group
Total Sample Size
across 2 variants
Expected New Rate
baseline + MDE
Relative Uplift
percentage improvement

Estimate Test Duration

Ad Space

How A/B Test Sample Size Calculation Works

An A/B test sample size calculator determines the minimum number of visitors each variant needs to reliably detect a difference between the control and treatment groups. The calculation uses a two-proportion z-test formula that factors in your baseline conversion rate, the minimum detectable effect (MDE) you want to measure, the significance level (alpha), and statistical power (1 minus beta). Without enough sample size, your test may produce false negatives — missing a real improvement — or false positives that lead to incorrect decisions.

Understanding the Key Inputs

The baseline conversion rate is your current rate before the test begins — for example, 3% of visitors completing a purchase. The minimum detectable effect is the smallest improvement worth detecting; a 0.5 percentage point MDE means you want to catch a shift from 3% to 3.5%. The significance level (typically 95%) sets the threshold for ruling out chance, while statistical power (typically 80%) controls the probability of detecting a real effect when one exists. A two-tailed test checks for changes in either direction, while one-tailed only checks for improvement.

A/B Testing for SEO and Marketing Teams

Product managers, growth engineers, and digital marketers use sample size calculators before launching split tests on landing pages, email subject lines, pricing pages, and call-to-action buttons. Running a test without adequate sample size wastes traffic and time — you may end the test too early with inconclusive results, or run it too long and miss revenue opportunities. This calculator helps you plan the exact traffic allocation and test duration upfront, based on the statistical rigor your team requires. For multivariate tests with 3 or 4 variants, the total sample size scales linearly since each variant needs the full sample independently.

Tips for Reliable A/B Tests

Avoid peeking at results before reaching your target sample size — early stopping inflates false positive rates. Use 95% significance and 80% power as your starting point; increase power to 90% for high-stakes tests like pricing changes. If the required sample size is too large for your traffic, consider increasing the MDE — testing larger changes requires fewer visitors. Always run tests for at least one full business cycle (typically 7 days) to account for day-of-week effects, even if you reach sample size sooner. Last updated: April 2026.

Frequently Asked Questions

What sample size do I need for an A/B test?

It depends on your baseline conversion rate, minimum detectable effect, significance level, and statistical power. Use this calculator to get the exact number. A typical e-commerce site with 3% conversion testing a 0.5% MDE at 95% significance and 80% power needs about 23,000 visitors per variant.

What is minimum detectable effect (MDE)?

MDE is the smallest difference in conversion rate you want the test to reliably detect. A smaller MDE requires a larger sample size. For example, detecting a 0.1% change needs far more visitors than detecting a 2% change.

What is the difference between one-tailed and two-tailed tests?

A two-tailed test checks whether the variant is either better or worse than the control. A one-tailed test only checks for improvement. Two-tailed is the standard recommendation because it catches negative effects too.

Why does increasing statistical power require more samples?

Higher power (e.g., 90% vs 80%) means a higher probability of detecting a real effect. This extra sensitivity requires more data to achieve, so the sample size increases accordingly.

How long should I run my A/B test?

Run your test until you reach the required sample size and for at least one full week to account for day-of-week traffic patterns. Never stop a test early just because results look significant — early peeking inflates false positive rates.

Can I use this for multivariate tests (A/B/C/D)?

Yes. Select the number of variants (2, 3, or 4) in the calculator. The sample size per variant stays the same, but total sample size increases because each variant needs the full sample independently.

Is my data sent to any server?

No. This calculator runs entirely in your browser using JavaScript. No data is transmitted anywhere. Your inputs stay private on your device.