Sample Size Calculator

How many visitors does your A/B test need, and how long will it take? Enter your traffic, conversion rate and the lift worth detecting. Or pick a test length and see the traffic it needs.

Confidence

Confidence

Plan from

Only visitors who'd actually see the change, not sitewide traffic.

%
% rel.

3% → 3.3%

MDE type

Not sure? Typical relative lifts:

Variants (incl. control)

Power

Hypothesis

%

Your plan

Run for 6 weeks

38 days of traffic, rounded up to full weeks so every weekday counts equally. Detects a move from 3.00% to 3.30% (+10.0%).

Visitors per variant

53,211

Total visitors

106,422

Significance per comparison

α = 0.05

Smallest lift you can detect, by test length

In 4 weeks you could reliably detect +11.6% or more. The dashed line is your target.

0%5.0%10%15%20%1w2w4w6w8w10w12w

Pick a start date to get the end date and a warning if the test overlaps Black Friday, Christmas or Easter.

This is the “Plan a test” tab of our full A/B test calculator. Runs entirely in your browser; nothing you enter is sent to our servers.

How to use the sample size calculator

Enter the weekly visitors who'll see the change, your current conversion rate and the smallest lift that would be worth shipping: the minimum detectable effect (MDE). The calculator returns the visitors you need per variant and how many weeks that takes. Don't know your traffic yet? Switch “Plan from” to A test length and it tells you the weekly traffic a 2-, 4- or 6-week test needs.

Sample size by conversion rate and lift

Visitors needed per variant at 95% confidence and 80% power (two-sided):

Conversion rate+5% lift+10% lift+15% lift+20% lift
1%637,010163,09574,19342,693
2%315,20680,68236,69321,109
3%207,93853,21124,19313,914
5%122,12431,23414,1938,158
10%57,76314,7516,6933,841

The pattern to remember: lower conversion rates and smaller lifts both drive the number up fast. A 1% store needs 163,095 visitors per variant for a 10% lift, 3.1 times what a 3% store needs.

The formula

The standard two-proportion sample size formula, with pooled variance under the null and unpooled under the alternative:

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

Worked example: p₁ = 3.0%, p₂ = 3.3%, 95% confidence (z = 1.96) and 80% power (z = 0.84) give 53,211 visitors per variant. At 20,000 visitors a week that's 6 weeks. See sample size and power analysis for the background.

What moves the number

The lift you want to detect

Sample size grows with one over the lift squared: halve the MDE and you need about 3.9× the visitors.

Confidence and power

From the 95%/80% defaults, 99% confidence costs about 49% more traffic and 90% power about 34% more. Dropping to 90% confidence saves about 21%, at the price of twice as many false winners.

One-sided tests and extra variants

A one-sided test needs about 21% less traffic but can't tell you a variant is hurting. Every extra variant needs its own sample and a stricter significance level, so an A/B/C test needs 82% more traffic than an A/B test.

After the test

When the planned sample is in, check the result with the statistical significance calculator. From the Plan tab, “Test running? Check your results against this plan” carries your planned sample across, so it warns you if you're calling the test early.

Frequently asked questions

How many visitors do I need for an A/B test?

It depends on your conversion rate and the smallest lift you want to detect. At a 3% conversion rate, detecting a 10% relative lift (3.0% to 3.3%) at 95% confidence and 80% power takes 53,211 visitors per variant, 106,422 in total. Enter your own numbers in the calculator above.

Why 95% confidence and 80% power?

They are the industry defaults: a 5% chance of a false winner and a 20% chance of missing a real lift. Going to 99% confidence needs about 49% more visitors; 90% power needs about 34% more. For most e-commerce tests 95% and 80% are the right trade-off.

Should I use a relative or absolute minimum detectable effect?

Relative, for almost every e-commerce test: 'a 10% lift on a 3% conversion rate' (3.0% to 3.3%) is how the business talks about wins. Absolute MDE, in percentage points, mostly makes sense for high-baseline metrics such as email open rates. The calculator supports both.

What if I test more than one variant?

Each extra variant adds another chance of a false winner, so the significance level is split across the comparisons. With two variants plus a control, each arm needs 64,439 visitors in the example above, and the test needs 82% more traffic in total than a simple A/B test.

How does sample size translate into test duration?

Divide the total sample by the weekly visitors who reach the tested page, then round up to whole weeks so every weekday is represented. 106,422 visitors at 20,000 a week is 6 weeks. In the calculator, switch 'Plan from' to 'A test length' to see the weekly traffic needed for a fixed number of weeks instead.

What if I don't have enough traffic?

Test bolder changes. Halving the lift you want to detect multiplies the required sample by about 3.9, so the reverse also holds: aim for bigger effects, test higher-traffic pages, or test earlier in the funnel where conversion rates are higher.

Stop copying numbers into calculators

Metricuno runs your A/B tests and calculates significance, lift and revenue impact live, from real purchase data.

Start free trial