A/B test sample size calculator
How many units each variant needs, how long that takes at your traffic, and how much CUPED shortens it. Runs entirely in your browser; nothing is sent anywhere.
Inputs
A 10% relative lift on a 5% baseline means detecting 5.5%.
More than two arms applies a Bonferroni correction to α.
Results
Sample per variant (no CUPED)
–
Days to run (no CUPED)
–
Sample per variant with CUPED
–
Days to run with CUPED
–
Show the formula
Conversion metric (two-proportion z-test, two-sided). With baseline p₁, target p₂ = p₁(1 + MDE), p̄ = (p₁ + p₂)/2:
n = [ z(1−α/2) · √(2 p̄(1−p̄)) + z(1−β) · √(p₁(1−p₁) + p₂(1−p₂)) ]² / (p₂ − p₁)²
Continuous metric with mean μ, standard deviation σ, and absolute effect δ = |μ| · MDE:
n = 2 · (z(1−α/2) + z(1−β))² · σ² / δ²
CUPED. Regressing the metric on a pre-experiment covariate with correlation r leaves residual variance σ²(1 − r²), so
nCUPED = n · (1 − r²)
Multiple variants. With k arms, there are k−1 comparisons against control; α is divided by k−1 (Bonferroni). Days = total sample across all arms ÷ daily eligible traffic, rounded up.
Current z-values: