Skip to content
Menu

Testing bench / free tool

A/B Test Sample Size Calculator

Work out visitors per variant and test duration for a conversion rate test before you launch it. It runs entirely in your browser, so nothing you type is sent anywhere.

Work order / Sample size
Visitors per variant
-
Total visitors
-
Days to run
-
Target conversion rate
-

The arithmetic

01

How it works

For a two-sided test of two proportions: p1 = baseline rate, p2 = p1 x (1 + relative lift), p-bar = (p1 + p2) / 2. Visitors per variant = (z_alpha/2 x sqrt(2 x p-bar x (1 - p-bar)) + z_beta x sqrt(p1(1 - p1) + p2(1 - p2)))^2 / (p2 - p1)^2, rounded up. Total = per variant x number of variants. Days = total / daily visitors in the test, rounded up.

Worked examples

  1. 5% baseline, 10% relative lift, 95% confidence, 80% power: 31,234 visitors per variant, 62,468 for two variants, 32 days at 2,000 visitors a day.
  2. 3% baseline, 20% relative lift, 95% confidence, 80% power: 13,914 per variant.

Limits and caveats

The formula assumes a fixed sample decided in advance, one primary metric and independent visitors. Peeking at results and stopping early raises the false positive rate unless your testing tool uses a sequential or Bayesian method built for it. Run full weeks so weekday and weekend traffic are both inside the test.

A/B Test Sample Size Calculator: questions

What is a minimum detectable effect?

It is the smallest lift you care to detect, written relative to the baseline. A 10% relative lift on a 5% baseline means detecting a move from 5.0% to 5.5%. Smaller effects need far more traffic.

Why does a low baseline need so many visitors?

Conversions are rare events, so random noise is large compared with the difference you want to see. The sample has to be big enough for the real difference to stand out from that noise.

Should I use 90% or 95% confidence?

Use 95% for decisions that are costly to reverse, such as pricing or checkout changes. Some teams accept 90% for low-risk copy tests to move faster, knowing more of their winners will be false positives.

Does the tool send my numbers anywhere?

No. The math runs in your browser.

Search the desk