Guide
How Many Visitors Do You Need for an A/B Test?
Understand baseline rate, relative MDE, confidence, power, and duration so you can size a two-variant test before you launch. Then plan yours in the free A/B Test Planner.
“How many visitors do I need for an A/B test?” is really four questions: what baseline rate am I starting from, what lift is worth detecting, how sure do I need to be, and how long will traffic take to get there. This guide explains those inputs and walks a worked example that matches the MarketingMindOS A/B Test Planner.
What this planner is sizing
The free planner sizes a two-sided test of two independent proportions with equal (50/50) allocation, the common case for a simple A/B test on a conversion rate. It uses a normal approximation with Z critical values for α/2 and power.
- Baseline conversion rate (p1): current primary metric among eligible visitors
- Relative minimum detectable effect: e.g. +20% relative means p2 = p1 × 1.20
- Confidence level: maps to Type I error α (95% → α = 0.05)
- Statistical power: 1 − β (80% power is a common planning default)
- Eligible visitors per week: for duration only; does not change n per arm
Relative MDE is not percentage points
This is the most common sizing mistake. A 20% relative lift on a 3% baseline is 3.6%, an absolute change of 0.6 percentage points. Asking the test to detect “+20 percentage points” would be a completely different (usually absurd) design.
Formulap2 = p1 × (1 + relative MDE). Absolute MDE (pp) = (p2 − p1) × 100
Sample size intuition
Smaller relative effects, lower baselines (in many practical ranges), higher confidence, and higher power all push sample size up. Duration is total sample divided by weekly eligible traffic, assuming the 50/50 split is already reflected in the total.
Meeting the planned sample size does not promise a significant result. It only makes a true effect of that size reasonably detectable under the model assumptions.
Worked example (verified against the planner)
3% baseline · +20% relative MDE · 95% confidence · 80% power
- p1 = 0.03; p2 = 0.036; absolute MDE = 0.6 percentage points
- Sample size ≈ 13,913 visitors per variation (27,826 total)
- At 10,000 eligible visitors / week ≈ 3 weeks (~20 days), typically feasible
- At 2,000 eligible visitors / week ≈ 14 weeks, usually too long for a single stable test window
Same inputs in the A/B Test Planner produce the same n and duration estimates. Use feasibility notes: designs over ~12 weeks often need a larger MDE, a higher-baseline surface, or non-experimental research first.
Warnings that should stay front-of-mind
- Do not peek repeatedly and stop early on a “significant” p-value (optional stopping inflates false positives)
- Seasonality, promotions, bots, and uneven sample quality can invalidate planning assumptions
- This method does not adjust for multiple comparisons, sequential monitoring, or CUPED-style variance reduction
- Novelty effects and weekday/weekend cycles can distort early reads
From sample size to an experiment brief
Sizing without a hypothesis wastes traffic. Pair sample-size planning with a clear problem, funnel stage, suspected cause, and proposed change. The planner can generate a structured hypothesis and a copyable experiment brief from your inputs.
Plan your test
Open the free A/B Test Planner to compute sample size, duration, hypothesis guidance, and a copyable brief from your actual inputs.
Use the free tool
Apply this guide with live inputs. Results stay free without an account.
Open the A/B Test PlannerFrequently asked questions
How many visitors do I need for an A/B test?
For a 3% baseline and +20% relative MDE at 95% confidence and 80% power, plan on roughly 13,913 visitors per variation (27,826 total). Change any input and the answer changes. Use the planner rather than a fixed rule of thumb.
What confidence and power should I choose?
95% confidence and 80% power are common planning defaults. Higher values increase sample size. Match the choice to decision risk, not to a desire for a shorter test.
Can I trust duration estimates?
Treat them as planning aids under steady eligible traffic and 50/50 allocation. Real traffic and seasonality often differ.
What if my traffic is too low?
Increase the relative MDE you care about, test a higher-baseline step in the funnel, run qualitative or diagnostic work first, or accept that a sensitive A/B test is not feasible yet.