This free sample size calculator answers the question every A/B test needs answered before it starts, not after: how many visitors does each variant actually need before the result can be trusted? Enter your baseline conversion rate, the smallest lift you care about detecting, your target power and confidence level, and optionally your daily traffic, and you get the exact per-variant visitor count required — plus, if you add your traffic, a realistic estimate of how many days the test will take to reach it.
Planning sample size is the step most teams skip. They launch a test, check it daily, and stop whenever the numbers look good, which is backwards. A test designed without a target sample size is closer to a coin flip than an experiment.
What This Sample Size Tool Does
Sample size planning is the missing half of A/B testing. Our A/B test calculator tells you, after a test has run, whether the result you got is statistically real. This tool does the opposite job — it tells you, before a test starts, how much data you'll need to collect in order to trust that result once it arrives. The two tools are meant to be used together: plan with this one, then verify with that one.
Feed it four numbers — your current conversion rate, the smallest relative improvement worth detecting, how confident you want to be (confidence level), and how often you're willing to miss a real effect (statistical power) — and it returns the number of visitors each variant needs to see before you can trust a significant result.
How to Use It
- Enter your baseline conversion rate. Pull this from your analytics for the page or flow you're about to test — the more accurate this number, the more accurate your plan.
- Set your minimum detectable effect (MDE). This is the smallest relative lift that would actually be worth shipping. Don't ask the test to detect a lift smaller than you'd bother acting on.
- Choose your statistical power. 80% is the standard default — it means you'll correctly catch a real effect 80% of the time it exists. 90% is more rigorous but needs more traffic.
- Choose your confidence level. 95% is standard for most marketing decisions; 99% for high-stakes changes.
- Add your daily visitors (optional). This converts the raw sample size into a practical number of days, so you know upfront whether the test is realistic to run.
The Formula / How It's Calculated
This calculator uses the standard sample-size formula for comparing two proportions, a two-sided test with equal group sizes. Other calculators, such as Evan Miller's A/B test sample size tool, take the same four inputs but may use a different method, so their answers can differ from this page. This one converts your confidence level and power into their corresponding z-scores (for example, 95% confidence corresponds to a z-score of about 1.96, and 80% power corresponds to about 0.84), combines those with the baseline rate and the target rate implied by your minimum detectable effect, and solves for the number of observations per group needed so that a true difference of that size would be detected with your chosen power, at your chosen confidence level. It is a closed-form formula, not a simulation. In the code: n = (zα/2·√(2p̄(1−p̄)) + zβ·√(p1(1−p1) + p2(1−p2)))² ÷ (p2 − p1)², where p1 is the baseline, p2 = p1 × (1 + MDE) and p̄ is their average.
This Tool Tells You Whether a Test Is Even Possible
The most useful thing this calculator does isn't the number it produces — it's the reality check that number forces. Plug in a site with 500 visitors a day, a 2% baseline conversion rate, and a target of detecting a 5% relative lift, at 95% confidence and 80% power, and the answer is about 315,000 visitors per variant, roughly 1,260 days (over three years) at that traffic. Run the test anyway, without knowing this, and you'll spend that time staring at daily numbers that bounce around meaninglessly, "peeking" at a test that was never adequately powered to give you an answer, and eventually calling a winner based on noise.
This is the single biggest reason A/B tests fail teams: not bad ideas, but tests designed to answer a question the traffic simply cannot answer in a reasonable time frame. Running this calculator first turns that invisible failure into a visible number, before you've spent a month of traffic finding out the hard way.
Smaller Effects Need Dramatically More Traffic
The relationship between the effect size you're trying to detect and the sample size you need is not linear — it's closer to inverse-square. Halving your minimum detectable effect roughly quadruples the sample size required. On a 3% baseline at 95% confidence and 80% power, detecting a 20% relative lift needs about 13,900 visitors per variant, a 10% lift about 53,200 and a 5% lift about 207,900, roughly fifteen times the 20% figure. This is why so many "inconclusive" tests on small or mid-sized sites aren't actually inconclusive — they were simply asked to detect an effect too small for the traffic available, and no result was ever going to reach significance in a sensible time frame.
The practical takeaway: on lower-traffic sites, design tests around bold, high-conviction changes rather than small tweaks. A dramatically different headline or offer can produce a bigger lift, so you can set a larger MDE, and this calculator will then show a far smaller, more achievable sample size than for a button colour.
If the Answer Is "97 Days," Change the Test, Not the Maths
When this calculator returns a timeline that's clearly unworkable, resist the temptation to shrink the sample size by lowering your confidence level or power just to make the number look friendlier — that just means you'll trust a result that's more likely to be wrong. Instead, change what you're testing:
- Raise the minimum detectable effect. Test a bigger, bolder change instead of a marginal tweak — bigger changes are both easier to detect and often more impactful anyway.
- Widen where the test runs. Testing across your whole funnel or site instead of a single low-traffic page increases the visitor pool feeding the test.
- Extend the timeline honestly. If the change truly matters, it may simply be worth the longer run — just go in knowing the real number, not hoping it finishes early.
- Switch to a different method. For very low-traffic pages, sequential or Bayesian testing approaches, or simply qualitative research and user testing, can be more efficient than a classic split test.
If traffic is too low to test, improving the page directly from research and best practice can be a better use of time. Arb Digital offers web design services.
See Our Web Design Services All Free ToolsCommon Mistakes to Avoid
- Skipping this step entirely. Launching a test with no target sample size means you have no way to know when — or whether — it's actually finished.
- Setting an unrealistically small MDE. Asking to detect a 2% relative lift on low traffic will produce an unworkable sample size — be honest about what's worth detecting.
- Lowering confidence just to shrink the number. This doesn't fix the underlying traffic problem, it just makes you more likely to trust a false result.
- Stopping before reaching the calculated sample size. Use this number together with the A/B test calculator — plan here, verify there, and don't call it early.
- Ignoring weekly traffic cycles. Make sure your test window covers full weeks, since weekday and weekend behavior often differs substantially.
Related Free Tools From Arb Digital
Once you know your required sample size, run the finished test through our A/B test calculator to confirm a real winner. Model what a winning variant is worth with the landing page conversion calculator, check your current baseline with the conversion rate calculator, and see the bigger economic picture with the marketing ROI calculator and cost per lead calculator. Browse everything at our free online tools hub.
Worked Example With the Default Inputs
Open this page and press Calculate without changing anything. These are the starting values, taken straight from the form:
- Baseline conversion rate (%): 3
- Minimum detectable effect (% relative): 10
- Statistical power: 80
- Confidence level: 95
- Daily visitors (optional): 500
The calculator returns the following, computed by the same code that runs above:
- Visitors needed per variant: 53,211
- Total visitors (both variants): 106,422
- Days to run at your traffic: 213 days
- Baseline rate: 3%
- Minimum detectable effect: 10%
These are sample numbers, not a benchmark. The headline status line reads “visitors needed in EACH variant before you can trust the result”. Change one field at a time to see which input moves the result most.
How to read your result
- 53,211 per variant is the visitors each group needs. The total is 106,422, and at 500 visitors a day that is 213 days (total ÷ daily visitors, rounded up).
- The MDE is relative: 10% on a 3% baseline means detecting a rate of 3.3% or better, a 0.3 percentage point difference.
- Round up to whole weeks so weekday and weekend behaviour are both covered.
What to do next
- If the days figure is unworkable, raise the MDE (test a bolder change) before lowering confidence or power.
- Write down the sample size and end date before launch, and do not call a winner earlier.
- When the test ends, check it with the A/B test calculator. To see what a fixed sample can detect, use the minimum detectable effect calculator.
Frequently Asked Questions
This calculator uses the standard formula for comparing two proportions, converting your chosen confidence level and statistical power into z-scores, then combining them with your baseline conversion rate and minimum detectable effect to solve for the number of visitors each variant needs. It's the same closed-form statistical approach used by most professional sample-size calculators.
It's the smallest relative improvement over your baseline that you want your test to be able to reliably detect. A 10% MDE on a 3% baseline means you're aiming to detect a true rate of about 3.3% or higher. Set the MDE to the smallest lift that would actually be worth shipping — asking for a smaller MDE than that just inflates your required sample size for no practical benefit.
Confidence level controls how often you'll falsely call a winner when there's really no difference (a false positive). Statistical power controls how often you'll correctly detect a real effect when one actually exists (avoiding a false negative). 95% confidence and 80% power is the standard default combination for most marketing tests.
Usually because the minimum detectable effect is small relative to the baseline rate — smaller effects require dramatically more data, roughly following an inverse-square relationship. If the number looks unworkable at your traffic, raise the MDE and test a bolder change, or plan for a realistically longer test window.
That's the sample size you calculated in advance to reach your target confidence and power — treat it as the point at which you can trust the result, not a hard stop. Reaching it and running the numbers through the A/B test calculator is the correct way to call a winner, rather than stopping early because the interim numbers look good.
Yes. The same two-proportion sample size math applies to email subject line tests, ad creative tests, app onboarding flows, or any scenario where you're comparing a conversion rate between two groups. Just make sure your baseline rate and MDE reflect the specific action you're measuring.
Figures produced by this calculator are statistical planning estimates based on the numbers you enter.