Sample Size Calculator
Plan experiments and surveys that can actually detect what you care about, before you spend the traffic or the budget.
A/B test sample size
Survey sample size
Use 50% expected proportion when unsure. It gives the most conservative (largest) sample.
How the numbers are calculated
A/B tests: for baseline rate p1 and target rate p2, the required sample per variant is n = [z1−α/2√(2p̄(1−p̄)) + z1−β√(p1(1−p1)+p2(1−p2))]² / (p2−p1)², where p̄ is the average of the two rates. This is the standard two-sided test for two proportions. With more than two variants, the optional Bonferroni correction divides α by the number of comparisons against control.
Surveys: n₀ = z²·p(1−p)/e², adjusted for a finite population N with n = n₀/(1+(n₀−1)/N). Divide by the response rate to get the number of people to invite.
Choosing a minimum detectable effect
The MDE is the smallest improvement worth detecting, not the improvement you hope for. Halving the MDE roughly quadruples the sample size, so be realistic. For low-traffic sites, test bolder changes.
Once your test finishes, analyse it with the A/B Test Calculator.