Sample Size Calculator

See how many visitors your A/B test needs to detect a lift at your chosen confidence.

Enter your current conversion rate and the smallest lift worth detecting, and see how many visitors each variant of your A/B test needs.

How it works

Before an A/B test starts you need to know how long to run it. This calculator uses the standard two-proportion power analysis: given your baseline conversion rate, the minimum detectable effect (the smallest relative lift you care about), a confidence level, and statistical power (default 80%), it returns the visitors required per variant.

Formula: n = (zα/2 + zβ)² x (p₁(1-p₁) + p₂(1-p₂)) / (p₂ - p₁)², with p₂ = p₁ x (1 + MDE).

Smaller lifts and higher confidence need dramatically more traffic; that trade-off is the whole game of test planning.

Advanced options add the statistical power choice (80% or 90%) and a test-duration estimate from your daily traffic.

Everything runs in your browser. Your numbers are never sent to a server, and there is no signup or limit. Your last entries are remembered locally so the calculator is ready next time.

Frequently asked questions

How many visitors do I need for an A/B test?

It depends on three things: your current conversion rate, the smallest lift you want to reliably detect, and how certain you want to be. Detecting a 20% relative lift on a 5% baseline at 95% confidence and 80% power needs roughly 8,200 visitors per variant, about 16,400 in total.

What is the minimum detectable effect (MDE)?

The smallest relative improvement worth acting on. An MDE of 20% on a 5% baseline means you want to detect a move to 6%. Choosing a smaller MDE catches subtler wins but requires far more traffic, halving the MDE roughly quadruples the sample size.

What does statistical power mean?

The probability the test detects the lift when it truly exists. The convention is 80%: if the real effect matches your MDE, four tests in five will find it. Raise power to 90% (in Advanced options) for more sensitivity at the cost of more traffic.

Why should I fix the sample size before the test?

Peeking at results and stopping the moment significance appears inflates false positives badly, many "winners" evaporate. Calculate the sample size first, run until you reach it, then read the result once (our A/B Test Calculator checks the significance).

How long will my test take?

Turn on Advanced options and enter your daily test traffic; the calculator divides the total sample across it. As a rule of thumb, also run at least one full week (ideally two) so day-of-week effects average out.