Sample Size Calculator
How to Calculate Sample Size
Calculating the correct sample size is a critical step in any research project or survey. If your sample is too small, your results may not be statistically significant. If it's too large, you waste time and resources. This calculator uses the standard Cochran formula adjusted for finite populations where necessary.
The Core Formula
The basic formula for an infinite population (or very large population) is:
n = (Z² * p * (1-p)) / e²
- Z: The Z-score associated with your Confidence Level.
- p: The sample proportion (expressed as a decimal).
- e: The margin of error (expressed as a decimal).
Understanding the Inputs
1. Confidence Level: This tells you how sure you can be. A 95% confidence level means if you conducted the same survey 100 times, the results would match the population 95 times out of 100.
2. Margin of Error: Also called the confidence interval. This is the range (plus or minus) that your results might vary. If you have a 5% margin of error and 60% of people like a product, the true population value is likely between 55% and 65%.
3. Population Size: The total number of people in the group you are studying. If you are surveying an entire country, this is millions; if it's a specific company, it might be 500.
4. Population Proportion: If you don't know the expected result, use 50%. This provides the most conservative (largest) sample size, ensuring your study is sufficiently powered.
Imagine you want to survey a city of 10,000 people to see if they support a new park. You want a 95% confidence level (Z = 1.96) and a 5% margin of error (e = 0.05). Using a 50% proportion (p = 0.5):
- Infinite sample: (1.96² * 0.5 * 0.5) / 0.05² = 384.16
- Adjusted for 10,000 people: 384 / (1 + (384-1)/10000) ≈ 370
You would need to survey 370 people.