A/B Test Sample Size Calculator: Users per Variant, Test Duration
How many users each variant needs before you can trust the result (two-sided test, two proportions).
How it works
The calculator uses the standard two-proportion formula: n per variant = (z(alpha/2) x sqrt(2 x p x q) + z(beta) x sqrt(p1 x q1 + p2 x q2))^2 / (p2 - p1)^2, where p1 is your baseline, p2 is the baseline plus the effect you want to detect, and p and q are their averages. Higher confidence and power, a lower baseline or a smaller effect all need more users. Duration is the total users divided by your daily eligible visitors; round up to whole weeks so every weekday is covered.
Decision aid only. Check the formula against your own definitions, and have your finance, risk or compliance team confirm anything that goes into a disclosure or a decision.
Frequently asked questions
What is the minimum detectable effect?
It is the smallest relative change in the metric that would matter to the business. If a 2% lift would not change your decision, do not design the test to detect it, because the sample you need grows quickly as the effect shrinks.
Why should a test run at least a week?
User behaviour changes across the week. A test that covers only some weekdays can show a difference that is really a weekday effect. Full weekly cycles make the comparison fair.
More free tools

Analytics Event Name Checker: object_action, snake_case, Past Tense
Paste your event names and check them against object_action, snake_case, past-tense naming rules, with suggested fixes.
Open the calculator →
RICE and ICE Prioritisation Calculator: Score and Rank Ideas
Score and rank product ideas with RICE or ICE, then copy the ranked table into your doc.
Open the calculator →
A/B Test Significance Calculator: p-value, Uplift, 95% Interval
Check whether the difference between control and variant is real, with p-value, uplift and a 95% interval.
Open the calculator →Want a second pair of eyes on your PRD or career?
I offer mock interviews, resume reviews and product guidance for product managers.
Book a session