A/B sample size calculator
How many visitors per variant you need, and how many weeks that takes at your traffic.
Test design
What you need
Two-sided test for two proportions with the normal approximation. It assumes a fixed sample read once at the end. For tiny baselines or very small samples, use a method designed for them.
How to use the result
Treat the sample size as a price list. If the visitors per variant are more than you can collect in a reasonable time, increase the lift you are testing for, test a metric earlier in the funnel, or decide without a test and record a baseline. Decide the end date now; do not stop early because a chart looks good.
Formula: n per variant = (zα/2·√(2·p̄·q̄) + zβ·√(p₁q₁ + p₂q₂))² ÷ (p₂ − p₁)², where p̄ is the average of the two rates.
Related reading
MeasurementA/B testing and its limits when your sample is small
Why many A/B tests are underpowered, how peeking and multiple comparisons mislead, and what to do when traffic is too low for a clean test.
MeasurementHow to write a marketing hypothesis that can fail
A hypothesis is only useful if a result could prove it wrong. A four-part template with a worked structure, common traps and a decision rule.
ProductSaaS landing pages: ten questions to ask before a redesign
A review list for SaaS landing pages: promise, audience, proof, friction and measurement. Turn opinions into testable changes.