Skip to content
Experimentation

Sample Size Calculator

Size an A/B test before you launch it.

Sample size per variant53,208
Total sample size106,416
Target rate to detect3.3%

How the sample size calculator works

The most common testing mistake is launching without knowing how much traffic the test needs. Underpowered tests either never reach significance or produce false winners that regress after launch.

Enter your baseline conversion rate, the smallest lift worth detecting (as a relative percentage), and your confidence and power. The calculator returns the visitors each variant needs, so you can estimate the test duration from your traffic.

Smaller effects need dramatically more traffic. Detecting a 5% relative lift can require several times the sample of a 10% lift, which is why deciding the minimum effect worth your time comes first.

The formula

n = (z_α + z_β)² × [p₁(1−p₁) + p₂(1−p₂)] ÷ (p₂ − p₁)²
How this is calculated

The sample size grows with the confidence and power you demand (via their z-scores) and shrinks as the effect you want to detect grows. p₁ is the baseline rate; p₂ is the baseline lifted by your minimum detectable effect.

Worked example

Baseline conversion rate: 3.0%Minimum detectable effect (relative): 10.0%Confidence level: 95.0%Statistical power: 80.0%
Sample size per variant53,208
Total sample size106,416
Target rate to detect3.3%

Detecting a 10% lift on a 3% baseline at 95/80 needs roughly 53,000 visitors per variant.

Frequently asked questions

What is minimum detectable effect?

The smallest improvement you want the test to be able to catch, expressed relative to your baseline. A 10% MDE on a 3% baseline means detecting a move to 3.3%. Smaller MDEs need far more traffic.

What power should I use?

80% is standard. It means an 80% chance of detecting a real effect of your chosen size. Raising power to 90% increases the required sample but reduces the risk of missing a real winner.

How do I turn sample size into test duration?

Divide the total sample size by your daily eligible traffic. If a test needs 100,000 visitors total and you get 5,000 a day into the test, plan for about 20 days.

Related tools

Related reading

Sample Size Calculator · ConversionLens