Use this free sample size calculator to find how many people you need to survey. Enter your confidence level, margin of error, and population size, and the calculator shows the required sample size. It also supports Slovin’s formula, sample size for a mean, and a quick estimate for comparing two groups. Steps are included. No signup needed.
Use 50% if the expected proportion is unknown.
Use the same measurement units for σ and E.
Calculates an approximate sample size per group.
Leave blank for a large or unknown population.
Use 1 for a simple random sample.
Cochran's formula estimates the sample size needed for a survey proportion. A finite population correction is applied when population size is provided.
Sample sizes are rounded up to the next whole number. Results assume the statistical method and inputs are appropriate for your study. Complex, clinical or regulated research may require a professional power analysis.
For a survey (proportion):
With Slovin’s formula: enter the population size and the margin of error.
The sample size is the number of people (or items) you collect data from. A bigger sample gives results that are closer to the truth for the whole population, but it costs more time and money. The goal is a sample that is large enough for the precision you need.
Three things decide the sample size for a survey:
The population size matters only when the population is small.
| Confidence level | z-score |
|---|---|
| 80% | 1.282 |
| 90% | 1.645 |
| 95% | 1.960 |
| 99% | 2.576 |
Sample size for a proportion (Cochran’s formula):
n₀ = z² × p × (1 − p) ÷ e²
where z is the z-score, p is the expected proportion (use 0.5 if unknown), and e is the margin of error as a decimal.
Finite population correction (for a small population of size N):
n = n₀ ÷ (1 + (n₀ − 1) ÷ N)
Sample size for a mean:
n = (z × σ ÷ E)²
where σ is the standard deviation and E is the margin of error in the units of the data.
Slovin’s formula:
n = N ÷ (1 + N × e²)
Margin of error for a given sample size (proportion):
e = z × √[p(1 − p) ÷ n]
Adjusting for non-response:
Invitations = Sample size ÷ Response rate
Always round up to the next whole number.
All sample sizes are rounded up. These examples use z = 1.96 for 95% confidence.
95% confidence, ±5% margin of error, p = 0.5.
95% confidence, ±3% margin of error, p = 0.5.
99% confidence (z = 2.576), ±5%, p = 0.5.
90% confidence (z = 1.645), ±5%, p = 0.5.
95% confidence, ±5%, and you expect about 30% to say “yes” (p = 0.3).
A p-value away from 0.5 needs a smaller sample. If you are not sure, use 0.5.
95% confidence, ±5%, p = 0.5, and a population of 2,000.
N = 10,000 and e = 0.05.
N = 2,000 and e = 0.05:
You want to estimate the average with a margin of ±2 units, the standard deviation is about 15, and you want 95% confidence.
You need 385 completed responses, and you expect 60% of invited people to respond.
At an 80% response rate, you would need 385 ÷ 0.80 = 481.25, which rounds up to 482.
If you sample by clusters, such as villages or schools, you may need a larger sample. With a design effect of 1.5:
You have 400 responses, p = 0.5, and 95% confidence.
You want to detect a difference between 40% and 50% in two groups, with 95% confidence (two-sided) and 80% power.
Comparing groups needs power analysis, and the numbers can be much larger than a simple survey. Use this as a rough guide only.
You want to detect a difference of 5 units between two groups, with σ = 10, 95% confidence, and 80% power.
| Margin of error | Sample size (large population) |
|---|---|
| ±1% | 9,604 |
| ±2% | 2,401 |
| ±3% | 1,068 |
| ±4% | 601 |
| ±5% | 385 |
| ±10% | 97 |
| Population (N) | Sample size (with correction) | Slovin’s formula (e = 0.05) |
|---|---|---|
| 200 | 132 | 134 |
| 500 | 218 | 223 |
| 1,000 | 278 | 286 |
| 2,000 | 323 | 334 |
| 5,000 | 357 | 371 |
| 10,000 | 370 | 385 |
| 100,000 | 383 | 399 |
The sample size barely changes once the population passes a few thousand. A population of 100,000 and one of 10 million need almost the same sample.
Slovin’s formula (n = N ÷ (1 + Ne²)) is popular in student research because it is simple. Be aware of its limits:
Krejcie and Morgan (1970) published a table of sample sizes for 95% confidence, ±5%, and p = 0.5. Its values are about the same as Cochran with the finite population correction, and may differ by 1 because of rounding (for example, 322 or 323 for a population of 2,000). Check which method your institution expects.
This calculator is for general survey and educational use. Clinical trials, medical studies, and regulated research need a proper power analysis and a plan from a statistician or biostatistician. They depend on the study design, the endpoints, expected dropouts, and ethics rules. Do not use this calculator alone for those decisions.
For a proportion, use n = z² × p × (1 − p) ÷ e². For 95% confidence, a ±5% margin of error, and p = 0.5, that is 1.96² × 0.25 ÷ 0.0025 = 384.16, so you need 385 people.
It depends on your confidence level and margin of error. For 95% confidence and ±5%, you need about 385 for a large population. For ±3%, about 1,068.
It depends on your purpose. ±5% is common for general surveys, and ±3% for more precise results. A smaller margin of error needs a much larger sample.
95% is the most common. Use 99% if you need to be more certain, but it requires a larger sample. 90% is sometimes used for exploratory work.
Because p × (1 − p) is largest at 0.5, it gives the biggest sample size. It is the safest choice when you have no estimate.
Only when the population is small. For large populations, the sample size barely changes. For small ones, the finite population correction lowers the sample size.
It reduces the sample size when your sample is a large share of the population: n = n₀ ÷ (1 + (n₀ − 1) ÷ N).
n = N ÷ (1 + N × e²), where N is the population and e is the margin of error. It is simple, but it does not use a confidence level or the variability of the data.
Many students do, but check with your supervisor. Cochran’s formula with a finite population correction is usually easier to justify because it uses a confidence level.
Divide the sample size by the expected response rate. For 385 responses at a 60% response rate, invite 385 ÷ 0.60 ≈ 642 people.
Use n = (z × σ ÷ E)². With σ = 15, E = 2, and 95% confidence, n = (1.96 × 15 ÷ 2)² ≈ 217.
Yes. It is free, with no registration and no limits.
It uses standard formulas and the numbers you enter. It assumes a random sample, and the result is an estimate that is rounded up.
A few of the most-used tools in each hub.
This calculator is for general and educational use. It assumes a simple random sample and standard formulas, and it does not account for bias, non-response, or complex designs unless you add those inputs. For clinical trials, medical research, regulated studies, or high-stakes decisions, consult a qualified statistician. Follow the rules of your institution or journal on the method and how you report it.