A/B Test Sample Size Calculator screenshot

A/B Test Sample Size Calculator

The per-arm sample size for a two-proportion test, from the control rate, the target rate, alpha and power.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No sign-up, no upload
Exact where arithmetic allows

A/B Test Sample Size Calculator

The per-arm sample size for a two-proportion test, from the control rate, the target rate, alpha and power.

What the page prints, and what it refuses

Every figure is printed with the rule or formula that produced it, and any numerical tolerance is stated on the result rather than implied. The page refuses an input the formula does not define and names the value it read; it prints no answer it cannot support.

The calculation runs entirely in this browser tab; nothing is uploaded.

The page sizes a two-proportion test before it runs. A control rate of 10 % against a variant rate of 12 %, with α = 0.05 and 80 % power, needs 3841 visitors per arm, so 7682 in total.

That is the standard normal approximation with a pooled variance for the null and separate variances under the alternative. The unrounded size is printed too, so the ceiling is visible rather than mysterious.

The two variances in the formula

Under the null the two rates are pooled, giving 2p̄(1 − p̄); under the alternative they are separate, giving p₁(1 − p₁) + p₂(1 − p₂). The size is (z₁₋α/₂·√(2p̄(1 − p̄)) + zβ·√(p₁(1 − p₁) + p₂(1 − p₂)))² ÷ (p₁ − p₂)².

Both z values come from the normal quantile, and the page prints them so the inputs to the square can be checked. No continuity correction is applied, and the page says so: a corrected design needs a slightly larger sample.

How to use A/B Test Sample Size Calculator

Enter the control rate, the variant rate you want to detect, alpha and power, then press Run.

The result prints the per-arm size, the total, the unrounded value, both z quantiles and the pooled rate.

What to Expect

Best for

  • Planning the size of a two-arm conversion test
  • Checking a vendor's sample-size claim
  • Seeing how power changes the required size

Not ideal for

  • A one-arm test
  • Rates equal to 0 or 1
  • A clustered or sequential design, which needs a different formula

What this tool keeps

  • All four inputs exactly as typed

What may need cleanup

  • Nothing: the size is a whole number of visitors

Common errors

  • Equal rates are refused as undetectable
  • A rate outside 0 to 1 is refused by name

Example use cases

  • Size a 10 % to 12 % lift test
  • See the size grow at 90 % power
  • Check a planning spreadsheet

Sample input

p₁ = 0.10, p₂ = 0.12, α = 0.05, power = 0.8

Sample output

3841 per arm, 7682 in total, from an unrounded 3840.847

Who this is for

  • Growth analysts
  • Researchers planning a conversion test

Frequently asked questions

Why does the sample size grow when the effect shrinks?

The difference appears squared in the denominator, so halving the detectable lift roughly quadruples the sample. The page prints the unrounded size so that sensitivity is visible.

What does power mean here?

The probability of detecting the stated difference when it is real. At 80 % power, one design in five would miss an effect of exactly that size.

Is this the size per arm or in total?

Both are printed. The first line is per arm, the second doubles it for a two-arm test.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.