A/B Test Sample Size Calculator

Estimate the visitors needed per variant to detect a given relative uplift at 95 per cent confidence and 80 per cent power.

Visitors needed per variant
—
Total visitors, both variants
—
Conversion rate to detect for B
—

Planning approximation using the standard two-proportion formula with z values 1.96 and 0.84; treat the figure as a guide.

In short

What is the A/B Test Sample Size Calculator?

This calculator estimates how many visitors each version of an A/B test needs before you can reliably detect a chosen improvement. Enter your current conversion rate and the smallest relative uplift worth detecting. Smaller uplifts and lower conversion rates need many more visitors, so plan the test length early.

How it works

Variant B rate = baseline x (1 + uplift). Visitors per variant = (1.96 + 0.84) squared x [p1(1 - p1) + p2(1 - p2)] / (p2 - p1) squared, rounded up, where p1 and p2 are the two rates as decimals. The z values 1.96 and 0.84 give 95 per cent confidence and 80 per cent power.

How to use it

  1. Enter your current conversion rate as a percentage.
  2. Enter the smallest relative uplift you want to detect.
  3. Read the visitors needed for each variant.
  4. Divide by your daily traffic to estimate how long the test must run.
Questions

A/B Test Sample Size Calculator — FAQ

What is relative uplift?

It is the change as a share of your current rate. A 20 per cent relative uplift on a 3 per cent rate means moving to 3.6 per cent.

Why do I need so many visitors?

Small differences are hard to tell from random variation, so detecting them reliably needs larger samples.

What if I cannot reach the sample size?

Test a bigger change, use a higher-traffic page, or accept that the result will be less certain.

More Marketing & Ads tools