A/B Test Sample Size Calculator
Plan equal-size test groups for a specified relative lift at 95% confidence and 80% power.
Your numbers
Example values are prefilled. Use the same reporting period for all inputs.
Target variant conversion rate
6%
Participants per arm
8,158
Total participants
16,316
Traffic-based minimum duration
9 days
Also allow complete business cycles and conversion delays
The formula
Let p1 = Baseline, p2 = p1 × (1 + Relative lift), and p̄ = (p1 + p2)/2. Per-arm n = ceil([(1.95996√(2p̄(1−p̄)) + 0.84162√(p1(1−p1)+p2(1−p2))) / (p2−p1)]²). Percentages use decimal fractions.
Worked example
A 5% baseline and 20% relative lift imply a 6% variant rate. The approximation needs about 8,158 participants per arm (16,316 total), or at least 9 traffic days at 2,000 eligible participants per day.
Frequently asked
What design does this support?
A two-sided, fixed-horizon comparison of independent binary outcomes, equal 50/50 allocation, 5% significance, and 80% power. It excludes continuity correction, clustering, multiple testing, and sequential analysis. Very sparse or extreme-rate data need a more specialized design.
