
Size matters: How to plan test duration when using CUPED
CUPED is a powerful technique that not only enhances the sensitivity of your tests but also helps in resource optimization by reducing the number of subjects needed for experiments.

Sample size is how many observations an experiment needs to detect an effect of a chosen size with a chosen reliability. It is derived from four inputs — baseline, minimum detectable effect, significance level and power — and it must be fixed before the test starts.
nSample size is not a thing you choose; it is a thing you compute. Four numbers go in — the baseline rate of your metric, the smallest effect worth detecting, the significance level and the statistical power you want — and the required n comes out. Three of those four are conventions you will barely think about. The one that does the work is the minimum detectable effect, and it is a business judgement rather than a statistical one.
The relationship that governs everything is the square law. The effect size appears squared in the denominator, so halving the effect you want to detect multiplies the sample by four. This is why a test for a 10% lift is comfortable and a test for a 2% lift on the same metric needs twenty-five times the traffic — and why teams so often discover that the improvement they care about is not measurable at their scale. Better to learn that from a calculation than from six weeks of running.
Fixing the number in advance is the part that makes the whole procedure honest. A test whose duration is decided by watching the p-value has an error rate several times its nominal one, because every look is another chance to cross the threshold. If you genuinely need to monitor continuously — and there are good reasons to — use sequential testing, which is designed for it and charges the error budget correctly as it goes. What you cannot do is run a fixed-horizon test and treat it as if it were sequential.
Once you have the number, round the duration up to whole weeks. Behaviour differs systematically between weekdays and weekends, and a test that stops mid-week contains an unbalanced mix of days. That does not bias the comparison, since both arms see the same days, but it does add variance, and two full weeks also gives novelty effects room to decay so you can compare week one against week two.
The most useful move when the number comes back too large is not to compromise on power but to reduce variance. CUPED using a pre-period covariate commonly cuts the requirement by 20-50% on metrics with a strong pre-period correlate. Triggering the analysis at the point of exposure rather than at assignment often does more. Choosing a less volatile primary metric, or winsorising an outlier-heavy revenue measure, both work on the same lever. All of these buy sensitivity without buying traffic, which is the only free lunch in the subject.
One formula per outcome type, both the same shape: a constant set by alpha and power, times the variance, divided by the squared effect.
n = ( z₁₋α/₂ + z₁₋β )² · ( p₁(1−p₁) + p₂(1−p₂) ) / (p₁ − p₂)²The conversion-rate case. At α = 0.05 and 80% power the leading constant is (1.960 + 0.842)² = 7.85.
n = 2·( z₁₋α/₂ + z₁₋β )² · σ² / δ²For revenue or duration. σ² is the variance of the outcome, which is why variance reduction is worth as much as extra traffic — see the two-sample t-test calculator.
n ∝ 1 / δ²Halve the detectable effect, quadruple the sample. This single relationship explains most of the surprise in sample-size conversations.
n₉₀ / n₈₀ = ((1.960 + 1.282) / (1.960 + 0.842))² = 1.34Going from 80% to 90% power costs 34% more sample; 95% costs 66% more. Usually cheaper than the cost of a false negative on an irreversible decision.
A subscription product converts trials at 11.5%. The team wants to detect a 4% relative improvement — 11.5% to 11.96% — at the conventional 5% two-sided level and 80% power. They start 9,000 trials a week and would split evenly between two arms.
About 13.7 weeks per arm — a fourteen-week test. At a 6% MDE it drops to about six weeks; at 8%, to three and a half.
Fourteen weeks is not an experiment, it is a quarter, and over that horizon the product, the traffic mix and the season will all change underneath it. The square law is what makes the alternatives so unequal: relaxing the MDE from 4% to 6% is a 1.5× change in the effect and a 2.25× change in the duration, which is the difference between a test you can run and one you cannot. So the real question is whether a 4% lift is genuinely the smallest one worth shipping, or whether that number was chosen because it sounded modest. If it is genuine, the answer is variance reduction — a pre-period covariate on a subscription funnel typically has a strong correlation and could bring fourteen weeks closer to eight — not a shorter test at 40% power, which would answer nothing.

CUPED is a powerful technique that not only enhances the sensitivity of your tests but also helps in resource optimization by reducing the number of subjects needed for experiments.


In A/B testing, you often have to balance statistical power and how long the test takes. Learn how Allocation, Effect Size, CUPED & Binarization can help you.

Applying it to a live measurement problem is the part that goes wrong. If you are designing an experiment, reading a result you do not trust, or trying to work out what your marketing actually caused, that is the work we do.