Free tool

A/B Test Sample Size Calculator

Find out how many visitors your A/B test needs per variant and how many days it will take, based on your conversion rate and the lift you want to detect.

%

Your current rate, e.g. 4% of visitors sign up.

%

Smallest lift worth detecting. 15% means 4% → 4.6%.

Assumes 95% significance (two-sided) and 80% power, the usual defaults.

Visitors needed per variant

17,943

35,886 visitors in total across 2 variants.

Baseline rate
4%
Rate to detect
4.6%
Test length
24 days
Full weeks
4

Plan

Run the test for at least 4 full weeks so weekday and weekend visitors are both counted, then check significance once.

The formula

For two conversion rates p₁ (baseline) and p₂ = p₁ × (1 + MDE), the visitors needed per variant are:

n = (z₁₋α/₂ · √(2·p̄·(1−p̄)) + z₁₋β · √(p₁(1−p₁) + p₂(1−p₂)))² ÷ (p₂ − p₁)²

where p̄ is the average of p₁ and p₂, z₁₋α/₂ = 1.96 for 95% significance and z₁₋β = 0.84 for 80% power.

Example

With a 5% baseline and a 20% relative MDE (5% → 6%), you need about 8,158 visitors per variant, 16,316 in total. At 1,000 visitors a day that's 17 days, so plan for three full weeks.

How to shorten a test

  • Test bolder changes. A bigger effect needs far fewer visitors. Small tweaks need enormous traffic.
  • Test where traffic is. Your homepage or pricing page reaches significance faster than a deep page.
  • Measure a closer goal. “Clicked start trial” happens more often than “paid”, so it needs fewer visitors.

When the test is done, check the result with the A/B test significance calculator.

Frequently asked questions

What is minimum detectable effect (MDE)?+

The smallest relative improvement your test can reliably detect. A 10% MDE on a 5% conversion rate means detecting a change to 5.5%.

Why does a small MDE need so many visitors?+

Sample size grows with the inverse square of the effect. Halving the effect you want to detect roughly quadruples the visitors you need.

What do 95% significance and 80% power mean?+

95% significance limits false positives to 5%. 80% power means that if the effect really exists, the test finds it 80% of the time.

Should I run a test for full weeks?+

Yes. Visitors behave differently on weekdays and weekends, so run whole weeks even if you reach the sample size earlier.

Does this work with more than two variants?+

It shows the visitors needed per variant. With more variants, the total grows. For many variants, a stricter significance level (a Bonferroni correction) is safer.

More free tools

Numbers like these, for your own site.

Cool Analytics shows conversions, sources and every visitor's journey. No cookies, one line of code.