Skip to content
Glossary

Sample size

Sample size is how many visitors each version of a test needs before you can trust the result. Work it out before the test starts, from your current conversion rate and the smallest improvement worth detecting.

Updated

Also called: required sample size, minimum sample size, test sample size

The four inputs

  • Baseline conversion rate: what the current version converts at, for example 4%.
  • Minimum detectable effect: the smallest change worth finding, for example from 4% to 5%. Smaller effects need far more visitors.
  • Significance level: the false-positive rate you accept, usually 0.05. See statistical significance.
  • Power: the chance of detecting the effect if it's real, usually 80%.

Formula

For two conversion rates p1 and p2, a common approximation for the visitors needed per version is:

n per version = (z_a + z_b)² × [p1 × (1 − p1) + p2 × (1 − p2)] / (p1 − p2)²

z_a = 1.96   (significance level 0.05, two-sided)
z_b = 0.84   (80% power)

Example (illustrative numbers): the baseline is 4% and you want to detect a lift to 5%. (1.96 + 0.84)² = 7.84, and 0.04 × 0.96 + 0.05 × 0.95 = 0.0859. So n = 7.84 × 0.0859 / 0.01² ≈ 6,735 visitors per version, about 13,500 in total. Calculators that use slightly different formulas land within a few percent of this; those that add a continuity correction come out about 3% higher.

The effect size changes everything

Visitors needed per version from a 4% baseline, significance level 0.05 and 80% power, rounded up to the nearest 10.
Detect a lift toRelative liftVisitors per version
6%+50%≈ 1,860
5%+25%≈ 6,740
4.5%+12.5%≈ 25,520
4.2%+5%≈ 154,130

Halving the effect you want to detect roughly quadruples the visitors you need. Divide the total by the daily traffic to the page to see how many days the test must run, and round up to whole weeks.

Pitfalls

  • Stopping early because it looks done. The sample size is a commitment; stopping on the first good-looking day overstates the winner.
  • An effect you can't afford to detect. If you need 150,000 visitors per version and get 2,000 a week, test a bolder change or measure a step with more traffic.
  • Mixing units. Plan and analyze in the same unit: visitors if you randomize visitors, sessions if you randomize sessions.

Planning with Linqry numbers

Use your own data for the baseline. A funnel from the page you'll test to your goal gives its current conversion rate, and the funnel's first step shows how many visitors reach the page in a typical week.

Related terms

Frequently asked questions

Can I run a test with less traffic?

Yes, but it can only detect large effects. With a few hundred visitors per version, test bold changes rather than small tweaks.

Why 80% power?

It's a convention that balances test length against the risk of missing a real effect. Raising power to 90% needs roughly a third more visitors.

Measure your own site without cookies

No card required · 30-day trial · No cookies