A/B Test Sample Size Calculator (Free + Formula Explained)
Know exactly how many visitors you need per variant — before you start — so you never stop a test too early.
Test parameters
Your current conversion rate on the page being tested
Relative improvement to detect — 10% MDE on 5% CR means detecting 5.5%+
Used to estimate test duration in days
Required sample
Visitors needed per variant
—
Total visitors
—
Estimated days
—
Embed with current settings
How to use this calculator
Plan your test properly before running a single visitor through it.
Find your baseline CR
Go to your analytics and note the current conversion rate of the page you're testing. This is your starting point.
Set your MDE
Decide the smallest relative improvement worth detecting. 10–20% is typical. Smaller MDE = more traffic needed.
Choose confidence & power
95% confidence and 80% power are industry defaults. Use 99%/90% for high-revenue pages where a false positive is costly.
Commit before you start
Note the per-variant sample size. Don't peek at results until you've collected that many visitors in each variant.
The formula (two-proportion z-test)
This calculator uses the standard two-proportion z-test sample size formula: n = (z_α/2 + z_β)² × (p₁(1−p₁) + p₂(1−p₂)) / (p₁ − p₂)²
Where p₂ = p₁ × (1 + MDE/100). z_α/2 = 1.96 at 95% confidence. z_β = 0.84 at 80% power.
Related free tools
Frequently asked questions
What is the Minimum Detectable Effect (MDE)?
The MDE is the smallest relative improvement you care about detecting. If your baseline is 5% and you set MDE to 10%, the calculator sizes your test to reliably detect a variant converting at 5.5% or higher. Smaller MDE = larger sample needed. Most teams use 10–20% for iterative tests.
Should I use 80% or 90% statistical power?
80% power (the default) means an 80% chance of detecting a real effect if it exists. 90% power requires about 25% more traffic. Use 90% for decisions with large revenue impact; 80% is fine for most iterative tests.
Why does adding more variants increase sample size?
Each variant needs its own independent sample. With 3 variants you need 3× the per-variant sample. For 3+ variants, also consider using 99% confidence to account for the increased chance of a false positive from multiple comparisons.
What if I have very low traffic?
Low traffic means you need to either run tests for longer, increase your MDE (only test for larger changes), or combine with qualitative research. If a test would take longer than 8 weeks, reconsider whether A/B testing is the right approach for that page right now.
Stop guessing.
Start testing.
Your first experiment — A/B test, popup, form, or heatmap — can be live in under 2 minutes. No developers, no contracts, no risk.