This sample size calculator tells you how many visitors or respondents you need before you start. For an A/B test, enter the baseline conversion rate, the smallest lift worth detecting, the significance level and power, and it gives the sample per variant, the total and how many days your traffic needs, with a table comparing effect sizes. For a survey, enter the margin of error and confidence level (and population size if it's small). It also sizes a comparison of two averages. Paste a list of planned tests to size them all. It runs in your browser.
| Relative lift | Variant rate | Per variant |
|---|---|---|
| 5% | 5.25% | 122,124 |
| 10% | 5.5% | 31,234 |
| 20% | 6.0% | 8,158 |
| 30% | 6.5% | 3,780 |
| 50% | 7.5% | 1,471 |
It depends mostly on the baseline rate and the effect. At a 10% baseline, detecting a lift to 12% at 95% significance and 80% power needs about 3,841 visitors per variant.
The smallest change you want the test to reliably detect. Halving it roughly quadruples the sample size.
About 385 for ±5% at 95% confidence in a large population; fewer if the population itself is small.
No. Peeking and stopping early inflates false positives; run to the planned sample size.
No. Everything runs in your browser.
For an A/B test of two proportions, n per variant = (z₁₋α/₂ √(2p̄(1 − p̄)) + z₁₋β √(p₁(1 − p₁) + p₂(1 − p₂)))² ÷ (p₁ − p₂)², where p₂ is the baseline plus the minimum detectable effect (relative or absolute). For a survey, n = z²p(1 − p) ÷ e², with the finite population correction n ÷ (1 + (n − 1)/N). For two means, n per group = 2(zα + zβ)²σ² ÷ δ². Duration = total sample ÷ daily traffic. A comparison table shows n for several effect sizes.