A/B test sample size calculator for landing pages

How many visitors does each version of your page need before the result means something? Three numbers give the answer, and how many days of traffic it takes.

Calculator

How many visitors does your test need?

Two-sided test at 95% confidence and 80% power, two versions with an even split.

Visitors per version—
Visitors in total—
Days at your traffic—

Change the current rate to 2% to see why tests on purchases need so much more traffic than tests on click-through.

What the numbers mean

A test compares two versions of a page on the same traffic. Because visitors are random, the two versions never score exactly the same, even when they are identical. The sample size is the number of visitors each version needs before a difference of the size you care about can be told apart from that noise.

Three inputs decide it:

  • The current rate. Your conversion rate today, on the step you will measure: click-through from a presell page to the product page, or purchases per visitor.
  • The smallest lift worth detecting, written relative to the current rate. Detecting a move from 30% to 34.5% is a 15% lift.
  • Your daily traffic, to turn visitors into days.

The formula behind it

The calculator uses the standard formula for comparing two proportions, with a two-sided test at 95% confidence (z = 1.96) and 80% power (z = 0.84). With p₁ the current rate, p₂ the rate you want to detect and p̄ their average:

n per version = (1.96 × √(2 p̄ (1 − p̄)) + 0.84 × √(p₁(1 − p₁) + p₂(1 − p₂)))² ÷ (p₂ − p₁)²

You do not need to compute it by hand, but it explains the two rules every tester learns the hard way: the sample grows with the square of the inverse of the gap, and it explodes when the rate is small.

Why purchases are so hard to test

What you measureCurrent rateLift to detectVisitors per versionDays at 400 visitors a day
Click-through to the product page30%15%1,6939
Purchases per visitor2%30%9,79849
Purchases per visitor2%15%36,693184

The same 15% lift that takes nine days to detect on click-through takes six months on purchases. Two habits follow:

  • Test bold changes. Halving the lift you want to detect roughly quadruples the visitors you need. A new angle or a new format can move the rate by 20% or more; a button color will not, and you will never have the traffic to prove it did.
  • Measure the step with volume. Decide on click-through to the product page when purchases are too rare, then keep watching purchases to confirm the winner holds.

Run the test properly

  • Run whole weeks. People browse and buy differently on a Monday and on a Sunday. Cover at least one full week, two when you can, even if the sample size is reached earlier.
  • Do not peek and stop. Checking every day and stopping at the first significant result finds false winners far more often than the 5% you accepted.
  • Change nothing during the test. Budgets, audiences, offers and ads stay the same until the end, or the two versions no longer see the same visitors.
  • Write the decision down, including "no difference". A test log stops a team from re-testing the same idea every six months.

When the planned sample is reached, read the result with the A/B test significance calculator. For what to test first on a presell page (angles and formats before buttons), read the A/B testing guide.

Frequently asked questions

What is a minimum detectable effect?

The smallest lift you want the test to be able to see, written relative to your current rate. A 15% effect on a 30% rate means detecting a move to 34.5%. Smaller effects are real but need far more visitors to tell apart from noise.

Why 95% confidence and 80% power?

They are the usual defaults. 95% confidence means a 5% chance of calling a winner when the versions perform the same; 80% power means an 80% chance of detecting the lift if it is real. Raising either one raises the sample size.

Can I stop the test as soon as one version is significantly ahead?

No. Checking repeatedly and stopping at the first significant result produces false winners far more often than 5% of the time. Decide the sample size first, run whole weeks, and read the result once at the end.

Should I measure purchases or click-through?

Purchases are what you want, but they are rare, so tests on them need a lot of traffic. Click-through to the product page needs far fewer visitors. A common compromise is to decide on click-through and keep watching purchases to confirm the winner holds.

More free tools

Go further

Guides that use these numbers

All articles

Testing & growth13 min read

A/B testing presell pages: read the result clearly

Read a presell A/B test against the plan you wrote before launch. Keep the same visitor basis, check the product handoff, and separate clicks from purchases. A result below your evidence threshold remains uncertain; it does not prove that the pages perform alike.

Testing & growth12 min read

Presell page math: when the extra step pays for itself

A presell funnel pays when its orders leave more contribution than the same traffic sent straight to the store. Multiply click-through by the purchase rate, then check costs. Keep the same traffic basis, price and cost rules. More clicks or a bigger order alone do not prove a win.

From product URL to presell page in minutes

Advertorial, listicle, quiz, comparison and more, written from your product page and ready to edit.