sample size for a survey: what it is and why it matters
Sample size for a survey is the number of respondents you need to collect reliable results for a population. Choosing the right sample size balances precision, cost and time. Too small a sample gives noisy estimates; too large wastes resources. This guide explains the standard formula, how to apply it step by step, examples with real numbers, common mistakes, and how to use an online sample size calculator.
key variables used to determine sample size
- Population size (N): total number of individuals in the group you want to study. For very large populations you can treat N as infinite.
- Margin of error (E): the maximum acceptable difference between the sample estimate and the true population value (expressed as a proportion, e.g., 0.05 for ±5%).
- Confidence level: probability that the interval contains the true value (common levels: 90%, 95%, 99%).
- Estimated proportion (p): expected share of respondents with the attribute of interest (use 0.5 when unknown to be conservative).
standard formula for sample size for a survey (for proportions)
The most common case is estimating a population proportion (e.g., percentage who prefer product A). Use the formula based on the normal approximation (z-score):
n0 = (z^2 * p * (1 - p)) / E^2
Where:
- n0 = initial sample size assuming an infinite population
- z = z-score for your chosen confidence level (e.g., 1.96 for 95%)
- p = estimated proportion (0 to 1)
- E = margin of error (as a decimal)
If the population is not very large, apply the finite population correction (FPC):
n = (N * n0) / (n0 + N - 1)
Where N is the population size and n is the adjusted sample size.
common z-scores
- 90% confidence: z = 1.645
- 95% confidence: z = 1.96
- 99% confidence: z = 2.576
step-by-step method to compute sample size manually
- Define the objective: which proportion or outcome you will estimate.
- Choose the confidence level (e.g., 95%) and find the corresponding z-score.
- Select a margin of error you can tolerate (E). Common choices: 0.05 (5%), 0.03 (3%).
- Estimate p. If unknown, use p = 0.5 for the most conservative (largest) sample size.
- Compute n0 using the formula n0 = (z^2 * p * (1 - p)) / E^2.
- If population N is finite and not very large, apply the FPC: n = (N * n0) / (n0 + N - 1).
- Always round up the final n to the next whole number to ensure sufficient sample.
practical examples with numbers
Example 1 — large population (infinite approximation)
Goal: estimate the proportion of customers satisfied with an online service. Choose 95% confidence (z = 1.96), margin of error ±5% (E = 0.05), and unknown p so use 0.5.
- n0 = (1.96^2 * 0.5 * 0.5) / 0.05^2 = (3.8416 * 0.25) / 0.0025 = 0.9604 / 0.0025 = 384.16
- Round up: n = 385 respondents.
Interpretation: surveying 385 independent respondents gives a 95% confidence interval of ±5 percentage points around the observed proportion.
Example 2 — finite population correction
Goal: a small university with N = 5,000 students needs the same precision (95% confidence, E = 0.05, p = 0.5).
- First compute n0 as before: 384.16.
- Apply FPC: n = (5000 * 384.16) / (384.16 + 5000 - 1) = 1,920,800 / 5,383.16 ≈ 356.9
- Round up: n = 357 students.
Because the population is moderate, the required sample decreases slightly from 385 to 357.
Example 3 — when expected proportion is small
If prior data suggest p = 0.10 (10%) and you want 95% confidence with E = 0.03 (3 percentage points):
- n0 = (1.96^2 * 0.10 * 0.90) / 0.03^2 = (3.8416 * 0.09) / 0.0009 ≈ 0.3457 / 0.0009 ≈ 384.1
- Rounded: n = 385
Note: when p is far from 0.5 the required sample can be similar or slightly smaller; using p = 0.5 when unsure is conservative.
how to use an online sample size calculator
Using an online calculator saves time and avoids arithmetic mistakes. Typical inputs the calculator asks:
- Population size (N) — optional for very large populations
- Confidence level (e.g., 95%)
- Margin of error (E) in percentage (e.g., 5%)
- Estimated proportion (p) — or choose "max variability" (0.5)
Steps:
- Open the sample size calculator on a trusted site (for example use a sample size calculator on https://calculatorr.com/).
- Enter the values above and click calculate.
- Review result: most tools will display both the infinite-population n0 and the adjusted n when N is provided.
Tip: some calculators offer options for continuous variables (mean estimation) or for complex survey designs; pick the correct mode for your study.
interpreting the result
- A sample size of n means that, if your sampling is random and responses independent, the margin of error around the sample proportion will be approximately the target E at the chosen confidence level.
- Margin of error refers only to sampling error. It does not account for nonresponse bias, measurement errors or coverage errors.
- Confidence level quantifies how often your method produces intervals that contain the true value across repeated samples.
adjustments and real-world considerations
nonresponse and expected response rate
If you expect only R proportion to respond (e.g., 20% response rate = 0.2), inflate the required sample by dividing by R:
n_adjusted = n / R
Example: need 385 completed surveys and expect 40% response rate → invite 385 / 0.4 = 962 people.
design effects for complex sampling
Clustered or stratified surveys often increase variance. Multiply n by the design effect (deff), where deff >= 1. If deff is unknown, conservative studies use deff = 1.5–2.
rounding and minimums
Always round up the final n. For very small sample sizes (n < 30) the normal approximation is poor — consider exact methods or different estimators.
common errors to avoid
- Using p = 0.5 blindly when you actually have reliable prior data that would reduce sample size slightly (but using 0.5 is safe).
- Forgetting to adjust for expected nonresponse, which leads to too few completed surveys.
- Applying formulas for proportions when estimating a mean (use the mean-specific formula in that case).
- Assuming margin of error accounts for all errors — it only covers sampling variability.
- Not using FPC for small populations, which can overestimate the required sample.
quick reference table: sample sizes for common settings (95% confidence)
| Margin of error (E) | p = 0.5 (n0) |
|---|---|
| ±5% | 385 |
| ±4% | 601 |
| ±3% | 1068 |
| ±2% | 2401 |
when to use a different approach
If you plan to estimate means (e.g., average income), use the sample size formula for a mean that requires an estimate of the population standard deviation. For small samples or rare-event proportions, exact binomial methods or specialized calculators are preferable.
next steps and practical checklist
- Define the target metric (proportion or mean) and acceptable precision.
- Choose confidence level and margin of error.
- Estimate p (use 0.5 if unknown) and compute n0.
- Apply finite population correction if N is not large.
- Adjust for expected response rate and design effect.
- Use an online sample size calculator on https://calculatorr.com/ to verify and document your inputs.
Understanding sample size helps you plan efficient surveys that deliver trustworthy estimates. Use the formulas above for quick manual checks and an online calculator for convenience and to handle special cases.