Marketing term, analytics and measurement

Sample Size

Sample size is the number of visitors, users or contacts a test needs in each group to reliably detect an effect of a chosen size at a chosen confidence level.

Also called: sample size, minimum detectable effect, MDE, test sample size, required sample size

Sample Size lives in measure, the part of the funnel about measuring what worked, near related terms like Statistical Significance, A/B testing and Lift (the blue squares).

Sample size is the number of people a test needs in each group to detect a real difference. In marketing, that means visitors on a page, recipients of an email or users in a product test. You decide it before the test starts. Too small and you can't tell a real winner from luck. Too large and you waste weeks of traffic.

How it works

Four inputs set the required sample size:

  • Baseline rate: your current conversion rate. Lower baselines need bigger samples.
  • Minimum detectable effect (MDE): the smallest lift you want to catch. Halving the MDE roughly quadruples the sample.
  • Significance level: how much false-positive risk you accept. Many teams use 5%, which matches 95% confidence.
  • Power: the chance of detecting a real effect of your MDE size. Many teams use 80%.

A calculator, like our A/B test calculator, combines these into visitors per variant. A common rough formula for two groups is:

n per group ≈ 16 x p x (1 minus p) / (MDE in absolute terms)²

That approximation assumes about 5% significance and 80% power, where p is the baseline rate. Then:

Test duration in days = (n per group x number of groups) / daily eligible traffic

Round up to full weeks, so weekday and weekend behavior are both included. Sample size is the planning step. Statistical significance is the reading step at the end.

Example

A team wants to test a new signup page (all numbers hypothetical). Baseline signup rate is 4%. The page gets 2,000 visitors a day.

Target relative lift Absolute MDE Approx. visitors per group Days at 2,000 a day
25% (4% to 5%) 1.0 point about 6,100 about 7
10% (4% to 4.4%) 0.4 point about 38,400 about 39
5% (4% to 4.2%) 0.2 point about 153,600 about 154

The team wanted to detect a 5% lift. That test would take five months. So they redesign the page more boldly, aiming for a 25% lift they can detect in about a week. Small polish tests wait until traffic grows.

By company size

Small business: most local and early-stage sites can't run classic A/B tests on conversion rate. A site with 300 visits a week would need months for anything but huge effects. Test big changes, like a new offer or a completely different page. Use email tests, where list size may be larger than page traffic.

Mid-market: enough traffic exists for real tests on the homepage, pricing page and signup flow. Calculate sample size before every test and commit to it. Most wasted tests at this stage come from stopping early, or from testing changes too small to detect.

Enterprise: high traffic makes small MDEs detectable, so teams can test small changes that compound. The challenge shifts to running many tests at once without interference, and to segment-level analysis, which needs its own sample size per segment.

Sample size vs statistical significance

Sample size answers "how much data do we need?" before the test. Significance answers "is this result unlikely to be chance?" after it. A test can hit significance with a small sample by luck, which is why you set the sample first and judge significance only once you reach it.

Why it matters for GTM teams

Most teams run underpowered tests, then build strategy on noise. A "winning" headline from 400 visitors is a coin flip with a story attached. We'd calculate sample size for every test and kill any test that can't reach it within six weeks. Low-traffic teams should test bold ideas or use qualitative research, not dress up guesses as experiments.

Common mistakes

  • Starting a test without calculating sample size at all.
  • Peeking daily and stopping the moment results look significant.
  • Setting the MDE at a lift that's unrealistically small for the traffic.
  • Running multivariate tests on traffic that can barely support two variants.
  • Ending tests mid-week, so weekday and weekend behavior are unbalanced.
  • Slicing results into many segments after the fact, each far below the needed sample.

FAQ

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

You need four inputs: your baseline conversion rate, the smallest lift you care to detect, your significance level and your statistical power. Plug them into a sample size calculator and it returns the visitors needed per variant. Then divide by your daily traffic to see how many days the test must run.

What is minimum detectable effect?

Minimum detectable effect, or MDE, is the smallest change your test is designed to catch reliably. A smaller MDE needs a much larger sample, because tiny differences are hard to separate from noise. Set it at the smallest lift that would actually change a business decision.

What if I don't have enough traffic for a test?

Test bigger changes, so the expected effect is large enough to detect with your traffic. You can also test higher in the funnel where volumes are bigger, run tests longer, or use qualitative methods like user interviews and session recordings instead of a formal A/B test.

See all analytics and measurement terms ↳

Used in these articles