Sample Size Calculator
Sample size is the minimum number of participants or observations a study needs in order to represent its population. A badly chosen sample creates two basic risks: if it is too small, the findings cannot be generalized to the population and real effects go undetected; if it is needlessly large, time and resources are wasted and ethics committees may raise questions. In theses, journal articles, and grant applications, reviewers want to see which formula and which assumptions produced the sample size.
This calculator uses Cochran's (1977) formula, the most widely accepted approach in the literature for studies based on estimating a proportion (surveys, prevalence studies, opinion polls), and it applies the finite population correction automatically when a population size is entered. Based on the confidence level and the margin of error you choose, it returns the required minimum number of participants, a target with a 10% attrition allowance, a chart of how the requirement changes with the margin of error, and a ready-made table by population size.
Required Sample Size in Common Survey Scenarios
The values below are computed from Cochran's formula assuming an infinite population and a 50% expected proportion; when a population size is entered, the finite population correction lowers these numbers.
- 90% confidence, ±5% margin of error
- 271 people
- n₀ = 270.55; the lowest sample requirement among the common scenarios
- 95% confidence, ±5% margin of error
- 385 people
- n₀ = 384.15. The standard scenario in the social sciences; the literature often cites it as 384 as well.
- 99% confidence, ±5% margin of error
- 664 people
- n₀ = 663.49. Raising the confidence level from 95% to 99% increases the required sample by roughly 73%.
- 95% confidence, ±3% margin of error
- 1,068 people
- n₀ = 1,067.07. Lowering the margin of error from ±5% to ±3% multiplies the sample by about 2.8.
- Assumed expected proportion
- 50%
- The product p · (1 − p) reaches its maximum (0.25) at p = 0.50; when the proportion is unknown it is the safest choice, because it yields the largest sample.
- Recommended attrition allowance
- +10%
- Aiming for 10% more than the calculated number is common practice to absorb incomplete and careless responses; in the 95% and ±5% scenario that comes to 424 people.
Formula
n₀ = z² · p · (1 − p) / e² (Cochran's formula) Finite population correction: n = n₀ / ( 1 + (n₀ − 1) / N ) z: critical value for the confidence level (90% → 1.645; 95% → 1.960; 99% → 2.576) p: expected proportion (0.50 if unknown), e: margin of error (e.g. 0.05)
This formula is for descriptive and survey research based on estimating a proportion; in experimental designs built on hypothesis tests such as a t-test, ANOVA, or regression, the sample size should be derived from a power analysis (with G*Power, for instance).
How to Calculate
- Choose the confidence level — 95% is the standard in the social sciences, while 99% may be preferred in medicine.
- Set the margin of error: ±5% is widely accepted; lower it to ±3% for studies that need a precise estimate.
- Enter the expected proportion — leave it at 50% if you have no estimate from a pilot study or the literature.
- If the population is limited (a school, an institution, a province), enter its size; leave it empty for a general population.
- Read the required minimum sample and the recommendation with a 10% attrition allowance; use the chart and the table to explore alternative scenarios.
Worked Examples
Standard survey scenario (95%, ±5%)
The most common scenario: 95% confidence, a ±5% margin of error, and a 50% expected proportion. Cochran's formula gives n₀ = 384.15; rounded up, 385 participants are required, and with a 10% attrition allowance 424 people are recommended.
Required minimum sample size: 385 · Infinite-population sample size (n₀): 384.15 · Finite population correction: Not applied — the population was assumed infinite
Survey in a school of 1,000
When the population is 1,000 people, the finite population correction comes into play: while n₀ = 384.15 for an infinite population, the required sample drops to 278; with a 10% attrition allowance, reaching 306 students should be the target.
Required minimum sample size: 278 · Infinite-population sample size (n₀): 384.15 · Finite population correction: Applied (N = 1,000)
High-precision estimate (99%, ±3%)
In a precise design such as a 99% confidence level with a ±3% margin of error, the required sample rises to 1,844 participants (n₀ = 1,843.03); as precision increases, the sample grows quickly.
Required minimum sample size: 1,844 · Infinite-population sample size (n₀): 1,843.03 · Finite population correction: Not applied — the population was assumed infinite