A/B Testing Sample Size Calculator

Enter your base conversion rates and we will show you how many visitors do you need for your test.

Base Conversion Rate (CR%)

What is your control group conversion rate?

%

Minimum Detectable Effect (MDE)

What is your expected minimum detectable effect? (± changes from your base conversion)

%

Statistical Significance

Set the significance level at which you would like to declare winning or losing variations.

%

min 70, max 99


Required Sample Size

3,457 per variant

Create A/B tests by chatting with AI and launch them on your website within minutes.

Try it for FREE now

Why Sample Size Calculation Is Critical for A/B Testing

Sample size is the foundation of every reliable A/B test. Run too few visitors and you cannot trust the result — a 15% conversion rate observed in 50 people could easily be 8% or 22% in reality. Run far more than needed and you waste weeks of learning cycles without meaningfully improving accuracy.

Critically, sample size must be calculated before the test starts — not during and not after. Setting it in advance commits you to running the test until you have enough evidence to make a reliable decision, which protects you from the statistical trap of stopping early when interim results happen to look positive.

How to Calculate A/B Testing Sample Size

The formula uses three inputs: your baseline conversion rate, your minimum detectable effect (MDE), and your desired confidence level. The calculator solves for the number of visitors per variant needed to detect the specified effect with the specified certainty.

n = (z² × 2 × σ²) / effect_size²
σ = √(CR × (1 − CR))    effect_size = CR × (MDE / 100)

The output is the per-variant sample size. Multiply by your number of variants to get the total visitors the test needs, then divide by your daily traffic to estimate duration using our A/B test duration calculator.

What Affects Your Required Sample Size?

Base Conversion Rate

Your baseline CR determines the natural variance in your goal metric. A 2% conversion rate has high variance — each conversion is a rare event — which requires substantially more data to produce a reliable estimate. A 20% rate has lower variance and needs fewer visitors. The closer your baseline is to 50%, the larger the variance and the larger the required sample for the same MDE.

Minimum Detectable Effect (MDE)

MDE has an enormous effect on required sample: halving your MDE roughly quadruples the required visitor count. Set it to reflect the smallest improvement that is worth shipping — not the smallest that could theoretically exist. If your page converts at 10% and you need to detect a 20% relative lift (to 12%), that is a far smaller sample requirement than detecting a 5% relative lift (to 10.5%).

Statistical Power

This calculator targets 80% statistical power — the A/B testing standard. Power is your probability of detecting a real effect when one genuinely exists. Higher power reduces false negatives (missing real improvements) but increases the required sample. 80% means: if the variant is genuinely better by your MDE, the test will detect it 80% of the time. This is the right balance for most marketing-page experiments.

Number of Variants

More variants split your available daily traffic further. With 1,000 daily visitors and three variants (A, B, C), each variant receives only ~333 visitors per day. Always multiply the per-variant sample size by your variant count to get the total, then divide by your daily traffic to estimate how many days you need. Use the duration calculator to do this automatically.

Common Sample Size Mistakes

The most common mistake is setting an MDE that is too small for your traffic level. If you want to detect a 1% relative lift on a 3% base rate, you need millions of visitors per variant. Be honest about what your traffic can support within a two-to-four week test window.

The second most common mistake is calculating sample size mid-test or retroactively — after checking interim results. This leads to stopping when results happen to look significant, which inflates your false-positive rate from 5% toward 30% or higher. Run this calculator before launch and treat the output as a hard commitment.

Finally, do not confuse total visitors with visitors per variant. The calculator outputs per-variant sample size. Multiply by the number of variants to get the total visitors your test requires before declaring a winner.

Try Our Other Free A/B Testing Tools

Frequently Asked Questions

Why do I need to calculate sample size before testing? +

Calculating sample size before starting a test ensures your results are valid and reliable. Too small a sample and outcomes get skewed by random chance; too large wastes time and resources without meaningfully improving accuracy.

Getting the number right lets you detect a real difference between variants efficiently — and reduces the risk of type II errors (falsely concluding a change had no effect when it actually did).

What is Base Conversion Rate (CR%)? +

Your Base Conversion Rate is the current conversion rate of your goal, measured before any changes are made. It acts as a statistical baseline — the calculator uses it to understand the natural variance in your data and determine how many visitors you need to reliably detect a meaningful lift.

What is Minimum Detectable Effect (MDE)? +

MDE is the smallest relative lift you care about detecting. If your base CR is 10% and your MDE is 20%, the calculator sizes the test to detect a lift to at least 12%.

A smaller MDE requires a much larger sample. If traffic is limited, set your MDE to a level that is still business-meaningful — do not design a test for a 2% lift if you only see 500 visitors a day.

What significance level should I use? +

95% is the industry standard — only a 5% chance the result is due to random noise. Use 90% for low-traffic or exploratory tests, and 99% for high-stakes decisions like checkout or pricing pages.

More free tools

The A/B testing platform for people who
care about  website performance

Mida is 10X faster than anything you have ever considered. Try it yourself.

Decorative graphicDecorative graphicDecorative graphicDecorative graphic