A/B test sample size calculator
Find how many visitors each version of an A/B test needs, and how many days the test must run, before you can trust the result.
- Free
- No sign-up
- Runs in your browser
- Share the result with a link
Your test
How it is calculated
The standard two-proportion formula: n = (zα/2·√(2p̄(1−p̄)) + zβ·√(p₁(1−p₁)+p₂(1−p₂)))² ÷ (p₂ − p₁)², where p₁ is today's conversion rate, p₂ the rate you want to detect and p̄ their average. Two-sided test.
- Visitors are split evenly between versions.
- Each visitor counts once, and conversions are independent.
- With more than two versions no correction for multiple comparisons is applied; be stricter with confidence.
What to do with the result
- Decide the length before you start and do not stop early because one version looks ahead.
- Run whole weeks so weekday and weekend behaviour are both included.
- If the test needs months, test a bolder change or a step with more traffic.
Questions people ask
Why does a small lift need so many visitors?
The smaller the difference, the more data it takes to tell it apart from random noise. Halving the lift you want to detect roughly quadruples the sample.
Can I stop the test as soon as it is significant?
No. Checking every day and stopping at the first significant result makes false wins far more likely. Run it to the planned sample size.
The metrics behind it
Definitions, formulas and SQL for each number used here.
- Useful for
- E-commerce
- Gaming
- MarTech & AdTech
Want this number from your real data, every week?
We build it into your data and dashboards so nobody fills in a calculator again. See Product & funnel analytics.