Free calculator · Metrics & Experiments

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).

Free, no sign-up. Runs in your browser; nothing you type is sent anywhere.

-users per variant
-users in total
-days to run
-variant rate to detect

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

See all free PM tools →

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