1. Home
  2. Productivity tools
  3. A/B Test Sample Size & Duration Calculator

A/B Test Sample Size & Duration Calculator

For marketers and product teams who plan a test before they start.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use A/B Test Sample Size & Duration Calculator

  1. Fill in the form, or press a sample to see a worked example.
  2. Read the result and any warnings.
  3. Copy the output or download it.

Features

  • Visitors needed per version and in total
  • Baseline rate, smallest lift (relative or in points), significance and power
  • Two or more versions
  • Days at your traffic and the share of visitors in the test
  • Rounds up to whole weeks

Supported formats

Input

  • Typed numbers

You get

  • Result

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the A/B Test Sample Size & Duration Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • It uses a standard two-proportion sample size formula and assumes steady traffic.
  • Wait for the planned number of visitors before reading a result.

Guide

Planning an A/B test: sample size and how many days it needs

The most common mistake in A/B testing is to start without knowing how long it will take. People stop when the result looks good, or run on for weeks with too little traffic to ever see a difference. Both lead to wrong decisions. Before you start, work out how many visitors each version needs, and then how many days that will take at your traffic. This calculator does both.

The inputs

Enter your current conversion rate and choose how to describe the smallest change worth detecting: as a relative change, such as 20% more conversions, or in percentage points, such as one point more. Choose a significance level of 10%, 5% or 1% and a power of 80% or 90%. Then give the number of versions, including the original, the visitors per day on the tested page and the share of those visitors who take part in the test.

How the sample is calculated

The tool uses the standard formula for comparing two proportions in a two-sided test with equal groups. It combines the baseline and the new rate, the critical values for your significance and power, and the variance of each rate, and gives the number of visitors per version, rounded up. Multiplying by the number of versions gives the total. The smaller the difference you want to detect, the larger the sample.

From visitors to days

Divide the total visitors by the daily visitors multiplied by the share in the test, and you have the days. The tool rounds the run time up to whole weeks, because behaviour differs by day of the week, and a test that stops mid-week gives a biased view. The result gives the days at your traffic and the run time in weeks and days.

When the answer is too long

If the test would take more than three months, a note says so. Options are to look for a bigger change, to test on a page with more traffic, to test a step that converts better or to accept a smaller power. Running a test for months invites other changes to the site and to the audience that make the result unreliable.

Worked examples

The first sample starts with a 5% rate and a smallest change of 20% relative, which means detecting a move from 5.00% to 6.00%, at 5% significance and 80% power, for two versions with 600 visitors a day. It needs 8,158 visitors per version, 16,316 in total, 28 days of traffic and a run of 4 weeks. The second sample looks for a change from 2.00% to 2.20% on a smaller page: it needs 80,682 per version and 161,364 in total, which takes 538 days, about 77 weeks, and triggers the warning.

Limits

The calculation assumes a steady conversion rate and independent visitors. It does not account for seasonality, repeat visitors, several goals or testing more than two versions with corrections for multiple comparisons. Wait until the planned number of visitors is reached before reading the result, and use the A/B Test Calculator on this site to judge it.

Checked against the current version of the A/B Test Sample Size & Duration Calculator on .

Frequently asked questions

What does power mean?

Power is the chance that the test detects a real difference of the size you chose. At 80%, four out of five such tests will reach significance. Raising it to 90% needs more visitors. It is separate from significance, which controls the risk of a false win.

Why should I decide the smallest change first?

Because the smaller the change you want to detect, the more visitors you need, and the number grows fast. Choose the smallest lift that would matter to your business. If you cannot afford the visitors for it, test a bolder change instead.

Why run for whole weeks?

Behaviour differs by day of the week, so whole weeks keep the comparison fair.

What if the test would take months?

Look for a bigger change, a page with more traffic or a higher-converting step. Small changes need very large samples.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.