How to use this calculator
Estimate how many visitors each arm needs to compare two conversion rates at a chosen significance and power.
- Enter Control conversion rate (%), Variant conversion rate to detect (%), Significance level α (%), Statistical power (%). Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
How this calculation works
This planning tool estimates equal-sized groups for a two-sided comparison of independent conversion proportions. Enter a baseline rate and the smallest variant rate worth detecting; a small difference needs substantially more observations.
Inputs and units
control— Control conversion rate (%)- Observed or expected control rate, strictly between 0% and 100%.
variant— Variant conversion rate to detect (%)- The smallest alternative rate you want the experiment to detect.
alpha— Significance level α (%)- Two-sided type-I error probability used for planning.
power— Statistical power (%)- Probability of detecting the specified difference when it is present.
Formula
n per arm = [z(1−α/2)√(2p̄(1−p̄)) + z(1−β)√(p₁(1−p₁)+p₂(1−p₂))]² / (p₂−p₁)², rounded up; p̄=(p₁+p₂)/2.
Method
Convert the entered percentages to proportions, calculate the standard-normal quantiles for the selected two-sided significance level and power, then apply the normal approximation for two independent proportions. The reported total is twice the rounded per-arm count.
Worked example
For a 5% control rate, a 6% variant rate, 5% two-sided significance, and 80% power, the normal approximation needs 8,158 visitors per arm (16,316 total).
Assumptions and limits
Assumes independent visitors, equal allocation, a fixed two-arm test, and a normal approximation. It does not account for repeated peeking, multiple variants, clustering, bot traffic, or baseline-rate drift. Use a prespecified test plan and a suitable inferential method for the final analysis.
Frequently asked questions
Why does a one-point lift require so many visitors?
The sample requirement grows roughly with the inverse square of the rate difference, so small effects need much larger groups.
Does this tell me when to stop a test?
No. It estimates a target sample under fixed assumptions; it is not a sequential stopping rule.
What does 80% power mean?
If the assumed variant difference is real and the model assumptions hold, the design detects it about 80% of the time.
Can I use unequal traffic allocation?
This page assumes equal group sizes. Unequal allocation generally needs more total observations and a separate calculation.
How do I use the A/B conversion test sample size calculator?
Enter Control conversion rate (%), Variant conversion rate to detect (%), Significance level α (%), Statistical power (%). Match the units shown beside each field and review the result together with the assumptions below.
Reference: statsmodels technical reference for two-proportion test power. See our calculation methodology.