A/B Test Sample Size Calculator
Calculate how many visitors you need for a statistically valid A/B test, plus a duration estimate based on your traffic. Frequentist math compatible with Adobe Target, Optimizely, and VWO test planning. Enter your baseline conversion rate and desired improvement, and learn about control vs variant methodology.
How Sample Size is Calculated
n = ((Zα/2 × √(2p̄q̄) + Zβ × √(p1q1 + p2q2))² / (p2 - p1)²This calculator uses the two-sample proportion test formula for comparing conversion rates between your control and variant.
n—Sample size needed per variation
Zα/2—Z-score for your significance level (1.96 for 95%)
Zβ—Z-score for your statistical power (0.84 for 80%)
p1—Your baseline conversion rate (control)
p2—Expected conversion rate after improvement (variant)
p̄—Pooled probability: (p1 + p2) / 2
q—Complement probability: 1 - p
Source: Standard statistical methodology for A/B testing. Results validated against industry benchmarks.
How to Use This Calculator
1.Enter Your Current Conversion Rate
Your baseline from analytics. Example: 25 conversions out of 1,000 visitors = 2.5%. Not sure of your baseline? Use the conversion rate calculator first.
2.Set Your Minimum Detectable Effect
The smallest relative improvement worth detecting. 10-20% is practical for most stores. Smaller effects (under 5%) need much more traffic.
3.Choose Statistical Settings
95% significance + 80% power is the working standard, the same defaults Adobe Target and Optimizely recommend.
4.Enter Your Daily Visitors
Traffic to the specific page you are testing, so the duration estimate reflects real conditions.
5.Review Your Results
Sample size shows visitors needed per variation, and the duration estimate shows how many days that takes at your traffic level.
Quick Decision Guide
| Situation | Sig. | MDE | Power |
|---|---|---|---|
| Small store | 90% | 20% | 80% |
| Medium store | 95% | 10% | 80% |
| Large store | 95% | 5% | 80% |
| Enterprise | 99% | 5% | 90% |
Common Mistakes to Avoid
- ×
Ending tests too early. Run for at least 7 full days
- ×
Ignoring business cycles. Include weekends and weekdays
- ×
Testing too small effects. 5% MDE needs massive traffic
- ×
Peeking at results. Decide sample size upfront, don't stop early
Frequently Asked Questions
What is sample size in A/B testing?
Sample size is the number of visitors you need in each variation to get statistically reliable results. Too few visitors means a result might come from random chance rather than a real difference between versions. Calculating sample size before you start keeps the test honest and prevents false positives.
Does this work with Adobe Target, Optimizely, or VWO?
Yes. This calculator uses standard frequentist math (a two-proportion z-test), the same family of statistics behind most planning calculators:
- Adobe Target uses a Welch's t-test and recommends 95% significance with 80% power, the defaults here
- Optimizely is frequentist and expects you to set sample size upfront
- VWO's public calculator is frequentist too, though VWO SmartStats switches to Bayesian inside the product
Plan your test here, then run it in your platform of choice. The inputs (baseline , , significance, power) map directly to what each tool asks for.
Is this a frequentist or Bayesian calculator?
This is a frequentist calculator. It uses a two-proportion z-test to compute how many visitors each variation needs before you can trust the result.
- Frequentist (this tool, Optimizely, Adobe Target): decide sample size upfront, run to completion, no peeking
- Bayesian (VWO SmartStats, some Statsig setups): reports a probability that one variant beats another and allows continuous monitoring
Frequentist planning is the safest default because it protects against the inflated false-positive rate you get from checking results early.
What's the sample size formula?
This calculator uses the two-sample proportion test (two-tailed):
n = (Zα/2 × √(2p̄q̄) + Zβ × √(p1q1 + p2q2))² / (p2 − p1)²
Where:
- p1 = baseline , p2 = expected rate after improvement
- Zα/2 = z-score for your (1.96 for 95%)
- Zβ = z-score for your power (0.84 for 80%)
- p̄ = pooled probability (p1 + p2) / 2, q = 1 − p
You don't need to compute this by hand. Enter your numbers above and the calculator returns sample size per variation plus total traffic needed.
How long should I run my A/B test?
Run for at least 7 full days to capture weekly patterns, since weekdays and weekends convert differently. Use the duration estimate above to see the exact run time at your traffic level. Avoid ending a test early just because one version looks like it is winning, since early leads often disappear.
What's the difference between a sample size and a significance calculator?
They run at different stages:
- (this tool): used before the test to plan how many visitors you need
- Significance or confidence calculator: used after the test, with your final conversion counts, to check whether the difference is statistically significant
Plan with this tool first, run the test to the target sample size, then confirm the result in your testing platform's report.
What's a good Minimum Detectable Effect (MDE)?
MDE is the smallest relative improvement worth detecting:
- 10-20% MDE: practical for small-to-medium stores
- 5-10% MDE: workable for high-traffic stores
- Under 5% MDE: needs very high traffic volumes
The smaller the effect you want to catch, the more traffic you need.
What happens if I don't have enough traffic?
If the required duration is too long, you have options:
- Increase MDE (aim for 20% instead of 10%)
- Lower significance to 90% for low-risk tests
- Test bigger changes instead of minor tweaks
- Focus on high-traffic pages like the homepage or product pages
- Test like add-to-cart instead of purchases
The Shopify conversion rate optimization guide covers high-impact changes worth testing first.
What's the difference between significance and power?
Both control different errors:
- (95%): the probability that a detected effect is real, not a false positive
- (80%): the probability of detecting a real effect when it exists, avoiding false negatives
You want to find real effects (power) while avoiding false alarms (significance).
Can I test more than 2 variations?
Yes, but each extra variation raises the required sample size. With 3 variations you split traffic three ways, so total visitors needed climbs by roughly 50%. Limiting to 2-3 variations works best for most stores.
Should I use 95% or 99% significance?
95% is the working standard. Use 99% only for mission-critical changes like the checkout flow, when a wrong decision is expensive, or in enterprise environments with strict requirements. 90% significance is acceptable for low-risk tests when you need faster results.
Related Articles
Learn more about A/B testing and conversion rate optimization for your ecommerce store.

Ecommerce SEO Statistics 2026: What 599 Stores Reveal
Ecommerce SEO statistics built on audits of 599 real stores plus source-checked 2026 data: the structured data gap, AI search click math, and three recycled numbers that do not say what people think.

Ecommerce SEO Audit: A Step-by-Step Checklist
A step-by-step ecommerce SEO audit checklist for Shopify and WooCommerce stores, covering crawling, indexing, Core Web Vitals, faceted navigation, duplicate variants, and product schema, grounded in Google's own documentation.

Your Ecommerce Audit Now Tells You What to Fix First
The biggest update to the EcomHint audit since launch: the report now tells you where you stand, what to fix first, exactly where each issue sits on your store, and whether your fix actually worked.
Ready to run your A/B test?
A free audit tells you which pages lose the most people, so you spend your traffic testing the ones that matter.
Free preview • No credit card • Nothing to install
