A/B test sample size calculator.

Enter your conversion rate and the smallest lift worth detecting. You get the visitors each version needs and how many weeks the test should run at your traffic.

Chance of detecting the lift if it's real.

How the sample size is calculated

  1. Target rate: p2 = p1 × (1 + lift), where p1 is your current conversion rate.
  2. Visitors per version: n = (z₁₋α/2 · √(2·p̄·(1−p̄)) + z₁₋β · √(p1(1−p1) + p2(1−p2)))² ÷ (p2 − p1)², where p̄ = (p1 + p2) ÷ 2.
  3. With more than two versions, α is divided by the number of comparisons with the control.
  4. The result is never below 300 visitors per version.
  5. Duration = visitors per version × versions ÷ (daily visitors × share in the test), rounded up to whole weeks, with a minimum of 7 days.

Worked example: a 3% conversion rate and a 20% lift at 95% confidence and 80% power need 13,914 visitors per version. With 1,000 visitors a day split across two versions, that is 28 days.

Plan for the lift you can get

Across 450 tests run on Stellar, the median test had 2,016 visitors per version and ran 57 days, and the median lift of the best variant over the control was +1.0%. Big lifts are rare, so a plan built on a 30% lift usually ends without an answer. See the A/B testing benchmarks and how long to run an A/B test.

Already have results? Use the A/B test significance calculator, or the combined A/B test calculator to plan and analyze in one place.

Frequently Asked Questions