A/B Test Sample Size Calculator
Calculate required sample size for A/B tests
Inputs
Provide the following 3 values to run the A/B Test Sample Size Calculator:
- Baseline Conversion Rate (%) [number] (required)
- Minimum Detectable Effect (%) [number] (required)
- Confidence Level [select] (required)
What it calculates
This tool returns:
- Per Variation — primary result
- Total Sample
- Baseline (%)
Worked example
For the sample inputs below:
- Baseline Conversion Rate (%): 5
- Minimum Detectable Effect (%): 5
- Confidence Level: 1.645
the A/B Test Sample Size Calculator produces:
- Per Variation: 42105
- Total Sample: 84210
- Baseline: 5%
How it works
The result is derived through the following steps:
p1 = baselineRate / 100p2 = p1 * (1 + mde / 100)z = parseFloat(confidence)pAvg = (p1 + p2) / 2sampleSize = ceil(2 * pow(z, 2) * pAvg * (1 - pAvg) / pow(p2 - p1, 2))
Frequently Asked Questions
What is an A/B test?
An A/B test compares two versions of a webpage or app to determine which one performs better in achieving a goal.
Why do I need to calculate sample size for A/B testing?
Calculating sample size ensures that your test results are statistically valid and helps avoid misleading conclusions.
How does the A/B Test Sample Size Calculator work?
You enter your expected conversion rates, desired confidence level, and statistical power, and the calculator calculates the required sample size.
What factors influence the sample size for A/B tests?
Factors such as baseline conversion rate, minimal detectable effect size, desired confidence level, and statistical power all impact the sample size required.
Can this tool help reduce the time needed for A/B testing?
Yes, by accurately determining the required sample size, this tool helps you run tests more efficiently and effectively.