Sample Size Calculator — Quick & Accurate Online Calculator & Guide
Determine the ideal sample size for surveys and research studies. Adjust for population size, confidence level, and margin of error.
See it worked out
Example — Population Size (N) 10000, Margin of Error (%) 5:
Recommended Sample Size (90% CL, 5% MOE)
264
Target Responses Needed
264
Margin of Error
5%
Z-Score Used
1.645 (90% confidence)
Population
10,000 (medium population)
The formula
n = (Z² × p × (1-p)) / E² | n_adjusted = n / (1 + (n-1)/N)
- Z
- Z-Score
- p
- Proportion
- E
- Margin of Error
- N
- Population Size
Worked example — Population Size (N) 10000, Margin of Error (%) 5
Recommended Sample Size (90% CL, 5% MOE) = 264
How Sample Size Works
n = (Z² × p × (1-p)) / E² | n_adjusted = n / (1 + (n-1)/N)
The sample size formula determines how many survey responses are needed for statistically significant results. Z is the Z-score for your confidence level (1.96 for 95%), p is the estimated proportion (0.5 is most conservative), E is the margin of error, and N is the population size. The finite population correction adjusts the sample size when the population is small.
- Z
- Z-Score — 1.645 for 90% confidence, 1.96 for 95%, 2.576 for 99%. Higher confidence levels require larger Z-scores and larger samples.
- p
- Proportion — Estimated response proportion. 0.5 = 50% (most conservative estimate, gives the largest sample size). If you know the approximate proportion, use it.
- E
- Margin of Error — The acceptable error range, e.g., 0.05 for ±5%. Smaller margins require larger sample sizes.
- N
- Population Size — Total size of the group being studied. For very large populations (>100,000), the infinite population formula dominates.
How to Use
- Enter your total population size (the group you want to study).
- Select your desired confidence level (95% is the standard for most research).
- Set your acceptable margin of error (5% is common for market research).
- Review the recommended sample size and the margin comparison table showing how sample size changes with different margins.
- Remember: the calculated number is the number of COMPLETED responses you need, not the number of surveys sent (account for non-response rates).
Quick Reference
| 95% CL, ±5% margin, large pop. | 385 respondents |
| 95% CL, ±3% margin, large pop. | 1,067 respondents |
| 99% CL, ±5% margin, large pop. | 666 respondents |
| 90% CL, ±5% margin, large pop. | 271 respondents |
| Z-score for 95% | 1.96 |
| Z-score for 99% | 2.576 |
| Most conservative p | 0.5 (50%) |
Common Uses
- •Market research surveys — determining how many customers to poll for statistically valid brand or product feedback
- •Political polling — calculating the sample needed for accurate election predictions within a stated margin of error
- •UX research and usability testing — planning how many users to recruit for statistically meaningful task completion rates
- •Clinical trials and medical research — estimating the number of subjects needed to detect treatment effects
- •Quality control and manufacturing — determining how many units to inspect from a production batch
Understanding the Result
Sample size determination is critical in market research, UX research, clinical trials, and opinion polling. A sample that is too small may fail to detect real effects (false negative), while one that is too large wastes time and money. The 95% confidence level is the industry standard — it means that if you repeated the survey 100 times, the results would fall within the margin of error 95 times out of 100. The formula uses p = 0.5 (maximum variability) by default, which gives the most conservative (largest) sample size estimate. If you have prior knowledge that the proportion is near 0.2 or 0.8, the required sample size would be smaller. The finite population correction (FPC) adjusts the sample size downward when the sample is a significant fraction of the population. For populations over 100,000, the FPC has minimal effect and the infinite population formula dominates. Remember that the calculated number is the number of completed responses needed — if you expect a 20% response rate, you need to invite five times as many participants.
Worked Examples
A market researcher wants to survey customers of a regional bank with 50,000 account holders. They want 95% confidence with a ±5% margin of error.
population = 50000 · confidence = 95 · margin = 5
Recommended sample size: approximately 381 respondents.
This is the standard sample size for most market research. Notice that even for 50,000 people, only 381 responses are needed — the sample size does not need to scale proportionally with the population.
A UX researcher is testing a prototype with a small user base of 200 enterprise customers and wants 95% confidence with ±5% margin.
population = 200 · confidence = 95 · margin = 5
Recommended sample size: approximately 132 respondents.
With a small population, the finite population correction significantly reduces the required sample size. However, 132 out of 200 is a 66% response rate — this may require incentives or mandatory participation to achieve.
A political pollster wants to survey voters in a city of 500,000 with 99% confidence and a ±3% margin of error.
population = 500000 · confidence = 99 · margin = 3
Recommended sample size: approximately 1,849 respondents.
The jump from 95% to 99% confidence nearly triples the required sample. This level of rigor is typical for published academic research and high-stakes polling, but the cost of reaching 1,849 respondents must be weighed against the marginal increase in certainty.
Frequently Asked Questions
- Why is 95% confidence the standard?
- The 95% confidence level (Z = 1.96) is the widely accepted standard in social sciences, market research, and medical studies. It provides a good balance between precision and practicality. A 99% level requires significantly larger samples, while 90% may not be rigorous enough for publication.
- What does margin of error mean?
- The margin of error is the range within which the true population value is expected to fall. For example, if 60% of your sample prefers Product A with a ±5% margin of error, the true population preference is between 55% and 65% (at your chosen confidence level).
- Do I need to use finite population correction?
- The finite population correction (FPC) matters when your sample is a significant fraction (>5%) of the total population. For small populations (under 10,000), the FPC noticeably reduces the required sample size. For very large populations (over 100,000), it has minimal effect and the infinite formula is sufficient.
- What is a good response rate for surveys?
- Response rates vary widely by method: email surveys typically get 10-30%, in-person interviews 50-80%, and online panels 30-50%. To achieve your target completed responses, divide the sample size by your expected response rate. For example, if you need 385 responses and expect a 20% response rate, send 1,925 invitations.
- How does confidence level affect sample size?
- Higher confidence levels require larger samples. A 99% confidence level (Z=2.576) requires about 77% more respondents than 95% (Z=1.96) for the same margin of error. Most research uses 95% as the standard because 99% often requires prohibitively large samples for marginal gain in certainty.
- Can I calculate sample size for different types of studies?
- This calculator uses the proportion-based formula, which is ideal for surveys and polls where the outcome is categorical (yes/no, prefer/do not prefer). For continuous outcomes (e.g., measuring blood pressure), a mean-based formula using standard deviation is more appropriate. For A/B testing, specialized calculators using power analysis and minimum detectable effect are recommended.
- What if my population is unknown or infinite?
- Enter a very large number (like 1,000,000) for the population. The finite population correction will have negligible effect, and the result will be the standard infinite-population sample size. This is common when studying broad consumer markets or internet users where the total population cannot be precisely counted.
Pro Tips
- →Always plan for non-response: divide your target sample size by your expected response rate to get the number of invitations to send.
- →Use p=0.5 (the default) when you have no prior knowledge — it gives the largest and most conservative sample size estimate.
- →For populations over 100,000, the infinite population formula dominates — increasing the population further has almost no effect on sample size.
- →If budget is tight, increase the margin of error from 5% to 8% — the required sample size drops dramatically (from 385 to 150 at 95% confidence).
Limitations to Know
- •This calculator assumes simple random sampling. Stratified, cluster, or convenience sampling methods require different formulas.
- •Results assume a perfectly representative sample. Real-world non-response bias, selection bias, and measurement error can reduce effective precision.
- •The proportion-based formula is designed for categorical survey questions (yes/no). For continuous measurements, use a mean-based sample size formula.
Cite this calculator
TheCalcUniverse. "Sample Size Calculator — Quick & Accurate Online Calculator & Guide." TheCalcUniverse, 2026, https://thecalcuniverse.com/math/sample-size-calculator/. Accessed July 24, 2026.
Embed this calculator on your site
You may also like
-
Confidence Interval
Calculate confidence intervals for a population mean. Breaks out the Margin of Error (MOE), critical Z-value, …
-
Z-Score Calculator — Free Online Ca
Calculate the Z-score from a raw score, population mean, and standard deviation. Visualizes the result on a st…
-
P-value Calculator — Statistical Si
Compute p-values from Z-scores or T-scores for one-tailed and two-tailed hypothesis tests. Free online calcula…
-
Statistics
Comprehensive descriptive statistics calculator with a dynamic box-and-whisker plot. Computes the five-number …