# A/B Test Sample Size Calculator

> Find how many visitors each variant needs to detect a chosen lift in conversion rate at your significance level and power, one- or two-sided.

Category: Statistics & probability · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/ab-test-sample-size-calculator

Set the current conversion rate, the smallest lift worth detecting, α and power, and get the visitors needed per variant before you start the test.

Also called: Split test sample size calculator.

## Inputs
- Baseline conversion rate (unit %; default 10)
- Minimum detectable effect (default 2)
- Effect is (options: Absolute (points), Relative (%); default absolute)
- Significance level α (unit %; default 5)
- Power (unit %; default 80)
- Test (options: Two-sided, One-sided; default two)

## Results
- Visitors per variant
- Total visitors (2 variants)
- Rate you want to detect
- Absolute effect (points)
- Exact value before rounding up

## Formula

```
n = (z_α √(2p̄(1 − p̄)) + z_β √(p₁(1 − p₁) + p₂(1 − p₂)))² ÷ (p₂ − p₁)²,  p̄ = (p₁ + p₂) ÷ 2;  round up
```

Where:
- p₁: baseline rate
- p₂: baseline plus the minimum detectable effect
- z_α: z₁₋α/₂ (two-sided) or z₁₋α (one-sided)
- z_β: normal quantile of the power

## Worked example
1. p₁ = 0.10, p₂ = 0.12, p̄ = 0.11; z_α = 1.96, z_β = 0.8416.
2. Numerator: (1.96 × √(2 × 0.11 × 0.89) + 0.8416 × √(0.09 + 0.1056))² = 1.53634.
3. n = 1.53634 ÷ 0.02² = 3840.85 → 3,841 per variant.

**Result:** Detecting a lift from 10% to 12% needs 3,841 visitors per variant, 7,682 in total.

## What the result means

Divide the total by your daily eligible traffic to estimate the test duration, and run whole weeks to average out weekday effects. If the duration is impractical, test a bolder change with a larger effect.

## Assumptions and limits
- Equal traffic split and the pooled two-proportion z-test; matches R’s power.prop.test.
- Assumes you look at the result once, at the planned sample size.
- Not for revenue or other continuous metrics, which need their variance.

## Questions

### Relative or absolute effect?

A 20% relative lift on a 10% baseline is the same as a 2-point absolute lift: both target 12%.

### Why does a low baseline need so many visitors?

Rare events carry little information each, and small absolute differences need large samples: required n grows with 1 ÷ (effect)².

## Related calculators
- [A/B Test Significance Calculator](https://calculators.geekmidst.com/calculators/ab-test-conversion-significance-calculator)
- [Statistical Power Calculator](https://calculators.geekmidst.com/calculators/statistical-power-approximation-calculator)
- [Sample Size Calculator](https://calculators.geekmidst.com/calculators/sample-size-calculator)

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/ab-test-sample-size-calculator
