Calculator · Marketing, Sales, Customer Experience & Communications, Research, Knowledge, Thinking & Analytics

A/B Test Sample Size Calculator

Before launching an A/B test, enter the current conversion rate and the smallest lift worth detecting to see the visitors each variant needs and how many days the test will take.

Inputs

The calculation runs only in your browser; your figures are not sent to our servers or stored.

The page shows the result for the example values; turn on JavaScript to calculate with your own figures.

Result

Visitors needed per variant
3,841
Total visitors
7,682
Test duration (days)
8
Target conversion of the new variant %
12%
Relative lift %
20%

The result updates with every change.

How the tool works: formula and worked example

Most A/B tests fail before they start. Teams stop a test as soon as the result looks promising after a few days, or run it on a page with too few visitors to detect any real difference. The decisions that follow rest on chance: a winning variant whose advantage vanishes after rollout, or a genuine improvement rejected because the test was too small to see it.

The fix is to set the sample size before launch, using a power analysis for two proportions as described by Cohen in 1988 and in Fleiss's book on rates and proportions. Four inputs drive it: the current conversion rate, the smallest lift you care to detect, the significance level, which is the chance of declaring a difference that is not there, and the power, which is the chance of detecting a difference that is. The smaller the lift or the lower the baseline rate, the more visitors you need. With more than two variants, the significance level is split across the comparisons with a Bonferroni correction.

In the default example the current conversion rate is 10% and we want to detect a 20% relative lift, which means reaching 12%. At 5% significance and 80% power each variant needs 3,841 visitors, 7,682 in total. With a thousand visitors a day the test is complete in 8 days. Adding a third variant would raise the requirement to 4,652 visitors per variant because of the multiple-comparison correction.

The number that matters is visitors per variant. Do not read the result before you reach it, and do not stop early because the gap looked large at first; repeated peeking raises the chance of crowning a false winner. If the test would run longer than eight weeks, test a bolder change that should have a bigger effect, or move the test to a busier page, because long tests get distorted by seasons and campaigns.

People often confuse relative and absolute lift. Going from 10% to 12% is a 2-point absolute lift and a 20% relative one, so pick the right type in the tool. Another mistake is ending a test mid-week; cover whole weeks, because visitors behave differently on working days and weekends. This calculation is for metrics expressed as a proportion, such as conversion or click-through. Average order value needs a different formula based on variance.

Standard and formula

Power analysis for two proportions (Cohen 1988; Fleiss): n per variant = [z(1−α/2) × √(2p̄(1−p̄)) + z(1−β) × √(p1(1−p1) + p2(1−p2))]² ÷ (p2 − p1)². Defaults: 5% two-sided significance and 80% power. With more than two variants the significance level is divided by the number of comparisons (Bonferroni).

Sources

How to use it

  1. Take the current conversion rate from at least two weeks of data.
  2. Set the smallest lift worth shipping commercially.
  3. Run the test until it reaches the computed size; do not stop early at the first promising result.

Frequently asked questions

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

It depends on your current conversion rate and the size of lift you want to detect. For a 10% rate and a 20% relative lift you need about 3,841 visitors per variant at the usual settings.

What do 5% significance and 80% power mean?

5% significance means accepting a 5% chance of declaring a difference that is not real; 80% power means an 80% chance of detecting the lift if it truly exists at the size you set.

Can I stop the test as soon as a winner appears?

No. Peeking and stopping early sharply raise the chance of a false result. Run until each variant reaches the computed size, ideally over whole weeks.

What is the difference between relative and absolute lift?

Absolute lift is the difference in percentage points, such as 10% to 12%, which is 2 points. Relative lift is that difference over the original rate, 20% in the same example.

Why does the size grow with more variants?

Each extra variant is another comparison with the control, which raises the odds of a false winner by chance. The significance level per comparison is tightened, so each variant needs more visitors.

Domains

Careers this tool serves

Programs that build this skill

  • Paper content studio: a ring light, a phone on a tripod, a creator figurine filming a product, small heart and share tokens drifting up: cover of the ARPS program Short Diploma in Digital Marketing Short Diplomas

    Marketing, Sales, Customer Experience & Communications

    Short Diploma in Digital Marketing

    Learn how a digital marketing team chooses an audience, message and channel, verifies real requests and decides where to spend. Follow a fictional training center from an audience need to a launch decision that protects access and service capacity.

    • 6 subjects
    • 24 lessons
    • 61 hours
    Free
    Start the first subject now
  • Paper control desk with multiple screens of blank ad tiles, a marketer figurine adjusting a gold dial while tiny cursor arrows stream out: cover of the ARPS program Specialist Preparation Program in Digital Marketing Specialist Preparation Programs

    Marketing, Sales, Customer Experience & Communications

    Specialist Preparation Program in Digital Marketing

    Learn to plan, execute and measure a digital campaign from business outcome to optimization decision. Build a segment, journey, message and channel plan, then execute search, content, email and landing pages before checking tracking, economics and experiments.

    • 8 subjects
    • 30 lessons
    • 54.5 hours
    Free
    Start the first subject now
  • Paper garden where seedlings of different heights grow from a laptop keyboard, the tallest plant reaching a gold sun-disc at the top: cover of the ARPS program Short Diploma in SEO and Organic Growth Short Diplomas

    Marketing, Sales, Customer Experience & Communications

    Short Diploma in SEO and Organic Growth

    A practical foundation in how search engines work, how to interpret search intent, and how content, technical structure, links and measurement support sustainable organic growth without manipulation or ranking guarantees.

    • 6 subjects
    • 25 lessons
    • 59 hours
    Free
    Start the first subject now
  • Product team around a paper roadmap board with cards in three columns, a prototype app on a phone stand, a gold flag-less milestone pin: cover of the ARPS program Short Diploma in Product Management Short Diplomas

    Entrepreneurship, Innovation & Product

    Short Diploma in Product Management

    A foundational diploma on moving from product problems and users to value, strategy, priorities and roadmaps, then collaborating on delivery and launch, measuring outcomes and learning through experiments after release.

    • 6 subjects
    • 24 lessons
    • 59.5 hours
    Free
    Start the first subject now

Related tools

All tools · Professional encyclopedia