Revenue Rex logo mark
Math · Rex's Toolbox

A/B Test Sample Size Calculator

How many visitors per variant you need before you look at results.

Revenue Rex peeking

Rex says

The fast lane for the math you almost remember from school. Type the numbers, get the answer, move on with your day.

Try a scenario

Click to load — tweak from there.

Inputs

Result

Visitors needed per variant

31,232

Total visitors across variants

62,464

Days to reach sample size

16

Weeks to reach sample size

2.2

Target variant conversion rate

5.50%

Revenue Rex peeking

Psst — share this and help Rex grow

One click, a permanent link with your numbers baked in.

More math

How to use this

  1. 1Enter baseline conversion rate (%).
  2. 2Enter minimum detectable relative lift (%).
  3. 3Enter confidence level.
  4. 4Enter statistical power.
  5. 5Enter number of variants (incl. control).
  6. 6Enter total daily traffic to the test.
  7. 7Read your visitors needed per variant on the right — it updates as you type.
  8. 8Hit Share to keep the scenario or send it to someone.

About this calculator

Deciding sample size before a test starts is what keeps you from peeking at noisy early data and calling a winner too soon. This calculator uses the standard two-proportion power formula: it takes your baseline conversion rate, the minimum lift worth detecting, your desired confidence level, and statistical power, then returns the visitors per variant and total runtime given your daily traffic. Smaller minimum detectable effects require dramatically more traffic — halving the effect you want to detect roughly quadruples the sample size, because the formula scales with the inverse square of the effect size. Most teams underestimate this and shut tests down at week two when they never had enough traffic to detect a 5% relative lift in the first place. Run the numbers up front, pick a minimum detectable effect you can actually afford to wait for, and commit to the full sample size before evaluating significance. If your traffic can't support detecting a lift that matters to the business within a reasonable window, the test isn't worth running as designed — widen the effect size, combine variants, or use a sequential testing method instead.

Formulan per group = (Zα/2 + Zβ)² × [p1(1−p1) + p2(1−p2)] ÷ (p2 − p1)², where p2 = p1 × (1 + MDE).

Worked example

Using the values the calculator loads with:

Inputs

  • Baseline conversion rate: 5 %
  • Minimum detectable relative lift: 10 %
  • Confidence level: 95%
  • Statistical power: 80%
  • Number of variants (incl. control): 2
  • Total daily traffic to the test: 4000

Results

  • Visitors needed per variant: 31,232
  • Total visitors across variants: 62,464
  • Days to reach sample size: 16
  • Weeks to reach sample size: 2.2
  • Target variant conversion rate: 5.50%

What each field means

Inputs

Baseline conversion rate (%)
The baseline conversion rate used in the calculation, measured in %. Starts at 5 % so you have a working example on load. Accepted range: 0.1–90 %.
Minimum detectable relative lift (%)
The minimum detectable relative lift used in the calculation, measured in %. Starts at 10 % so you have a working example on load. Accepted range: 1–200 %.
Confidence level
Pick the option that matches your situation — the maths changes per option. Choices: 90%, 95%, 99%.
Statistical power
Pick the option that matches your situation — the maths changes per option. Choices: 80%, 90%.
Number of variants (incl. control)
The number of variants (incl. control) used in the calculation. Starts at 2 so you have a working example on load. Accepted range: 2–6.
Total daily traffic to the test
The total daily traffic to the test used in the calculation. Starts at 4000 so you have a working example on load.

Results

Visitors needed per variant
Returned as a whole number and shown as the headline result. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
Total visitors across variants
Returned as a whole number. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
Days to reach sample size
Returned as a whole number. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
Weeks to reach sample size
Returned as a decimal number. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
Target variant conversion rate
Returned as a percentage. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.

FAQ

Why does a smaller minimum detectable effect need so much more traffic?

The sample size formula divides by the squared difference between the two rates. Cutting the detectable lift in half means that denominator shrinks by 4x, so the required sample roughly quadruples. This is why testing tiny copy tweaks on low-traffic pages rarely reaches significance in any reasonable timeframe.

Should I use 80% or 90% power?

80% power is the common default and means you'll correctly detect a true effect 4 out of 5 times. Use 90% for high-stakes changes like pricing or checkout flow where missing a real effect is costly — it costs you roughly 30% more sample size.

What if I'm testing more than two variants?

Each additional variant needs its own full sample versus control, and running multiple comparisons inflates your false positive rate. Either raise your confidence threshold (Bonferroni-style correction) or limit tests to 2-3 variants at a time.

Can I stop early if results look significant?

Not without a pre-planned sequential testing method. Checking p-values daily and stopping the moment you cross 0.05 inflates your false positive rate far above 5%, sometimes to 20-30%, because you're giving noise many chances to look significant.

Accuracy and limitations

  • Results are rounded for display; the underlying calculation keeps full precision.
  • Very large or very small inputs may hit floating-point limits in the browser.
  • Inputs outside the accepted range are clamped rather than rejected.

Related tools

Cite this calculator

Writing about this topic? Grab a citation — every link helps keep these tools free.

APA
RevenueLab. (2026). A/B Test Sample Size Calculator. Retrieved from https://www.revenuelab.fyi/toolbox/ab-test-sample-size-calculator
HTML
<p>Source: <a href="https://www.revenuelab.fyi/toolbox/ab-test-sample-size-calculator" target="_blank" rel="noopener">A/B Test Sample Size Calculator — RevenueLab</a> (2026).</p>
Markdown
Source: [A/B Test Sample Size Calculator — RevenueLab](https://www.revenuelab.fyi/toolbox/ab-test-sample-size-calculator) (2026).
Advertisement