A/B Test Sample Size and Duration Calculator

Work out how many visitors an A/B test needs and how many weeks to run it, for any baseline, effect, confidence and power. Handles several variants and uneven splits, and shows the smallest lift you can detect if you only have a set number of weeks.

Live v1.0 · November 2026 Free · No signupFormula shownNothing sent
Test plan Two-proportion power
What you are testing
The control’s rate today.
The smallest change worth detecting.
Statistics
Traffic
“equal”, or a % such as 50 or 90.
Calculated in your browser · nothing is sent
Test plan ·

Press Calculate.

What this sample size calculator does differently

A sample size calculator answers one question: how many visitors a test needs before its result means anything. The ones that rank answer it with a single number and no working. This one shows the formula, handles the cases that change the answer, and turns it into a duration you can put in a plan.

OmniconvertCXLUnbounceThis tool
Method shownNoNoNoFormula with your numbers
Effect as relative or absoluteRelative onlyBothRelativeBoth
Several variantsNo variant countCount taken, effect not explainedCount taken, effect not explainedUp to four, Bonferroni shown
Uneven split, such as 90/10NoNoNoYes, with the extra traffic it costs
DurationWeeksWeeksDays, after an email formDays, rounded up to whole weeks
What can I detect in N weeks?NoNoNoTable for 1 to 12 weeks
ExportNoneNoneNoneCSV, Markdown plan, share link

Calculator pages as fetched on 1 November 2026. Anything not shown or described on the page is not counted.

How the sample size is calculated

The calculator uses the standard normal-approximation formula for comparing two conversion rates, the same family of test the A/B test significance calculator uses to read the result. Four inputs drive it:

  • Baseline conversion rate. What the control converts at today. Lower rates need more visitors, because each visitor carries less information.
  • Minimum detectable effect (MDE). The smallest change you want the test to be able to see. This input matters most: the sample size grows with the inverse square of the effect, so halving the MDE needs roughly four times the visitors.
  • Confidence level. How often you accept a false winner when there is no real difference: 5% of the time at 95% confidence.
  • Power. How often the test detects the effect when it is real. At 80%, a real lift of exactly your MDE is missed one time in five.

The formula, with your numbers filled in, is under “Method and formula” in the result.

Choosing the minimum detectable effect

Pick the MDE from the business, not from the statistics. Ask what lift would make the change worth shipping and maintaining, and test for that. Choosing a tiny MDE because any improvement would be nice produces a test that needs more traffic than you have.

Most teams start from the other end: they know how long they can run a test. The week-by-week table answers that directly. Read down to the number of weeks you can afford and it shows the smallest lift that test could reliably detect. If that lift is larger than anything the change could plausibly produce, the test is not worth running as designed: test a bolder change, or measure a step with a higher conversion rate, such as clicks to the pricing page rather than purchases.

Duration: whole weeks, and one read at the end

The duration is rounded up to whole weeks so every day of the week appears the same number of times. Weekday and weekend visitors often behave differently, and a test that runs Monday to Thursday measures a different audience from one that runs a full week.

Fix the duration before starting, then read the result once. Evan Miller’s How Not To Run an A/B Test showed that checking a test after every visitor and stopping at the first significant reading turns a nominal 5% false positive rate into 26.1%. The sample size from this page is only valid if you wait for it.

More than one variant, and uneven splits

Every extra variant adds a comparison, and every comparison is another chance of a false winner. The Bonferroni correction divides the significance level by the number of comparisons, which raises the visitors each group needs. Extra variants also split the same traffic more ways. Together, going from one variant to three can more than double a test’s duration, so add them only when each one tests a genuinely different idea.

An uneven split, such as sending 90% of traffic to the control to limit risk, also costs traffic. The comparison is limited by the smaller group, so the total needed is larger than with an even split. The calculator shows the difference when you enter a control share.

How to plan an A/B test with this calculator

  1. Find your baselineTake the control’s conversion rate from the last few full weeks, for the same page and audience the test will use.
  2. Choose the effect worth detectingSet the smallest lift that would make the change worth shipping, as a relative lift or in points.
  3. Set confidence and power95% confidence and 80% power are the usual starting point. Raise them when a wrong call is expensive.
  4. Enter your trafficVisitors per day or week, the share that will enter the test, and the split.
  5. Check the weeksUse the week-by-week table to see whether the test fits the time you have. If not, change the test, not the statistics.
  6. Read once at the endRun for the whole duration, then enter the totals in the significance calculator.

Frequently asked questions

Enter your baseline conversion rate, the smallest lift worth detecting, a confidence level and power. The calculator applies the standard two-proportion formula and returns the visitors needed in each group, the total and the duration for your traffic.
The smallest change in conversion rate the test is designed to detect reliably. Real effects smaller than it may be missed. It can be stated as a relative lift, such as 10%, or in percentage points, such as 0.5.
At a 5% conversion rate, detecting a 10% relative lift with 95% confidence and 80% power needs about 31,000 visitors per group, roughly 62,000 in total. Higher conversion rates or larger effects need far fewer.
Until it reaches the sample size planned before it started, rounded up to whole weeks so each weekday is represented. Do not stop early because the result looks significant.
80% is the usual minimum, meaning a real effect of your MDE is detected four times out of five. Use 90% when missing a real improvement would be costly.
Yes. Each variant adds a comparison, and correcting for several comparisons raises the visitors each group needs. More groups also split the same traffic, so the duration grows faster than the per-group figure.
The comparison is only as precise as the smaller group allows. With 10% of traffic in the variant, that group fills slowly, so the test needs more visitors in total than a 50/50 split to reach the same power.
Conversion rates, where each visitor converts or does not. Revenue per visitor or average order value needs the variance of your data and a different formula.