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.
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.
| Omniconvert | CXL | Unbounce | This tool | |
|---|---|---|---|---|
| Method shown | No | No | No | Formula with your numbers |
| Effect as relative or absolute | Relative only | Both | Relative | Both |
| Several variants | No variant count | Count taken, effect not explained | Count taken, effect not explained | Up to four, Bonferroni shown |
| Uneven split, such as 90/10 | No | No | No | Yes, with the extra traffic it costs |
| Duration | Weeks | Weeks | Days, after an email form | Days, rounded up to whole weeks |
| What can I detect in N weeks? | No | No | No | Table for 1 to 12 weeks |
| Export | None | None | None | CSV, 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
- Find your baselineTake the control’s conversion rate from the last few full weeks, for the same page and audience the test will use.
- Choose the effect worth detectingSet the smallest lift that would make the change worth shipping, as a relative lift or in points.
- Set confidence and power95% confidence and 80% power are the usual starting point. Raise them when a wrong call is expensive.
- Enter your trafficVisitors per day or week, the share that will enter the test, and the split.
- 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.
- Read once at the endRun for the whole duration, then enter the totals in the significance calculator.