Plan a test

A/B test sample size and duration calculator

Find out how many visitors each variant needs, how many weeks the test will run, and the smallest lift your traffic can detect.

Your test

%
The current conversion rate of the control experience.
Minimum detectable effect
%
The smallest lift worth detecting. Relative +10% on a 4% baseline means 4.4%.
%

Test plan

Two-sided z-test

—visitors per variant

Total visitors
—
Days at your traffic
—
Run it for
—
Target rate
—

Fill in your test to see the plan.

What your traffic can detect

Run timeVisitorsSmallest liftTarget rate

        

How to choose the inputs

  • Baseline conversion rate. Use the last two to four weeks for the exact page and audience in the test, not your sitewide average.
  • Minimum detectable effect. Pick the smallest lift that would change a decision. Smaller effects need far more traffic: halving the effect roughly quadruples the sample.
  • Daily visitors and share in test. Count visitors who actually reach the tested experience. If only half your traffic is enrolled, set the share to 50%.
  • Confidence and power. 95% confidence and 80% power are the common defaults. Raise power to 90% for tests you can't easily repeat.

Run whole weeks

Weekday and weekend visitors behave differently, so the plan rounds up to full weeks. Decide the run time before you launch and stop on that date. Checking every day and stopping at the first significant result inflates false positives.

The formula

Visitors per variant for a two-sided test of two proportions, where p₁ is the baseline and p₂ is the target rate:

n = ( z₁₋α/₂ · √(2·p̄·(1−p̄)) + z₁₋β · √(p₁(1−p₁) + p₂(1−p₂)) )² ÷ (p₂ − p₁)² p̄ = (p₁ + p₂) / 2

With more than one challenger and the correction on, α is divided by the number of comparisons against control. Total visitors are n times the number of variants.

Different calculators use slightly different approximations, so expect small differences from other tools.

Loupe · early access

Bring this plan to your weekly check-in.

Loupe tracks each running test against its planned sample, so your roundtable knows what's ready to call and what needs more time.

Join the waitlist
Testloop Labs consulting

Not sure what to test next?

A funnel and experimentation audit finds where people drop off, ranks the fixes by impact, and writes up your first experiments. From $2,000.

See the audit