# A/B test duration calculator

> Free A/B test duration calculator. Enter daily visitors, conversion rate and the lift to detect to get the sample size per variant and days to run.

Free, no sign-up, runs in the browser: https://analify-ai.scalyax.ai/tools/ab-test-duration-calculator

Find out how many visitors each version needs and how many days your test must run before you can trust the result.

## What it calculates

An A/B test needs enough visitors to tell a real difference from chance. The smaller the lift you want to detect and the lower your conversion rate, the more visitors you need. This calculator uses the standard two-proportion sample size formula at 80% power and your chosen confidence.

## Formula

```
p₂ = p₁ × (1 + lift)
n per variant = (z_α × √(2p̄(1 − p̄)) + z_β × √(p₁(1 − p₁) + p₂(1 − p₂)))²
                ÷ (p₂ − p₁)²
Days = n ÷ (daily visitors ÷ 2), at least 7
```

## Worked example

Inputs:
- Visitors per day: 2000
- Current conversion rate: 1.5%
- Smallest lift to detect: 20%
- Confidence: 95%

Results:
- Days to run: 29 days
- Visitors per variant: 28,304
- Total visitors: 56,608
- Conversions per variant: 425

## What changes the result

Smallest lift to detect at five values; every other input as in the example.

| Smallest lift to detect | Days to run | Visitors per variant |
| --- | --- | --- |
| 10% | 109 days | 108,153 |
| 15% | 50 days | 49,193 |
| 20% (example) | 29 days | 28,304 |
| 25% | 19 days | 18,519 |
| 30% | 14 days | 13,141 |

## How to read the result

If the test needs months, test bigger changes. A larger lift needs far fewer visitors.
Run at least one full week so every day of the week is included, and don't stop early because one version looks ahead.

## Questions

**How long should an A/B test run?**
Until each version reaches the sample size, and at least one full week.

**Why do I need so many visitors?**
Small differences in a low conversion rate are hard to separate from chance. Detecting a bigger lift needs far fewer visitors.

**What does 95% confidence mean?**
If there were no real difference, a result this strong would show up by chance only 5% of the time.

**Do you store what I enter?**
No. The calculation runs in your browser and nothing is sent to Analify.

## Use your real numbers

Analify reads daily sessions and conversion rate from Google Analytics, the two numbers this calculator needs. Analify reads 2 of these 4 inputs live. Try the calculator: https://analify-ai.scalyax.ai/tools/ab-test-duration-calculator

More free ecommerce calculators: https://analify-ai.scalyax.ai/tools
