Skip to content
MoneyDeck

A/B Test Sample Size Calculator

Know how many visitors and days your split test needs before you launch

Updated · Free, no signup

%

Current conversion rate of the control (A).

%

Relative: 10 means 5% → 5.5%. Absolute: 1 means 5% → 6%.

Visitors needed per variant

31,234

Total visitors needed

62,468

Estimated test duration

63 days

Total visitors ÷ daily visitors, rounded up. Run whole weeks where possible.

Variant conversion rate to detect

5.5%

Absolute difference

0.5%

In percentage points.

Expected control conversions

1,562

Conversions the control should record at the required sample size.

  • To detect a move from 5% to 5.5% you need 31,234 visitors in each of 2 variants.
  • At 1,000 visitors a day this takes 63 days — consider a larger effect size, fewer variants or more traffic.

Visitors per variant at different effect sizes

About the A/B Test Sample Size Calculator

This A/B test sample size calculator tells you how many visitors each variant needs before a split test can reliably detect the lift you care about. Enter your current (baseline) conversion rate, the smallest improvement worth detecting — the minimum detectable effect, or MDE — your significance level and statistical power, and it returns the sample size per variant, the total traffic required and how many days the test will take at your daily traffic.

It is meant for growth marketers, product managers, CRO specialists and anyone running landing-page, email or pricing experiments. Sizing a test up front prevents the two most common mistakes: stopping early on a random spike (a false positive) and running an underpowered test that could never have detected a realistic lift.

The calculation uses the standard normal-approximation formula for comparing two proportions, with traffic split evenly across variants. It assumes each visitor is counted once and conversions are independent. If you test more than two variants, each comparison against control needs this many visitors, so total traffic rises with every variant you add.

With the default inputs, the visitors needed per variant is 31,234. Change any value above to recalculate instantly.

How to use the a/b test sample size calculator

  1. 1Enter the control’s current conversion rate from your analytics.
  2. 2Choose relative or absolute effect and enter the smallest lift worth detecting.
  3. 3Pick a confidence level (95% is standard) and power (80% is standard).
  4. 4Set the number of variants and the daily visitors that will enter the test.
  5. 5Read the visitors per variant and duration, then commit to that sample before looking at results.

Formula and method

n = [z₁₋α/₂ × √(2p̄(1 − p̄)) + z₁₋β × √(p₁(1 − p₁) + p₂(1 − p₂))]² ÷ (p₂ − p₁)²

The sample size per variant comes from the two-proportion z-test. p₁ is the baseline conversion rate and p₂ the rate you want to be able to detect (baseline × (1 + relative MDE), or baseline + absolute MDE). p̄ is their average, used for the pooled variance under the null hypothesis. z₁₋α/₂ is the normal critical value for your significance level (1.96 for 95% two-sided; a one-sided test uses z₁₋α) and z₁₋β is the value for your power (0.84 for 80%).

The result is rounded up to whole visitors and multiplied by the number of variants for total traffic. Duration is total traffic divided by daily visitors entering the experiment. Smaller effects need dramatically more traffic: halving the MDE roughly quadruples the sample size, because n scales with 1 ÷ (p₂ − p₁)².

n
Visitors needed in each variant
p₁
Baseline (control) conversion rate
p₂
Variant conversion rate you want to detect
p̄
Average of p₁ and p₂
α
Significance level (1 − confidence)
β
Type II error rate (1 − power)

Worked examples

5% baseline, detect a 10% relative lift

Moving from 5% to 5.5% is a small absolute change (0.5 points), so at 95% confidence and 80% power each variant needs 31,234 visitors. With two variants that is 62,468 visitors, or 63 days at 1,000 visitors a day.

3% baseline, detect a 20% relative lift

Looking for a 3% → 3.6% lift needs 13,914 visitors per variant. Doubling the detectable effect from a 10% to a 20% lift on the same baseline cuts the sample to roughly a quarter, so the test finishes in 28 days.

10% baseline, 2-point absolute lift at 90% power

Detecting 10% → 12% with 90% power needs 5,142 visitors per variant. Higher power increases the sample, but the large absolute difference keeps the test short at 11 days.

One-sided test at 90% confidence

A one-sided test at 90% confidence uses a critical value of 1.28 instead of 1.96, so detecting 2% → 2.3% needs 21,074 visitors per variant — far fewer than a two-sided 95% test would require.

Frequently asked questions

What is a minimum detectable effect (MDE)?+

The MDE is the smallest true difference between variants that your test is designed to detect reliably. A smaller MDE needs a much larger sample; choose the smallest lift that would actually change your decision or pay for the change.

What do 95% confidence and 80% power mean?+

95% confidence means a 5% chance of declaring a winner when there is no real difference (false positive). 80% power means an 80% chance of detecting the MDE if it truly exists, so a 20% chance of missing it (false negative).

How long should I run an A/B test?+

Until each variant reaches the required sample size, and ideally for whole weeks (at least one, usually two) so weekday and weekend behaviour are both represented. Stopping as soon as a result looks significant inflates false positives.

Should I use a one-sided or two-sided test?+

A two-sided test detects both improvements and declines and is the safer default. A one-sided test needs fewer visitors but only answers whether the variant is better, so a harmful change can go unnoticed as “not significant”.

Does testing more variants need more traffic?+

Yes. Each variant needs the per-variant sample, so total traffic grows with every variant. With many comparisons you should also tighten the significance level (for example with a Bonferroni correction) to avoid false winners.

Why is my required sample size so large?+

Low baseline conversion rates and small effects both drive the sample up, because the difference you are trying to see is small relative to random noise. Testing bolder changes or a higher-converting step of the funnel shortens tests.

Related tools