A/B test sample size calculator
Estimate how many visitors each variant needs to detect a chosen change in conversion rate.
A clear answer. Here’s how.
Sample size per variant n = (z₍α₎ √(2p̄q̄) + z₍β₎ √(p₁q₁ + p₂q₂))² ÷ (p₁ − p₂)², where p̄ is the mean of the two rates, rounded up, for an equal split and a two-proportion z test. z₍α₎ uses α ÷ 2 for a two-sided test. The effect may be absolute (percentage points) or relative. This is a fixed-sample plan; sequential methods and multiple variants need different sizing.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- Baseline conversion rate (%)
- 10
- Smallest change worth detecting
- 2
- The change is
- Percentage points (absolute)
- Significance level α (%)
- 5%
- Power (%)
- 80%
- Test
- Two-sided
- Eligible visitors per day
- 1000
Example result
- Baseline conversion rate
- 10.00%
- Target conversion rate
- 12.00%
- Visitors per variant
- 3,841
- Visitors in total (two variants)
- 7,682
- Days at 1,000 eligible visitors a day
- 8
n = (z₍α₎·√(2p̄q̄) + z₍β₎·√(p₁q₁ + p₂q₂))² ÷ (p₁ − p₂)², rounded up, for an equal split and a two-proportion z test. Smaller effects need far more traffic: halving the effect roughly quadruples the sample. Run whole weeks to even out weekday effects.