AdManage.ai logo
← All free tools

Free tools for media buyers · No signup

A/B test sample size calculator

Plan the traffic needed for a two-variant conversion test before it starts. Define the effect worth detecting, then estimate participants and traffic-based duration.

Plan a two-variant conversion test

Fixed-sample approximation · two-sided α = 0.05 · equal 50/50 allocation · independent binary outcomes.

Estimated participants per variant

8,158

Round up and allocate this many independent participants to each group.

Total participants, A + B16,316
Traffic-based duration17 days
Target conversion rate6%
Absolute increase1 pp

5% → 6% = 20% relative lift. Power: 80%; two-sided significance level: 5%.

Duration is total participants ÷ daily eligible visitors, rounded up. It excludes conversion delay and business cycles; reaching the count alone does not make a test well designed. Do not stop early after a low p-value.

Method: pooled null and unpooled alternative variance, no continuity correction, neglecting the far tail in the two-sided power approximation. Expected converters and non-converters must each be at least 10 per group. No sequential, clustered, multi-variant or revenue-outcome adjustment.

n per variant ≈ [1.96√(2p̄(1−p̄)) + zpower√(pA(1−pA)+pB(1−pB))]² ÷ (pB−pA)²

How to use this calculator

  1. Enter an expected baseline conversion rate between zero and 100%.
  2. Choose the smallest relative lift or percentage-point increase worth detecting, and select 80% or 90% power.
  3. Review the estimated participants per group. Optionally enter total eligible visitors per day for a traffic-only duration estimate.

Worked example

An illustrative baseline converts 5% of eligible participants. A 20% relative lift means detecting 6%, an increase of one percentage point. With equal allocation, two-sided alpha 0.05 and 80% power, this approximation requires about 8,158 participants per group, or 16,316 total. At 1,000 eligible participants per day, the traffic-only estimate rounds up to 17 days.

Minimum detectable effect is a planning input

The effect is the increase you want the design to have the stated power to detect. It is not a prediction that your treatment will achieve that lift. A 20% relative lift on a 5% baseline means a 6% target; a 20-percentage-point increase would instead mean 25%. Switching the definition preserves the entered effect when the baseline is valid.

Power and significance answer different questions

The design fixes the two-sided significance level at 5%. Power is the planned chance of detecting the specified alternative under the model assumptions. Increasing power from 80% to 90% generally needs more traffic. Neither setting guarantees that a completed test will produce a significant result.

A sample count does not define the entire test

Use independent randomized participants and a binary outcome, with one outcome per participant. The form assumes exactly two groups with a 50/50 split and a fixed analysis point. Conversion delay, weekday patterns, clustering and measurement quality still need a plan. It does not adjust for many variants, repeated peeking or revenue metrics.

Reference: statsmodels: two-proportion sample-size approximation.

Common questions

Is the result per variant or for the whole test?

The headline is participants per variant, rounded up. The total is twice that count for the two equally allocated groups. Daily eligible traffic is the total across both groups, not traffic for each group separately.

Which sample-size method is used?

A closed-form normal approximation with pooled variance under the null and unpooled variance under the alternative, without continuity correction. It uses alpha/2 for a two-sided design and neglects the far tail in the power approximation. It is not an exact-binomial calculation.

Why can the estimate be unavailable?

The target must be higher than the baseline and both rates must be strictly between zero and 100%. The tool withholds estimates when expected converters or non-converters are below 10 per group, or the count exceeds its numeric limit. Sparse outcomes need an appropriate alternative design.

Can I stop as soon as I reach the traffic count?

The count is only one design requirement. Allow outcomes to mature and cover the business cycles specified before starting. Repeatedly checking for significance and stopping opportunistically changes the interpretation of a fixed-sample analysis. Use the separate A/B calculator at the planned analysis point.

Related guides