Sample Size Calculator

Work out how many visitors each variant of an A/B test needs to detect a given lift in conversion rate at your chosen confidence and power — and how long that takes at your traffic.

%
%

The smallest relative lift worth detecting — 10% means 3.0% → 3.3%

%
%
Visitors per variant53,211
Total visitors (2 variants)
106,422
Test duration at your traffic · days
27
Variant rate you are testing for
3.3%

Results update as you type. Values are kept in the URL, so you can share or bookmark this exact calculation.

Formula

n per variant = (z₁₋α/₂ · √(2·p̄(1−p̄)) + z₁₋β · √(p₁(1−p₁) + p₂(1−p₂)))² ÷ (p₂ − p₁)²
p₁ = baseline rate, p₂ = p₁ × (1 + MDE), p̄ = (p₁ + p₂) ÷ 2
Duration (days) = Total sample ÷ Daily visitors

How to read Sample Size

Sample size is the price of certainty. The smaller the lift you want to detect and the lower your baseline conversion rate, the more visitors you need — and the relationship is quadratic, so halving the minimum detectable effect roughly quadruples the sample. This calculator uses the standard two-proportion z-test formula that most experimentation platforms implement.

Two rules keep tests honest: decide the sample size before you start, and do not stop early because the result looks good. Peeking at a running test and stopping at the first significant reading inflates the false-positive rate far above the 5% you think you are accepting.

Frequently asked questions

What confidence and power should I use?
95% confidence and 80% power are the conventional defaults and what most tools assume. Raising either increases the required sample. If a wrong decision is cheap and reversible, 90% confidence is defensible; if it drives a large permanent change, stay at 95% or higher.
Is the minimum detectable effect relative or absolute?
Relative. A 10% MDE on a 3% baseline means you are sizing the test to detect a move to 3.3%, not to 13%. Absolute lifts of that size would need far fewer visitors.
My test needs 90 days. What now?
Either accept a larger MDE (test bigger changes), move the test to a higher-traffic page or step in the funnel, or use a metric closer to the change (clicks on the element rather than purchases). Tests longer than four to six weeks also start to suffer from cookie churn and seasonality.
Does this work for more than two variants?
The per-variant number holds for each additional variant, but you should tighten the confidence level to correct for multiple comparisons — with three variants against control, use roughly 98% instead of 95%.