Skip to content
PMCert

A/B test sample size calculator

How many people each variant needs to see, and for how many weeks, for the test to detect the effect that matters.

  • Metrics and experimentation
  • CPXS · domain 3
  • Free, no sign-up
  • PNG · PDF · Markdown · DOCX

See the finished result before you fill anything in.

Example with fictional data

See what the result looks like: A/B test sample size calculator

A made-up case, in the same format the tool delivers. Nothing you have filled in changes.

%

Today's rate for the metric the test wants to move.

%

The smallest change that would justify adopting the variant. The smaller it is, the larger the sample.

Relative: 10% on 4% gives 4.4%. Absolute: 0.5 points on 4% gives 4.5%.

Protects against a false winner. Raising it increases the sample.

The chance of detecting the effect if it really exists.

Two-tailed detects improvement and decline; one-tailed only looks one way.

2 for an A/B test; 3 for A/B/C, and so on.

People entering the experiment per day, across all variants.

Result ready.

A/B test sample size calculatorPMCert

A/B test sample size

To detect a change from 4% to 4.4% (+10% relative).

Per variant
39,475
In total
78,950
Recommended duration
2 weeks
at least 14 days, rounded up to full weeks

Fix the duration before you start and read the result only at the end. Checking every day and stopping at the first nice number multiplies the chance of a false winner.

Parameters

Confidence
95%
Power
80%
Test
Two-tailed (better or worse)
Variants
2

Sensitivity: minimum effect × sample and duration

Minimum effectTarget ratePer variantTotalDuration
+5% relative4.2%154,304308,6088 weeks
+7.5% relative4.3%69,379138,7584 weeks
+10% relative (chosen)4.4%39,47578,9502 weeks
+15% relative4.6%17,94335,8861 week
+20% relative4.8%10,31720,6341 week

What you can detect at each duration

WeeksPer variantSmallest detectable effectTarget rate
1 week21,000+13.8% relative4.55%
2 weeks42,000+9.7% relative4.39%
3 weeks63,000+7.9% relative4.32%
4 weeks84,000+6.8% relative4.27%
6 weeks126,000+5.5% relative4.22%
8 weeks168,000+4.8% relative4.19%

How to read it

  • Per variant: how many people each group needs to receive before you read the result.
  • Full weeks: behaviour changes between weekdays and weekends, so the test runs whole weeks.
  • Power of 80%: if the real effect is the size you chose, the test detects it 80% of the time.
  • Confidence of 95%: with no real effect, the test points to a false winner at most 5% of the time.

Made at pmcert.org/tools

You can edit the result text before exporting.

Download
Share

Get this result by email

We send the result link and what domain 3 of CPXS assesses. You confirm the address before the first email and can leave with one click.

Nothing you type is saved on our server: your work stays in the page address and in this browser. Do not paste confidential data or personal data about customers.

The sample size of an A/B test is the number of people each variant needs to receive so that a difference of the size that matters shows up with the confidence and power set before the test. The calculator uses the classic two-proportion formula and turns the total into full weeks of traffic, so you know whether the experiment fits the deadline before you start.

How to use

  1. Enter the current conversion of the metric the test wants to move.
  2. Set the minimum effect that would justify adopting the variant, relative or in percentage points.
  3. Choose confidence, power, test type and number of variants (the defaults are 95%, 80%, two-tailed and two).
  4. Add the visitors per day entering the experiment to see the duration in full weeks.
  5. Use the sensitivity table to agree the minimum effect and the deadline with the team before you start.

What each field asks for

FieldWhat to enter
Current conversionToday's rate for the metric the test wants to move.
Minimum detectable effectThe smallest change that would justify adopting the variant. The smaller it is, the larger the sample.
Effect typeRelative: 10% on 4% gives 4.4%. Absolute: 0.5 points on 4% gives 4.5%.
Confidence levelProtects against a false winner. Raising it increases the sample.
Statistical powerThe chance of detecting the effect if it really exists.
Test typeTwo-tailed detects improvement and decline; one-tailed only looks one way.
Variants (including control)2 for an A/B test; 3 for A/B/C, and so on.
Visitors per day (optional)People entering the experiment per day, across all variants.

Example

A fictional online shop converts 4% of visitors and wants to test a new product page. The team will only adopt the change if it lifts conversion by at least 10% relative, to 4.4%. With 95% confidence, 80% power and a two-tailed test, each variant needs 39,475 visitors, 78,950 in total. With 6,000 visitors per day in the experiment, that is 14 days: two full weeks. Detecting a 5% effect would take 8 weeks.

When to use

  • Before launching an A/B test, to know whether it finishes within an acceptable time.
  • To decide whether a test is worth running or traffic is too small for the expected effect.
  • To agree with the team on the smallest effect that would change the decision.
  • To explain to anyone asking for a quick result why the test needs more weeks.

Frequently asked questions

What is the minimum detectable effect?

It is the smallest difference between control and variant that the test can detect with the chosen power. Set it by business value: the smallest gain that would pay for the change. The smaller the effect, the larger the sample, and it grows with the square of the reduction.

What is statistical power?

It is the chance that the test detects an effect that really exists. With 80% power, a real effect of the chosen size goes unnoticed 20% of the time. Raising it to 90% reduces that risk and increases the sample.

Why not stop the test as soon as it is significant?

The calculation assumes you read the result once, at the end. Checking every day and stopping at the first significant number multiplies the chance of a false winner. Fix the duration in advance and stick to it.

Why is the duration rounded up to full weeks?

Behaviour changes between weekdays and weekends. A test that covers only part of the week measures a different audience from the real one. Full weeks balance out that effect.

What if traffic is low?

Test bigger changes that produce bigger effects, or choose a more frequent metric closer to the action being tested. If the test still runs past 8 weeks, prefer qualitative methods or a prototype test.

How does the calculation work with more than two variants?

Each variant is compared with the control, and the significance of each comparison is divided by the number of comparisons to keep the overall error at the chosen level. That is why each extra variant increases both the sample per group and the total.

Is this calculator Bayesian or frequentist?

Frequentist: it uses the normal approximation for two proportions, the same formula as the classic statistical references. Bayesian approaches answer a different question (the probability that the variant is better) and also need a sufficient sample to be stable.