Skip to main content
Free Calculator

A/B Test Sample Size Calculator

Plan control, variant, total sample, and duration for conversion rates or continuous averages. Choose MDE units, alpha, power, direction, allocation, and exposure; then copy a share link, analyst summary, or CSV.

Live plan

62,468 total observations

31,234 control · 31,234 variant

Traffic and statistical settings

Defaults are suitable for a standard fixed-horizon plan. Open these when your traffic, allocation, or pre-registered hypothesis differs.

Fixed-horizon plan

62,468 total observations

31,234 control · 31,234 variant

Control

31,234

Variant

31,234

Duration

7 days

Duration assumes 10,000 eligible observations/day at 100% exposure. Edit Traffic used for duration. Target 5.50% · alpha 5% · power 80% · two-sided. Switch to Analyze to carry this plan forward.

Preserve this plan before launch.

Carry the sample horizon, method, alpha, power, allocation, direction, stopping rule, and practical threshold into a private pre-test record.

Save this plan in GrowthLayer · free account

Share links store inputs in the URL fragment, which is not sent to the server. Anyone with the link can read those inputs.

The sample target is ready. Preserve why the team chose it.

A calculator answers one question and forgets it. GrowthLayer keeps each test your team saves — the hypothesis, the numbers, and the decision — so future planning can start from a reviewable record.

  • Structured history of saved experiments
  • Import results from CSV in one step
  • Program summaries across saved tests
  • Free to start — no card required

Methodology

This calculator creates a fixed-horizon sample plan for two independent experiment arms. For binary conversion metrics, the target is computed from the baseline and relative or absolute MDE. The large-sample two-proportion formula combines the pooled variance term used for the null boundary with the arm-specific variance term used for power. The alpha critical value follows the selected one- or two-sided direction. For continuous average metrics, the plan uses the declared baseline mean, historical standard deviation, MDE, alpha, power, direction, and allocation. The standard deviation must describe the same metric and eligible population planned for the experiment. Allocation is explicit. GrowthLayer calculates separate control and variant requirements instead of assuming a 50/50 split. Total sample is divided by eligible observations per day multiplied by experiment exposure to estimate duration. The plan assumes independent observations at the randomization unit, stable metric definitions, and a final analysis compatible with the fixed-horizon design. It does not make repeated optional stopping valid. Multiple variants require a multiple-comparison plan that is outside this focused two-arm calculator. Impossible binary targets at or above 100% return an error. Results are rounded up because partial observations cannot be randomized.

Sources and limitations

Frequently Asked Questions

How is A/B test sample size calculated?
The calculator combines the baseline and target variance with the critical value for alpha, the critical value for power, the test direction, and the planned allocation. Binary conversion metrics use a large-sample two-proportion plan. Continuous averages use the baseline mean and historical standard deviation.
Is the result per variation or total?
GrowthLayer reports control, variant, and total observations separately. Unequal allocation can make the arm requirements different. Duration uses the total eligible observations, daily traffic, and the percentage of traffic exposed to the experiment.
What is minimum detectable effect (MDE)?
MDE is the smallest effect the design is powered to detect at the declared alpha and power. It is a resolution target, not a forecast. Choose the smallest effect that would change the business decision, then check whether the required sample is feasible.
Should I enter relative or absolute MDE?
Use the unit your decision uses, but save both. A 10% relative lift on a 5% baseline is a 0.5 percentage-point increase and a 5.5% target. The calculator displays the target so a unit mistake is visible.
What alpha and power should I use?
Alpha 0.05 and power 0.80 are common defaults, not universal laws. A lower alpha reduces false positives but increases sample. Higher power reduces false negatives at the MDE but also increases sample. Declare both before launch and match them to the final analysis method.
Should I use a one-sided sample-size plan?
Two-sided is the recommended default because the variant can help or harm. Use an increase-only one-sided plan only when that direction and decision rule are declared before seeing results and an effect in the opposite direction would not be called significant.
How does allocation affect sample size?
A 50/50 split is statistically efficient when the arms have similar cost and variance. Unequal splits can protect control traffic or support operational constraints, but they usually require more total observations for the same power.
Is a two-week minimum enough?
No calendar rule replaces sample and power. Complete weekly cycles can reduce day-of-week distortion, but the experiment still needs the declared eligible sample and a stable business environment. Use the duration estimate, then account for cycles, holidays, and operational changes.

Related Calculators

Choosing a method or double-checking another tool? Compare 11 public A/B test calculators and download the evidence matrix.

Updated for 2026. Built by GrowthLayer — built for evidence-aware experimentation teams.