A/B test sample size. Per variation, with traffic projection.
Set your baseline conversion rate, the minimum detectable effect, and statistical power + confidence. We compute the required per-variation sample size and project how long the test will take given your daily traffic. Pure two-proportion z-test math.
The control group's current conversion rate.
Relative lift you want to be able to detect (e.g. 10% means baseline 3% → variant 3.3%+).
Leave blank to skip the time-to-significance projection.
- -
Privacy: calculation happens in your browser. Nothing is sent or logged.
How to use the A/B Test Sample Size Calculator
This calculator tells you how many visitors each variation of an A/B test needs before the result can be trusted, and how long that takes at your traffic. It uses the standard two-proportion z-test formula with your baseline rate, the smallest lift you care about, confidence and power. Use it before you launch a test, to check whether your traffic can support it.
Step by step
-
Enter your baseline rate
Type the control's current conversion rate in Baseline conversion rate (%). The default is 3. Take it from your analytics over a recent, typical period. Any value above 0 and below 100 works.
-
Set the smallest lift worth finding
Type a number in Minimum detectable effect (default 10). With % relative selected, 10 means a 10% lift on the baseline, so 3% becomes 3.3%. Switch to pp absolute to enter percentage points instead, where 1 means 3% becomes 4%.
-
Choose confidence and power
Pick Confidence (%) from 90, 95 or 99 (95 is the default) and Statistical power (%) from 70, 80 or 90 (80 is the default). Higher values protect you better against wrong calls but need more visitors.
-
Set the number of variations
Enter the Number of variations (incl. control), from 2 to 10. A plain A/B test is 2. More variations do not change the sample each one needs, but they split your traffic, so the total and the run time grow.
-
Add your daily traffic
Enter the visitors per day who will enter the test in Daily traffic to test (optional). The default is 2000. Leave it empty or at 0 to skip the time projection.
-
Copy the summary
Every change updates the results at once. Press Copy summary to put your inputs, the sample per variation, the total and the time to result on your clipboard as plain text.
Reading the result
- The large number is the sample each variation needs. With the defaults (3% baseline, 10% relative lift, 95% confidence, 80% power) it is 53,211 per variation, and the line below shows a total of 106,422 for 2 variations.
- The sentence under the number rates the size: under 1,000 is small, under 10,000 moderate, under 100,000 large, and anything above that is called very large and likely impractical.
- Time to significance divides your daily traffic evenly across the variations. At 2,000 a day the default test needs 53.2 days, shown as 7.6 weeks. The figure is green at 14 days or less, white up to 42 days and amber beyond that.
- Scenario comparison repeats the calculation for other effect sizes at the same baseline, confidence and power: 5, 10, 20 and 50% in relative mode, or 0.5, 1, 2 and 5 points in absolute mode. Your current setting is marked current.
- If the variant rate would reach 100% the tool shows a dash and asks you to lower the effect.
Tips and common mistakes
- Halving the effect you want to detect roughly quadruples the sample. Set it to the smallest lift you would actually ship, not the smallest you can imagine.
- Low baselines need far more traffic. If the number is huge, test a step higher in the funnel where more people convert.
- Decide the sample before you start and run to it. Stopping the moment a winner appears raises the chance of a false result.
- Use daily traffic that will really enter the test, not total site traffic, or the time estimate will be too short.
- After the test, check the outcome with a significance calculator. This tool only sizes the test, it does not judge results.
Privacy and limits
All the math runs in your browser. Nothing you type is sent anywhere or saved, so reloading the page resets the inputs to the defaults. Copy summary writes plain text to your clipboard and nothing else.
Five settings. Each has trade-offs.
Baseline conversion rate. The control's current conversion rate. Pull from your analytics over a representative recent window, last 4 weeks for stable funnels, last quarter for seasonal ones. The baseline drives sample size more than any other input, at 1% baseline you need 30-50× the sample of a 50% baseline test.
Minimum detectable effect. The smallest improvement that would be worth shipping. If a 5% relative lift wouldn't change your roadmap, set MDE higher. Setting MDE smaller than your shipping threshold makes the test slower and answers a question you don't care about. Common starting MDE: 10-20% for ecommerce purchase tests, 5-10% for click-rate tests, 20-50% for low-baseline conversions. If you think in points rather than percentages, switch the toggle next to the input to pp absolute: a 3% baseline moving to 4% is a 1 pp lift.
Confidence (1 - alpha). The rate of false positives you accept, calling a winner when there isn't one. Industry standard 95% (1 in 20 false positives). Use 99% for high-stakes irreversible changes (pricing, account deletion flows). Use 90% for low-stakes UI tests where rolling out a wrong winner is easily reversed.
Power (1 - beta). The rate of true positives, correctly identifying real winners. Industry standard 80% (you'll miss 1 in 5 real winners). Higher power 90% appropriate when missing a winner has higher cost than rolling out a loser, for example, abandoning a treatment that would have grown revenue 30%. Lower power 70% appropriate when you can re-test cheaply.
Variations. Most tests are 2-variation (control vs treatment). Multi-variation (3+) tests sample-divide your traffic, so each variation gets less. The required per-variation sample doesn't change with variation count, but the total traffic needed scales linearly. For 4-variation tests against a single control, consider running them in series instead of parallel, faster cycle, better signal.
Four jobs this tool covers.
Job 1: Pre-test sizing. Before launching an A/B test, plug your baseline + the smallest lift worth shipping into the calculator. The output tells you whether your traffic supports the test. If the answer is "10 weeks at current traffic" and the test was supposed to inform a Q3 decision, you need to either widen the MDE, raise the traffic, or pick a different test.
Job 2: Decide whether to test at all. Some tests are too expensive to run. A test on the final purchase step at 1% baseline with a 5% MDE needs ~600,000 visitors per variation; if you have 10K visitors per month, the test would take 60 months, pointless. Either pick a higher-baseline test (header CTA, not final purchase), pick a higher MDE, or skip A/B testing and ship the change with rollback ready.
Job 3: Defend a sample-size choice. Stakeholder asks "why are we running this for three weeks?", the calculator gives you the explicit input → output trace. "We need 12,000 per variation at 80% power and 95% confidence to detect the 10% lift we're targeting; at 1,500 visitors per day per variation, that's 8 days minimum." Defensible math beats stakeholder hand-waving.
Job 4: Plan a testing roadmap. Run the calculator across your candidate test list. The ones with reasonable sample sizes go on the active roadmap. The ones with impractical sample sizes get re-scoped, killed, or moved to "ship and monitor" instead. Pair with our Statistical Significance Calculator for the post-test analysis side.
Six questions users ask.
What's minimum detectable effect?
MDE is the smallest improvement you want the test to be able to reliably detect. Enter it as a relative percentage from baseline, or switch the toggle to absolute percentage points. A baseline of 5% conversion with a relative MDE of 10% means you want to be able to reliably distinguish a treatment that shifts conversion to 5.5% or above; the same target expressed absolutely is 0.5 pp. Smaller MDEs require dramatically larger samples, halving the MDE quadruples the required sample. Pick the smallest MDE that would actually be worth shipping; setting it lower than that wastes test time.
What do power and confidence mean?
Confidence (1 - alpha, default 95%) is the rate of false positives you tolerate, how often you'd call a winning treatment when there isn't one. 95% means 1-in-20 false positives. Power (1 - beta, default 80%) is the rate of true positives, how often you'd correctly identify a real winner. 80% means 1-in-5 missed real wins. Both defaults are industry standard. Higher confidence (99%) is appropriate for high-stakes changes; higher power (90%) is appropriate when missing a winner is more costly than rolling out a loser.
Why is the required sample so large?
Baseline conversion rate is the dominant factor. At 50% baseline (a click-rate scenario), the sample is small. At 1% baseline (a typical purchase rate), the sample is roughly 50× larger because the variance is dominated by the rare event. Most ecommerce purchase tests need tens of thousands of visitors per variation; high-funnel button-click tests need only hundreds. Lower baselines also benefit more from absolute-MDE thinking instead of relative, a 1% baseline shifting to 1.5% (50% relative lift) is an absolute change of 0.5pp.
Should I peek at results during the test?
No, not for fixed-horizon tests like this calculator assumes. Peeking inflates false-positive rate above the nominal alpha, the more you peek, the higher the rate of calling a winner that's actually noise. If you must peek, use sequential or Bayesian methods (Optimizely, VWO, AB Tasty all support these); they're built to handle continuous monitoring. For naive frequentist tests, set the sample size up front, run to that sample, then look at the result.
What if my traffic is small?
Three options. (1) Test higher in the funnel where the conversion rate is bigger, testing a header CTA click is usually 10-20× higher conversion than testing the final purchase, so the sample needed is much smaller. (2) Test bigger changes (larger MDE) so you can detect with less traffic. (3) Run the test longer; most tools give you the ability to run for several weeks. If you can't get statistically significant results within 4-6 weeks, the test is probably not worth running, the cost of decision delay outweighs the value of certainty.
Is the data I enter sent anywhere?
No. Calculation happens entirely in your browser. The page is static HTML; the only network request is the initial page load. Safe for sensitive conversion-rate data, internal projections, or any number you wouldn't want shared with a third party.
Published · Last updated .