Sample Size Calculator
Say what you want to estimate, how precise it must be and how confident you want to be; add the population size if it is small enough to matter.
Required sample size
385
Sample size before population correction
385
Exact value before rounding up
384.15
Critical value z*
1.959964
How it works
A sample size calculation runs the confidence interval formula backwards. You decide how wide an interval you can live with (the margin of error E) and how sure you want to be that it contains the truth (the confidence level), and the formula tells you how many observations that takes. Halving the margin of error takes four times the sample, because precision improves with the square root of n.
For a proportion the required size depends on how far the true proportion is from 50%, which is where a proportion is hardest to pin down. If you have no prior estimate, 50% is the conservative choice and is what most survey sample-size tables assume: 385 people for ±5 points at 95% confidence, 1,068 for ±3 points.
For a mean you need an estimate of the spread of the measurement, σ, from a pilot study, earlier work or a rough rule such as range ÷ 4. The sample size is (z* × σ ÷ E)².
When the population itself is small, say a company of 500 employees, you do not need as large a sample, because each observation is a bigger share of the whole. The finite population correction shrinks the sample size accordingly; it matters once the sample would be more than about 5% of the population.
Formula
proportion: n₀ = z*² × p(1 − p) ÷ E² (p and E as fractions) mean: n₀ = (z* × σ ÷ E)² finite population: n = n₀ ÷ (1 + (n₀ − 1) ÷ N) round n up to the next whole number z* = 1.644854 (90%), 1.959964 (95%), 2.575829 (99%)
Example
To estimate a proportion to within ±5 percentage points at 95% confidence with no prior estimate (p = 50%): n₀ = 1.959964² × 0.5 × 0.5 ÷ 0.05² = 384.15, so 385 people are needed. For ±3 points it rises to 1,067.07, so 1,068.
If the population is only 1,000 people, the correction gives 384.15 ÷ (1 + 383.15 ÷ 1000) = 277.73, so 278 people are enough.
To estimate a mean IQ score to within ±3 points at 95% confidence with σ = 15: n = (1.959964 × 15 ÷ 3)² = 96.04, so 97 people.
Assumptions and limitations
- The sample will be a simple random sample. Clustered or stratified designs need a design-effect adjustment that is not included.
- The proportion formula uses the normal approximation to the binomial, which is adequate for the sample sizes it produces; for very small results (under about 30) treat the figure as a rough guide.
- The mean formula treats σ as known. If σ is a guess, a larger sample than shown protects against guessing low.
- A population size of 0 or blank means the population is treated as unlimited.
- The result is the number of completed, usable responses. Allow for non-response on top of it.
- z* is computed from Acklam's inverse-normal approximation refined with one Halley step.
Frequently asked questions
Why is 385 the sample size quoted so often?
Because it is the 95%, ±5 point answer for a proportion with p = 50%: 1.959964² × 0.25 ÷ 0.0025 = 384.15, rounded up. Tables that use z = 1.96 give 384.16, which rounds up to the same 385.
Does a bigger population need a bigger sample?
Barely. Without the finite population correction the sample size does not depend on the population at all; with it, a population of 10,000 needs 370 people for ±5 points and 1,000 needs 278, but 1,000,000 still needs 384. Precision comes from the sample size, not from the fraction of the population sampled.
More in Math & Geometry calculators.