Skip to content
toolstome

A/B test sample size calculator

Find out how many visitors an A/B test needs before you start it, so you don't stop too early and ship a change that was only noise. Enter your current conversion rate and the smallest lift worth detecting, choose the significance level and power, and the calculator gives the sample size per variant and in total. Add your daily traffic to see how many days the test should run. It uses the standard two-proportion z-test formula that most testing tools use for planning.

Free · No sign-upProcessed in your browser

Effect is

Significance (α)

Power (1 − β)

Enter a baseline conversion rate and the effect you want to detect.

How to use the A/B Test Sample Size Calculator

  1. 1

    Enter the baseline conversion rate

    Type your current conversion rate in %, e.g. 3.5 for 3.5% of visitors converting.

  2. 2

    Enter the minimum detectable effect

    Type the smallest change worth detecting, as a relative lift (+20% of the baseline) or in percentage points.

  3. 3

    Choose significance and power

    5% significance and 80% power are the usual defaults; stricter settings need more visitors.

  4. 4

    Add variants and traffic

    Enter the number of variants including the control, and daily visitors to estimate the duration.

How the sample size is calculated

For two conversion rates p₁ (control) and p₂ (variant), the sample size per group for a two-sided test is the standard formula from Fleiss, Levin and Paik. z values come from the normal distribution: 1.96 for 5% significance (two-sided) and 0.84 for 80% power.

Smaller effects need far more visitors: halving the effect you want to detect roughly quadruples the sample size.

  • n = (z₁₋α/₂ · √(2p̄(1−p̄)) + z₁₋β · √(p₁(1−p₁) + p₂(1−p₂)))² ÷ (p₂ − p₁)²
  • p̄ = (p₁ + p₂) ÷ 2
  • days = n × variants ÷ daily visitors

When to use it

  • Decide whether an A/B test is worth running with your current traffic.
  • Set a fixed sample size before starting, so you don't stop the test early.
  • Explain to stakeholders why a test needs to run for several weeks.

Limits

  • It assumes a fixed-horizon test analysed once at the end, not sequential testing or Bayesian methods.
  • With more than two variants it does not adjust significance for multiple comparisons; use a stricter significance level if you compare many variants.
  • Run tests for whole weeks where possible: weekday and weekend behaviour often differ.

Privacy

All calculations run in your browser. Nothing you type is sent anywhere.

Frequently asked questions

What is the minimum detectable effect?

The smallest real change in conversion rate the test can reliably detect. A relative MDE of 20% on a 10% baseline means detecting a move to 12%.

Relative or absolute effect?

Relative is a percentage of the baseline (10% → 12% is +20%). Absolute is in percentage points (10% → 12% is +2 points). Both give the same sample size for the same target rate.

What do significance and power mean?

Significance (α) is the chance of declaring a winner when there is no real difference; 5% is standard. Power is the chance of detecting a real effect of your MDE; 80% is standard.

Why does my test need so many visitors?

Small baseline rates and small effects are hard to tell apart from random variation. Testing bigger changes, or a step higher in the funnel with more conversions, needs fewer visitors.

Can I stop the test as soon as it is significant?

Not with this method. Checking repeatedly and stopping at the first significant result inflates false positives. Decide the sample size first and analyse at the end.

Is the sample size per variant or in total?

Both are shown. The per-variant number applies to the control and to each variant; the total is that times the number of variants.

Does it work for revenue per visitor?

No. It is for conversion rates (yes/no outcomes). Revenue or time-on-page tests need a formula based on the standard deviation of the metric.

People also use

Last updated November 21, 2026 · How we build and test our tools

Categories

Recently used tools

Tools you open will appear here.

More