Why calculate sample size before testing?
What is A/B test sample size?
Sample size is the minimum number of visitors each variation needs for your A/B test to reach a trustworthy conclusion. With too small a sample, you may fail to detect a real improvement — or mistake a random difference for one.
Why you should calculate sample size before you start
Repeatedly checking results and stopping the moment they look significant (peeking) greatly inflates false positives. Decide the required sample size and duration before you start, and judge the results only after meeting them — that is what makes an experiment trustworthy.
Understanding minimum detectable effect (MDE)
MDE (Minimum Detectable Effect) is the smallest uplift you want your experiment to detect. The smaller the MDE, the more sample you need — steeply. For example, at a 3% conversion rate, detecting a 10% relative uplift takes about 53,000 visitors per variation, while detecting 5% takes about 210,000. Setting a realistic MDE for the traffic you can secure is the heart of experiment design.
What is sample ratio mismatch (SRM)?
Sample ratio mismatch (SRM) is when the number of samples actually assigned to each group differs sharply from the intended split. If one arm of a 50:50 experiment is clearly smaller, you may have a data quality issue — a randomization failure, missing events, bot traffic, or load failures in a specific environment. Conversion comparisons are distorted in that case, so find the cause before judging results. The SRM checker runs a chi-square goodness-of-fit test using only observed sample sizes and expected ratios, and warns about a mismatch when the p-value is below 0.01.
The statistical standards behind the calculators
The sample size, duration, MDE, and significance calculators are based on a two-proportion z-test (two-tailed) with a 95% confidence level (α = 0.05) and 80% statistical power (β = 0.2) — the industry-standard settings adopted by most A/B testing tools. The SRM checker answers a different question, so it uses a chi-square goodness-of-fit test at a 0.01 significance level.