Skip to content
ENExplore Calculators

A/B Test Sample Size Calculator

Calculate the sample size needed per variant to detect a given lift.

About A/B Test Sample Size Calculator

Sample size scales with the inverse square of the absolute lift, so detecting small lifts on low baseline rates requires enormous samples. Halving the detectable lift quadruples the requirement. Most A/B tests are stopped far too early to detect the lifts they claim, which is why fixing sample size before starting is essential.

Formula

A/B Test Sample Size

n per variant = (z_α√(2p̄q̄) + z_β√(p₁q₁ + p₂q₂))² ÷ (p₂ − p₁)²

minimum detectable effect
Smallest lift the test can reliably detect
relative lift
Percentage change against the baseline, not percentage points

Worked example

With the default values below, A/B Test Sample Size Calculator returns Sample Size per Variant of 31,243. Change any input above and every figure here is recalculated in your browser.

Inputs used

Baseline conversion rateaccepts 0.01–99 %
5 %
Minimum detectable relative liftaccepts 0.1–200 %
10 %
Significance levelaccepts 0.1–20 %
5 %
Statistical poweraccepts 50–99 %
80 %

Results

Sample Size per Variant
31,243
Total Sample Size
62,486
Target Conversion Rate
5.5000%
Absolute Lift Being Detected
0.5000%
Conversions Needed per Variant
1,563

Step by step

  1. 1Values used
  2. 2A/B Test Sample Size
  3. 3Sample Size per Variant= 31,243
  4. 4Total Sample Size= 62,486
  5. 5Target Conversion Rate= 5.5000
  6. 6Absolute Lift Being Detected= 0.5000
  7. 7Conversions Needed per Variant= 1,563

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 4 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

How is A/B Test Sample Size calculated?

n per variant = (z_α√(2p̄q̄) + z_β√(p₁q₁ + p₂q₂))² ÷ (p₂ − p₁)² Sample size scales with the inverse square of the absolute lift, so detecting small lifts on low baseline rates requires enormous samples. Halving the detectable lift quadruples the requirement.

Why does A/B Test Sample Size matter?

Most A/B tests are stopped far too early to detect the lifts they claim, which is why fixing sample size before starting is essential.

What values do I need to enter?

This calculator takes 4 inputs: Baseline conversion rate, Minimum detectable relative lift, Significance level, Statistical power. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

A/B Test Sample Size Calculator | Calcrivo