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
| Detect a lift to | Relative lift | Visitors 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.
Related
Conversion rate is conversions divided by visitors: 84 signups from 2,400 visitors is 3.50%. Enter your numbers for the rate, add revenue to get revenue per visitor and per conversion, or switch to funnel mode to see conversion and drop-off between up to six steps.
Build a funnel from any custom events or URL paths and see how many visitors reach each step and where they drop off.
An onboarding funnel follows new users from their first visit through signup to the moment they get value from your product, and shows how many you lose at each step. Building one takes three things: a short list of steps, an event for each step, and a habit of comparing the numbers before and after every change.
Measure your own site without cookies
No card required · 30-day trial · No cookies