Sample Size Calculator: Survey Formula & Examples
Short answer
A sample size calculator computes the number of completed responses required to draw statistically valid conclusions from a survey or experiment. By setting a 95% confidence level, a 5% margin of error, and a 50% expected proportion for an unlimited population, the calculator determines that 385 completed responses are needed. This prevents underpowered studies while avoiding the wasted cost of oversampling.
Formula
n₀ = (z² · p(1 − p)) / e²; n = n₀ / (1 + (n₀ − 1) / N)
n₀ is the unadjusted sample size for an infinite population. z is the critical value for the chosen confidence level (e.g., 1.645 for 90%, 1.96 for 95%, 2.576 for 99%). p is the expected proportion of the population displaying the characteristic (expressed as a decimal, where 0.50 yields the most conservative estimate). e is the margin of error (expressed as a decimal, such as 0.05 for 5%). N is the total population size (when N is finite). n is the final sample size adjusted for a finite population using the finite population correction factor.
Worked example
- Confidence level
- 1.96
- Margin of error
- 5
- Expected proportion
- 50
- Population size (0 = unlimited)
- 0
- Sample size needed: 385
- Unlimited population size: 385
What the Sample Size Calculator Computes
The Sample Size Calculator determines the minimum number of completed survey responses or observational units needed to produce statistically valid findings. It is designed for market researchers, academic investigators, quality control engineers, and polling organizations who need to draw reliable inferences about a broader population without surveying every single individual.
The tool accepts four standard statistical parameters:
- Confidence Level ($z$): How certain you want to be that the sample findings reflect the true population (commonly 90%, 95%, or 99%).
- Margin of Error ($e$): The acceptable range of variation around your result, often referred to as the confidence interval radius (e.g., $\pm 5%$).
- Expected Proportion ($p$): The anticipated frequency of the outcome being measured. When unknown, 50% ($0.50$) is standard because it yields the most conservative (largest) sample requirement.
- Population Size ($N$): The total number of entities in the group being evaluated. If left at 0, the calculation assumes an infinite or arbitrarily large population.
Step-by-Step Worked Example
To understand how the calculator arrives at its results, consider a standard research scenario using the default baseline parameters:
- Confidence Level: 95% (which yields a standard critical value of $z = 1.96$)
- Margin of Error: 5% ($e = 0.05$)
- Expected Proportion: 50% ($p = 0.50$)
- Population Size: 0 (unlimited/infinite)
Step 1: Calculate the Base Sample Size ($n_0$)
Using Cochran’s classic formula for an unlimited population: $$n_0 = \frac{z^2 \cdot p(1 - p)}{e^2}$$
Substitute the known values into the equation: $$n_0 = \frac{(1.96)^2 \cdot 0.50 \cdot (1 - 0.50)}{(0.05)^2}$$ $$n_0 = \frac{3.8416 \cdot 0.25}{0.0025}$$ $$n_0 = \frac{0.9604}{0.0025} = 384.16$$
Because you cannot collect a fraction of a respondent, statistical standards require rounding up to the next whole integer. Therefore, $n_0 = 385$.
Step 2: Apply the Finite Population Correction (if applicable)
Because the population size in this baseline example is set to 0 (unlimited), no finite adjustment is necessary. The final Sample size needed is 385, and the Unlimited population size baseline remains 385.
If the population were small—say, $N = 500$—the formula would adjust $n_0$: $$n = \frac{n_0}{1 + \frac{n_0 - 1}{N}} = \frac{384.16}{1 + \frac{383.16}{500}} = \frac{384.16}{1.76632} \approx 217.48$$ Rounding up yields 218 completed surveys needed.
How to Read and Compare Results
Changing the margin of error impacts sample size exponentially rather than linearly:
- Margin of error: 4% $\rightarrow$ Sample size needed: 601
- Margin of error: 5% (Base) $\rightarrow$ Sample size needed: 385
- Margin of error: 6% $\rightarrow$ Sample size needed: 267
Halving the margin of error from 6% to 3% quadruples the required sample size. When planning research budgets, evaluate whether the added precision justifies the operational cost of collecting additional responses.
Industry Benchmarks for Common Confidence Levels
- 90% Confidence ($z = 1.645$): Suitable for preliminary exploratory research, internal business decisions, and pilot studies.
- 95% Confidence ($z = 1.96$): The gold standard for consumer surveys, market studies, and social science research.
- 99% Confidence ($z = 2.576$): Reserved for clinical trials, aerospace tolerances, and high-risk legal or regulatory audits where error carries severe consequences.
Practical Tips for Survey Execution
- Differentiate Sample Size from Contact List Size: A calculated requirement of 385 completed responses means completed data sets, not sent emails. If your average response rate is 15%, divide 385 by 0.15 to determine that you must contact at least 2,567 individuals.
- Default to 50% Proportion: Unless you have validated historical data (e.g., an established 10% market share), retain the 50% parameter. Any shift toward 0% or 100% reduces the variance and produces a smaller required sample size, which risks leaving your study underpowered if the true proportion ends up closer to 50%.
- Randomize Selection: Sample size math relies on probability theory. A properly randomized sample of 385 people provides far more accurate insights than an unvetted convenience sample of 5,000 voluntary social media respondents.
When Not to Rely on This Calculator
While this calculator handles simple random sampling for proportion-based questions, it should not be used in the following conditions:
- Continuous Means: If your primary outcome is an average value (such as mean annual income or blood pressure) rather than a binary percentage, sample size depends on standard deviation, requiring a mean-based formula.
- Clustered or Stratified Sampling: Complex sampling designs require adjusting sample size using a design effect (DEFF) factor.
- Non-Random Convenience Samples: Mathematical confidence intervals assume that every member of the target population had an equal, non-zero chance of selection.
Comparison
| Scenario | Input | Result |
|---|---|---|
| Lower input | Margin of error: 4 | Sample size needed: 601 |
| Base example | Margin of error: 5 | Sample size needed: 385 |
| Higher input | Margin of error: 6 | Sample size needed: 267 |
Common mistakes
- Confusing the number of invitations sent with the number of completed responses needed.
- Failing to enter the margin of error as a decimal in manual calculations (e.g., using 5 instead of 0.05).
- Assuming that a larger population always requires a proportionally larger sample size.
- Setting an unrealistically low margin of error (such as 1%), which exponentially inflates the required sample size.
- Using an expected proportion other than 50% without reliable prior evidence, leading to an underpowered sample.
Checklist
- Define your target population clearly and decide whether it is finite or virtually unlimited.
- Select an acceptable confidence level (standard research typically uses 95%, corresponding to z = 1.96).
- Choose a realistic margin of error, commonly between 3% and 5% for consumer and academic surveys.
- Use a 50% expected proportion (0.50) unless reliable historical data points to a specific percentage.
- Account for anticipated non-response rates by sending surveys to more people than your calculated sample size.
- Ensure sampling methodology uses randomized selection rather than convenience selection to prevent bias.
Calculators Percentage Editorial Team
Calculator guides from the Calculators Percentage team. These introductory examples are educational, not professional advice.
Last reviewed:
This calculator provides sample size estimations based on standard statistical formulas for simple random sampling. Consult a professional statistician for complex experimental designs, cluster sampling, or multi-stage research.
