Customer Impact

Growth & Strategie

How to calculate sample size for an A/B test: how much traffic do you need?

Copy for AI

You calculate sample size before the test, from three inputs: baseline, MDE and confidence.

The verdict: if the visitors you need don’t fit in four to six weeks of traffic, don’t run that test in its current form.

Many teams skip this step. They launch an A/B test, and two weeks later they stare at a dashboard that says “not significant yet.”

By then it’s too late. The experiment was hopeless from the start.

This guide shows how to calculate sample size upfront, so you know a test is feasible before you set it up.

Why calculate your sample size upfront?

Because every visitor can only enter an experiment once.

An A/B test is a bet, and your traffic is the stake.

Waste visitors on a test that’s too small, and you don’t get them back.

So the sample calculation isn’t an academic exercise. It’s being economical with a scarce resource.

Skipping it goes wrong in two ways.

Mistake 1: you stop as soon as the dashboard turns green

We call that peeking. It produces false positives that stay in production, even though they don’t work.

Evan Miller’s classic analysis How Not To Run an A/B Test puts a number on it. Peek ten times, and what looks like 1% significance is actually 5%.

Our guide to A/B test peeking shows how to avoid it.

Mistake 2: you test forever

Here the difference you want to measure is tiny. You’d need months of traffic you’ll never get.

In both cases, a calculation upfront would have saved you the lost time.

A fixed sample enforces discipline

You agree in advance: this test runs until we have X visitors per variant. Only then do we look.

Miller is blunt about it. Committing to a sample size “completely mitigates” the peeking problem.

That takes emotion and wishful thinking out of the process.

For a growth team that steers on pipeline and revenue, it’s the difference between learning and gambling.

Which three levers decide your A/B test sample size?

Your current conversion rate, the minimum detectable effect, and your confidence and power.

Understand these three, and you understand the whole calculation.

1. Your current conversion rate (baseline)

This is the share of visitors who already take the desired action. Think of a form, a demo request or a quote download.

For example, say 4 out of every 100 visitors to your landing page submit a request. Then your baseline is 4%.

Not sure of your number? Our guide on how to calculate your conversion rate walks through it.

Rule of thumb: the lower your baseline, the more traffic you need. Small percentages need more data to estimate reliably.

2. The minimum detectable effect (MDE)

This is the most important lever, and the most neglected one.

The MDE is the smallest difference you still consider worth detecting:

  • 4% to 5%: an MDE of 1 percentage point
  • 4% to 6%: an MDE of 2 percentage points

The smaller the effect you want to see, the more sensitive your test must be. And sensitivity costs traffic.

A test that has to detect 1 percentage point needs roughly four times as many visitors as one that detects 2.

That’s because the sample scales with one over the effect squared. Miller’s rule of thumb n = 16σ²/δ² shows it.

Here’s what that means in visitors per variant, at 95% confidence and 80% power:

SAMPLE SIZE PER VARIANT Smaller effect, far more visitors 4% to 6% MDE 2 points about 1,900 4% to 5% MDE 1 point about 6,700 2% to 2.5% MDE 0.5 points about 14,000 Visitors per variant at 95% confidence and 80% power. Halve the effect and you need about four times the traffic.
Visitors needed per variant for the three examples in this guide, at 95% confidence and 80% power.

Many teams set their MDE too low without noticing. Then they wonder why they need tens of thousands of visitors.

Watch out: choose an MDE that’s big enough to base a business decision on. Half a percentage point on a low-traffic page won’t change your pipeline.

Aim for bigger changes that can have a bigger effect.

3. Confidence and power

The third lever is two settings, usually fixed at standard values:

  • Confidence (often 95%): how strict you are on false positives
  • Power (often 80%): how well the test picks up a real difference

A false positive is a difference you see that isn’t really there.

GrowthBook’s documentation notes that 80% is the standard power in clinical trials. It uses that default for its own MDE estimates (GrowthBook on power).

Make these stricter, say 99% confidence, and your required sample rises.

For most B2B experiments, 95% and 80% are a fine starting point. Our explainer on statistical power in A/B testing goes deeper.

How do you calculate sample size in practice?

With a free calculator: you enter four numbers, and it returns visitors per variant.

You don’t need the formula by heart. Evan Miller’s sample size calculator asks for:

  1. your baseline conversion rate
  2. the minimum detectable effect, absolute or relative
  3. statistical power
  4. the significance level

The value isn’t in the calculation itself.

It’s in taking the outcome seriously.

Absolute or relative MDE?

Check which one you enter, because the calculator accepts both.

An absolute MDE is in percentage points. From a 4% baseline, 1 point absolute means 4% to 5%.

A relative MDE is a share of the baseline. That same jump from 4% to 5% is a 25% relative lift.

Watch out: type 1% relative when you meant 1 point absolute, and you’re asking for 4% to 4.04%. That tiny effect needs an enormous sample.

The pattern you see every time

A low baseline and a small MDE inflate your required sample enormously.

For example, say a page converts at 2% and you want to prove a lift of 0.5 percentage points. At 95% confidence and 80% power, that’s roughly 14,000 visitors per variant.

So about 28,000 in total. With around 500 visitors a week, that test runs for more than a year.

That isn’t a test. That’s waiting.

Step by step: work back from your traffic

So turn the reasoning around:

  1. Count: what does this page realistically get in four to six weeks?
  2. Split: divide that by the number of variants.
  3. Find your MDE: which effect can that sample detect?
  4. Decide: is that effect worth a test?

For example, say a landing page gets 3,000 visitors in six weeks. With two variants, that’s 1,500 each.

From a 4% baseline, that’s below the roughly 1,900 you’d need even for 4% to 6%.

So even a 2-point lift couldn’t be proven on that page in six weeks.

If you can only see differences of 3 percentage points or more, you know at once.

Subtle tweaks will yield nothing here. Your time is better spent on a bigger redesign, or on a page with more traffic.

What the outcome tells you to do

Use the result of that calculation like this:

Your calculation showsWhat to do
Your MDE fits in four to six weeksRun the test and wait for the full sample
Only big effects (3+ points) are detectableTest a bold change: offer, headline, page structure
Even big effects need monthsSkip the test; use research and best practice
The page matters but gets few visitsWork on traffic to that page first

What if you have too little traffic for an A/B test?

Change your approach, not your ambition.

This is the reality for many B2B companies. Traffic is simply too low for classic A/B tests on most pages.

That’s no reason to stop optimising. Our guide to A/B testing with low traffic covers the options in full.

Test bigger changes

With limited traffic you can’t prove a button colour.

But you can prove a completely different offer, a radically different headline or a new page structure.

Big changes produce big effects.

And big effects show up faster, with less data.

Concentrate on your busiest pages

One or two pages usually capture the lion’s share of your traffic. There, a reliable test is feasible.

On your long tail of low-traffic pages, steer on reasoned choices and best practices instead of statistics.

Research tools help there. Microsoft Clarity, for example, shows scroll depth and session recordings for free:

Microsoft Clarity homepage with a demo dashboard showing sessions, pages per session and scroll depth, a research tool for low-traffic pages where an A/B test sample size is out of reach Microsoft Clarity’s homepage, October 2026. Scroll depth and recordings show where visitors drop off, even without a test.

That’s where you find the ideas worth testing once traffic allows. Our page on when not to A/B test lists what to do instead.

Or look beyond testing

Sometimes the smartest growth answer isn’t a better variant of a page. It’s more qualified traffic going to it.

That’s exactly where conversion optimisation meets the broader growth engine.

SEO, content, paid and CRO shouldn’t run separately. They work best as one system that steers on leads and revenue.

Our take: a test on a page with too little traffic is often a signal. Work on the traffic side first.

Why does sample size belong in your experiment calendar?

Because it stops your calendar from filling up with tests that never reach a verdict.

Make the calculation a fixed step. Before a test goes live, record four things:

  • Baseline: the page’s current conversion rate
  • MDE: the smallest effect worth detecting
  • Sample: required traffic per variant
  • Runtime: estimated weeks to reach it

If that doesn’t fit a reasonable timeframe, the test doesn’t go ahead in this form.

Put those four fields straight into your experiment backlog, next to each idea.

Busy versus making progress

A team that tests at random collects a pile of “not significant” and little learning.

A team that calculates upfront knows which tests are feasible. It picks bigger effects on busier pages on purpose.

That’s how you build a steady stream of proven improvements.

Tip: start each idea as a written growth hypothesis, so the expected effect is on paper before you calculate.

Once a test ends, check the result with our free A/B test calculator.

Frequently asked questions

How do I calculate sample size for an A/B test?

Enter your baseline conversion rate, minimum detectable effect, significance level and power into a sample size calculator. It returns the visitors you need per variant.

What is a good minimum detectable effect?

One that’s big enough to base a business decision on. On low-traffic B2B pages, that usually means testing bigger changes.

Why does a smaller effect need so much more traffic?

The sample scales with one over the effect squared. Halve the difference you want to detect, and you need roughly four times the visitors.

Can I stop a test early once it looks significant?

Not if you want to trust the result. Peeking ten times can turn an apparent 1% significance into 5%. Fix the sample in advance and wait.

So how much traffic does your A/B test need?

Enough to detect the effect you care about within four to six weeks.

Decision rule: if it doesn’t fit, test something bigger or work on traffic first.

Want experimentation where SEO, CRO, content and paid work as one whole? As a growth marketing agency we build that growth engine with you, with conversion rate optimization that steers on pipeline and revenue.

Get in touch and we’ll first look at which experiments are realistic for your traffic.

Free website scan

Enter your website and get an automatic scan within minutes, with concrete technical and SEO improvements. No sales pitch.

Where should we send your report?

We only use your details for your scan. No spam, unsubscribe anytime.