Free calculator

A/B test sample size calculator

Find out how many visitors an A/B test needs and how long to run it. Enter your conversion rate, the smallest lift worth detecting and your daily traffic. No sign-up.

Your test

Minimum detectable effect

The smallest lift worth detecting: 10% to 11%.

Advanced
Test type

Result

Sample size per variant
14,751
Total sample size
29,502
Test duration
25 days

At 1,200 visitors a day across 2 variants, you need about 25 days to detect a 10% relative lift on a 10% conversion rate (10% to 11%).

Run 4 full weeks, which is 28 days. Rounding up to whole weeks covers every day of the week equally, because visitors behave differently on a Tuesday and a Saturday.

Every variant, control included, needs the sample shown per variant. The total is that sample times the number of variants, with no adjustment for comparing several variants.

Duration at other effect sizes

Minimum detectable effectPer variantTotalDuration
5% relative57,763115,52697 days14 weeks
10% relativeYour input14,75129,50225 days4 weeks
15% relative6,69313,38612 days2 weeks
20% relative3,8417,6827 days1 week

Embed this calculator

Paste this code into any page. The calculator loads with the numbers entered above and follows your visitor's light or dark setting.

How the calculator works

The calculator uses the standard formula for comparing two conversion rates, the normal approximation for two proportions. It answers one planning question: how many visitors does each variant need so that a real lift of the size you entered would show up as a significant result?

The formula in words

Start from the baseline rate and the target rate, which is the baseline plus the minimum detectable effect. A relative effect multiplies the baseline (10% plus 10% relative is 11%), and an absolute effect adds percentage points (10% plus 1 point is 11%).

  • Take the normal quantile for your confidence level, split across both tails for a two-sided test, and multiply it by the spread of a conversion rate at the average of the two rates.
  • Take the normal quantile for your statistical power, and multiply it by the combined spread of the baseline and target rates.
  • Add the two, square the sum, and divide by the square of the gap between the two rates. That is the sample size per variant, rounded up to a whole visitor.

The total sample is the per-variant figure times the number of variants, control included. The duration is the total divided by your daily visitors, rounded up to a whole day, and the calculator then rounds it up again to whole weeks. The table under the result repeats the sum at half, one and a half and twice your effect, so you can see what a bigger or smaller target costs in days.

What the estimate assumes

Traffic is split evenly between the variants, every visitor counts once, and the conversion rate holds steady while the test runs. With three or more variants the calculator makes no adjustment for comparing several variants at once. Treat the result as a plan, not a promise: if your traffic or conversion rate moves, run the numbers again.

How this relates to Bayesian testing

This calculator is a frequentist planning estimate. Split Test Pro reads its results the Bayesian way: it gives the probability that each variant is the best, updated as the data arrives, so a test needs no fixed sample size before it can show a result. A planned length still helps. It tells you whether a test is worth running on your traffic at all, and it keeps you from stopping a test early because of a lucky first few days.

Whichever way you read the result, the same habits hold. Run every test for at least 7 days. Treat 300 to 500 visitors per variant as a starting point, and wait for 1,000 or more on high-stakes decisions. Split Test Pro also waits for ten conversions in every variation, control included, before it names a winner.

Once your test has data, check it with the Bayesian A/B test calculator. For the full explanation of the model, read our guide to Bayesian A/B testing.

Frequently asked questions

  • What is a minimum detectable effect?
    The minimum detectable effect, or MDE, is the smallest lift you want the test to be able to detect. A 10% relative MDE on a 5% conversion rate means detecting a change from 5% to 5.5%. A 1 point absolute MDE means 5% to 6%. The smaller the effect, the more visitors the test needs.
  • Why is the sample size given per variant?
    Every version of the page, control included, has to collect enough visitors on its own for the comparison to hold. The total sample is the per-variant figure times the number of variants, and the duration is that total divided by your daily visitors.
  • Why round the test up to whole weeks?
    Visitors behave differently on different days of the week. A test that runs for whole weeks sees each day of the week the same number of times, so a busy weekend or a quiet Monday cannot tip the result. Run every test for at least 7 days, even on a high-traffic page.
  • What changes when I add more variants?
    Each extra variant needs the same sample as the others, so the total sample and the test duration grow with every variant you add. This calculator makes no adjustment for comparing several variants at once, so the sample per variant stays the same.
  • Should I use a one-sided or a two-sided test?
    A two-sided test looks for a difference in either direction. A one-sided test only looks for an increase, so it needs fewer visitors: one-sided at 95% confidence gives the same sample size as two-sided at 90%. The calculator uses two-sided unless you change it under Advanced.
  • How does this relate to Bayesian A/B testing?
    This calculator gives a frequentist planning estimate. Split Test Pro reads results the Bayesian way, so a test needs no fixed sample size before it can show a result. A planned length is still useful: it tells you whether a test is worth running on your traffic, and it keeps you from stopping a test early.

Run better tests.
Win more often.

Start your free trial and see the difference.

  • No credit card
  • 14-day free trial