Short-form & Ads

How much traffic does an ad A/B test need? Sample size, cost and the peeking trap

By · Published · 4 min read

Two result bars, A and B, with overlapping error ranges: an ad A/B test that has not collected enough traffic to call a winner
Quick answer

To find a 20% relative improvement from a 3% rate (3.0% to 3.6%) with 95% confidence and 80% power, each version needs about 13,914 visitors, so 27,828 for two versions. Find a 10% improvement and you need roughly four times as many, 53,211 per version. Decide the smallest change you care about first, then read the result once at the end. The free Ad Test Planner works out the traffic, cost and days before you start, checks a finished test with ranges, and simulates why peeking misleads.

Diagram of this guide in 5 parts: Before the test: sample size and cost; Confidence and power in plain words; Several versions; After the test: reading the result; The peeking trap

Most ad tests end with someone looking at two numbers and picking the bigger one. Two steps get skipped: working out what the test needs, and asking whether the gap is bigger than luck would produce.

Before the test: sample size and cost

Enter the current rate, the smallest change that would matter to you, the number of versions, your cost per click and your daily budget. Some worked results from the tool, all at 95% confidence and 80% power:

  • 3% rate, 20% relative lift (3.0% to 3.6%), two versions: 13,914 per version, 27,828 in total.
  • 3% rate, 10% relative lift (3.0% to 3.3%): 53,211 per version. Halving the change roughly quadruples the traffic.
  • 1% rate, 20% relative lift (1.0% to 1.2%): 42,693 per version.
  • 3% rate, 20% lift, three versions with the Bonferroni adjustment: 16,850 per version, 50,550 in total.

Now add money. At 27,828 visitors and a cost of $1.20 a click, the first test costs about $33,394. With a $100 daily budget that takes 334 days. That is the honest answer to why small budgets cannot detect small changes: test bigger ideas, or accept a rougher answer.

Confidence and power in plain words

Confidence of 95% means that if the two versions were identical, you would wrongly see a difference about 5% of the time. Power of 80% means that if the real difference is the size you entered, you would see it about 80% of the time. The other 20% the test is unclear even though the difference is real.

Several versions

Each extra version is another chance for luck to produce a winner. With the adjustment on, the tool divides the error allowance by the number of comparisons with the original (the Bonferroni method). It is simple and cautious, and it is why a three-way test needs more than 1.5 times the traffic of a two-way test.

After the test: reading the result

Suppose version A had 150 conversions from 5,000 visitors (3.0%) and version B had 180 from 5,000 (3.6%). That looks like a 20% win. The tool shows:

  • A p-value of 0.093, which is above 0.05.
  • A range for the difference of about -0.10 to +1.31 percentage points. It includes zero, so the test cannot rule out no difference.
  • The result: not clear. That does not mean there is no difference, only that this test could not tell.

The tool also states the smallest change a test of this size could reliably find. With 5,000 visitors per version at a 3% base rate, that is about 4.03%, a rise of roughly 34%. A smaller real improvement is mostly invisible at this size.

The peeking trap

The result moves around early. If you look every day and stop at the first p-value under 0.05, far more than 5% of tests with no real difference will look like winners. Part 3 of the tool shows this with a simulation of identical versions. Decide the size first, then read the result once.

Limits to keep in mind

  • A p-value is the chance of seeing a difference this large if the versions were identical. It is not the chance that a version is better.
  • The sample size matches the standard two-proportion formula as coded in scipy and is within 0.5% of statsmodels' arcsine method. A simulation of 12,000 tests gave about 80% power and a 5% false positive rate at the planned size.
  • It assumes visitors are split evenly and independently. It does not model changing audiences, learning phases or novelty effects.

Frequently asked questions

How many visitors do I need for an A/B test?

It depends on your current rate and the smallest change you want to find. At a 3% rate, finding a 20% relative improvement needs about 13,914 visitors per version at 95% confidence and 80% power.

Why can I not stop the test as soon as one version leads?

Early results swing widely. Stopping at the first p-value below 0.05 gives far more false winners than the 5% you expect. Decide the sample size first and read the result once.

What does a p-value of 0.09 mean?

If the two versions were really identical, a difference this large would show up about 9% of the time. It is not the chance that one version is better, and it is not strong enough evidence at the usual 5% level.

Does not clear mean there is no difference?

No. It means this test could not tell. The range for the difference shows what is still possible, and the tool states the smallest change the test could reliably find.

Bhavesh Vaghela

Bhavesh Vaghela

Freelance video editor and motion designer in Rajkot, India. I make short-form videos, motion graphics, SaaS explainers, logo animations and AI video for clients worldwide.

Free tool: Ad Test Planner, open source under the MIT licence. Source code on GitHub. See all free tools. Related service: Short-form video ads.

Need short-form videos or ad creative?

Send me the details and I'll reply with ideas and a clear price.