Sample Size Calculator
Determine the optimal sample size for your survey or study. Calculate how many respondents you need based on confidence level and margin of error.
Enter Values
Fill in the fields and press Calculate to see instant results.
Enter 0 for unknown/infinite
Use 50% if unknown (most conservative)
Introduction to Sample Size Calculation
Before launching any survey, poll, or scientific study, the most critical question is: "How many people do I need to ask?" The Sample Size Calculator provides the mathematical answer to that question.
Surveying an entire population (a census) is often too expensive, time-consuming, or physically impossible. Instead, researchers take a sample. By using this calculator, you can determine exactly how many responses you need to ensure your results are statistically significant and accurately reflect the broader population.
When to Use This Calculator
This calculator is essential for anyone conducting primary research. Use it when:
- Market Research: Figuring out how many customers to survey about a new product feature.
- Employee Satisfaction: Determining how many employees out of a 10,000-person corporation need to take HR's pulse survey.
- Political Polling: Calculating the required number of likely voters to call to accurately predict an election within a 3% margin of error.
- Academic Studies: Justifying your study's sample size to a peer-review board to prove statistical power.
Formula Explanation
The calculation involves two steps: first finding the sample size for an infinite population, and then adjusting it (correcting it) if your population is finite and known.
Step 1: Infinite Population Formula
Step 2: Finite Population Correction (if N is known)
Variable Definitions
- Z: Z-score corresponding to your chosen confidence level (e.g., 1.96 for 95%).
- p: The estimated proportion of the population that holds the attribute. If unknown, 0.5 (50%) is used as it maximizes the required sample size.
- E: The Margin of Error (as a decimal, so 5% is 0.05).
- N: The total Population Size.
Step-by-Step Calculation Guide
Determine Z-ScoreFor a 95% confidence level, use 1.96.
Square the Z-Score and Error1.96² = 3.8416. If Error is 5%, 0.05² = 0.0025.
Calculate NumeratorMultiply Z² by p(1-p). Assuming p=0.5, p(1-p) = 0.25.
Calculate Infinite SampleDivide the Numerator by the squared Margin of Error.
Apply CorrectionIf the population is small, apply the finite population correction formula to reduce the required sample size.
Worked Examples
Let's look at how changes in population and desired accuracy affect the required sample size.
Example 1: Standard Survey (Unknown/Large Population)
Given Inputs
| Input | Value |
|---|---|
| Population | Infinite/Unknown |
| Confidence Level | 95% (Z=1.96) |
| Margin of Error | 5% (0.05) |
| Proportion (p) | 50% (0.5) |
Calculation Steps
- Numerator= 1.96² * 0.5 * 0.5 = 3.8416 * 0.25 = 0.9604
- Denominator= 0.05² = 0.0025
- Sample Size= 0.9604 / 0.0025 = 384.16
- Rounding= Always round up to the nearest whole person.
Results
Required Sample Size
385
Example 2: Small Population (High School Class)
Given Inputs
| Input | Value |
|---|---|
| Population (N) | 500 |
| Confidence Level | 95% (Z=1.96) |
| Margin of Error | 5% (0.05) |
Calculation Steps
- Infinite Sample (S)= 385 (from Example 1)
- Finite Correction Denom= 1 + ((385 - 1) / 500) = 1 + 0.768 = 1.768
- Adjusted Sample= 385 / 1.768 = 217.7
Results
Required Sample Size
218
Example 3: High Precision (2% Error)
Given Inputs
| Input | Value |
|---|---|
| Population | 100,000 |
| Confidence Level | 95% |
| Margin of Error | 2% (0.02) |
Calculation Steps
- Infinite Sample= 0.9604 / 0.0004 = 2401
- Finite Correction= 2401 / (1 + (2400/100000)) ≈ 2345
Results
Required Sample Size
2,345
Example 4: 99% Confidence Level
Given Inputs
| Input | Value |
|---|---|
| Population | Infinite |
| Confidence Level | 99% (Z=2.576) |
| Margin of Error | 5% (0.05) |
Calculation Steps
- Numerator= 2.576² * 0.25 ≈ 6.635 * 0.25 ≈ 1.658
- Sample Size= 1.658 / 0.0025 = 663.2
Results
Required Sample Size
664
Example 5: Known Skewed Proportion
Given Inputs
| Input | Value |
|---|---|
| Population | Infinite |
| Confidence Level | 95% |
| Margin of Error | 5% |
| Proportion (p) | 10% (0.10) - e.g. rare disease |
Calculation Steps
- Variance component= p(1-p) = 0.10 * 0.90 = 0.09
- Numerator= 3.8416 * 0.09 ≈ 0.3457
- Sample Size= 0.3457 / 0.0025 ≈ 138.3
Results
Required Sample Size
139
Common Mistakes
Avoid these sampling errors:
- Confusing Response Rate with Sample Size: If this calculator tells you that you need 400 people, sending out exactly 400 surveys will fail. If your typical response rate is 10%, you must actually send the survey to 4,000 people to hit your target sample size of 400.
- Overestimating the Need for Population Size: Many beginners worry about getting the exact population size. However, the math dictates that once a population goes beyond 100,000 people, the required sample size barely changes. A sample of 400 represents a city of 100,000 just as well as it represents a country of 300 million.
Tips and Best Practices
- The 400 Rule: As a general rule of thumb in market research, a sample size of roughly 400 yields a ±5% margin of error at a 95% confidence level for large populations. This is an industry standard for many consumer polls.
- Sub-group Analysis: If you plan to break your data down (e.g., comparing men vs. women in your survey), you need your sample size calculation to apply to the *smallest subgroup* you care about, which means you'll need a much larger overall sample.
Conclusion
The Sample Size Calculator removes the guesswork from survey design. By scientifically defining how many responses you need, you can save money by avoiding over-sampling, while protecting your reputation by avoiding under-sampling (which produces meaningless, high-error data). Define your acceptable margin of error, input your confidence level, and let the calculator dictate your surveying strategy.
Frequently Asked Questions
Why is sample size important?
An adequate sample size ensures your survey results are statistically significant and accurately reflect the target population without wasting resources on unnecessarily large samples.
What is the margin of error?
The margin of error expresses the maximum expected difference between the true population parameter and a sample estimate (e.g., +/- 5%).
What is a confidence level?
The confidence level indicates how sure you can be that the true population parameter lies within your margin of error (usually 95% or 99%).
Do I need a larger sample for a larger population?
Up to a point, yes. However, once a population exceeds around 100,000, the required sample size barely increases. A sample of 400 is often sufficient for populations of 1 million or 10 million.
What if I don't know the exact population size?
If the population is very large or unknown, you can leave it blank or assume it is infinite. The math stabilizes for large populations.
Related Calculators
People Also Calculate
People Also Calculate
Calculators visitors commonly use alongside this one.