Ad Test Sample Size Calculator – Plan Before You Spend
Two creatives go live on Monday. By Wednesday one is ahead, by Friday the other is, and at some point somebody declares a winner because the dashboard looked right that morning. The test never had a chance of answering anything, because nobody worked out how much traffic it would take. An ad test sample size calculator settles that question in advance: given the rate you already get and the smallest improvement you would actually act on, how many impressions does each variant need before the comparison means something?
The formula, and what each piece is doing
This is the normal-approximation formula for comparing two independent proportions. Everything in it is a number you chose.
p̄ = (p₁ + p₂) / 2 0.045
( z_α·√(2p̄(1−p̄)) + z_β·√(p₁(1−p₁)+p₂(1−p₂)) )²
n_arm = ───────────────────────────────────────────────
(p₂ − p₁)²
z_α = Φ⁻¹(1 − α/2) two-sided 1.959964
z_β = Φ⁻¹(power) 0.841621
n_arm at 4% → 5%, α=0.05, 80% power 6,744.93 → 6,745Two details in there cause most of the confusion. The first is that z_β is the quantile of the power, not of β — feeding it 1 − power flips the sign and quietly halves the answer. The second is that n_arm sizes one group. A test has two, so the traffic it really consumes is double: 6,745 per arm is 13,490 impressions in total. The calculator above prints both figures next to each other because showing only the first is the standard way this class of tool misleads people.
The minimum detectable effect is a business decision
The minimum detectable effect is the smallest change worth the creative work and the budget to chase. Nothing in a calculator can know that number — it depends on your margins, your production costs and what you would actually do differently if the variant won. That is why the field ships empty here and why no value is offered as a starting point. It is also the most consequential input on the page, and the one people set carelessly.
The cost of setting it small is not linear, it is quadratic: n scales with 1/(p₂ − p₁)². At a 4% baseline with α = 0.05 two-sided and 80% power, detecting a +25% relative lift takes 6,745 per arm, while detecting a +10% relative lift takes 39,475 per arm. An effect 2.5 times smaller costs 5.9 times the traffic. The curve on this page draws exactly that wall.
Fix the stopping rule before the test starts
This is the whole reason the planning step exists. A test with no pre-declared end is not a test, it is a search for the morning on which the numbers look good. Once the planned sample is reached, the analysis is a separate job — the companion Ad A/B Test Significance Calculator takes the observed counts and produces the p-value and the confidence intervals. This page deliberately refuses to accept conversion counts and never prints a verdict.
“No significant difference” is not “no difference”
An inconclusive test says your data could not separate the two options at the precision you asked for. It does not say the creatives perform identically. An underpowered test will usually come back inconclusive whether or not a real effect exists, and on the occasions it does show a winner, the size of the win will be badly overstated — only the luckiest noise clears the bar, so the estimate that clears it is inflated. That is the practical danger of running a test that was never big enough.
When the required sample is more traffic than you have
Sometimes the honest answer is that the test cannot be run. That is worth knowing before the budget is committed rather than after. The levers are real but limited: accept a larger detectable effect, since only a bigger difference is findable at your volume; lower the power and accept missing real effects more often; or test a change with a bigger expected impact than a headline tweak. Running the underpowered version anyway is the one option that spends the money and returns nothing.
What the number is, and is not
The figure is an approximation. The normal approximation to a binomial comparison holds well at the rates and volumes paid-social tests run at, but it degrades when the expected number of conversions per arm is small — below roughly ten expected successes and ten expected failures in each cell, the tool flags it and the true requirement is likely somewhat larger. It is also specific to two arms and a binary outcome. Testing three creatives at once, or measuring revenue per visitor rather than a conversion rate, needs a different formula altogether.