What is the Sample Size Calculator?
Calculate required sample size for surveys, mean estimates, A/B tests, and two-group comparisons with this free sample size calculator. Set confidence level, margin of error, power, and effect size — get step-by-step formulas and rounded-up n. Runs instantly in your browser.
How to use the Sample Size Calculator
- Choose Proportion (survey), Mean, Two Means, or Two Proportions (A/B test).
- Enter estimated proportion or standard deviation, margin of error, or effect size.
- Set confidence level (90/95/99%) or power and significance for hypothesis tests.
- Review the recommended sample size per group or total respondents.
- Copy calculation steps for your study plan or statistics homework.
Common use cases
- Planning survey respondent counts with margin of error
- Sizing clinical or psychology experiments comparing two means
- Calculating A/B test traffic requirements for product teams
- Estimating observations needed for a mean confidence interval
- Teaching power analysis in introductory statistics courses
Frequently asked questions
- How do I calculate survey sample size?
- Use n = (Z² × p × (1−p)) / E² where p is the estimated proportion, E is the margin of error (as a decimal), and Z is the Z-score for your confidence level (1.96 for 95%).
- What sample size do I need for an A/B test?
- Enter your baseline conversion rate and the minimum absolute lift you want to detect. Set power (typically 80%) and significance (typically 5%). The calculator returns n per group.
- What if I don't know the population proportion?
- Use 50% for a conservative (maximum) sample size estimate. This assumes the highest possible variability p(1−p).
- What is statistical power?
- Power is the probability of detecting a true effect. 80% power is standard — meaning an 80% chance of finding a significant result if the effect exists.
- What is finite population correction?
- When sampling without replacement from a small known population N, the required sample size can be reduced using n_adj = n / (1 + (n−1)/N). Enter population size in proportion mode to apply this.