Sample Size Equation:
From: | To: |
The sample size equation calculates the minimum number of participants needed in each group of an A/B test to detect a statistically significant difference, given a specified confidence level and margin of error.
The calculator uses the sample size equation:
Where:
Explanation: The equation balances the trade-off between statistical power (ability to detect a difference) and practical constraints (number of participants needed).
Details: Proper sample size calculation ensures your A/B test has sufficient statistical power to detect meaningful differences while avoiding unnecessarily large samples that waste resources.
Tips: Common values are Z=1.96 (95% confidence), p=0.5 (most conservative estimate), e=0.05 (5% margin of error). All values must be valid (0 < p < 1, e > 0).
Q1: What Z-score should I use?
A: 1.96 for 95% confidence, 2.58 for 99% confidence, or 1.645 for 90% confidence.
Q2: Why use p=0.5 as default?
A: p=0.5 gives the most conservative (largest) sample size estimate when the true proportion is unknown.
Q3: How does margin of error affect sample size?
A: Smaller margins require dramatically larger samples (n ∝ 1/e²).
Q4: Is this for continuous or binary metrics?
A: This formula is for binary outcomes (conversion rates). Continuous metrics require different formulas.
Q5: Should I adjust for multiple comparisons?
A: Yes, if testing multiple variants simultaneously, consider Bonferroni or other corrections.