Cochran's formula: n = z² x p(1-p) / e². At 95% confidence, a 5% margin of error, and a 50/50 split, that's 1.96² x 0.25 / 0.05² = 385 responses for a large or unknown population. The finite population correction shrinks it against small groups: 278 for a population of 1,000, 218 for 500, 80 for 100. For estimating a mean instead of a proportion, n = (z x s/e)² — with a standard deviation of 15 and a 3-unit margin, that's (1.96 x 15/3)² = 97 measurements. Sample size scales with 1/e², so halving the margin quadruples the work.

Required Sample Size
Infinite-Population n
Adjusted for Population
Achieved Margin of Error
Confidence z-score
Advertisement

Sample Size by Population Size (95% confidence, 5% margin, p=50%)

PopulationRequired SampleSampling FractionAchieved Margin if You Survey 385 Anyway
1008080%— (385 > population)
20013266%— (385 > population)
50021844%±2.4%
1,00027828%±3.9%
5,0003577.1%±4.8%
10,0003703.7%±4.9%
100,0003830.4%±5.0%
1,000,000+385<0.04%±5.0%

The pattern to internalize: sample size grows with the square root of the population, so it flattens fast. That's why a national poll of about 1,000 people carries a ±3.1% margin of error while surveying your 200-person company takes 132 responses for ±5%.

Confidence Levels and z-Scores

Confidence Levelz-scoren at 5% margin, p=50%n at 3% margin, p=50%
80%1.282165457
90%1.645271752
95%1.963851,068
98%2.3265421,503
99%2.5766641,844

Notice the cost curve: going from 95% to 99% confidence adds 72% more responses for the same margin. Most academic and market research stops at 95%, and student projects are commonly graded against it.

How the Sample Size Calculator Works

Every confidence interval is an estimate flanked by a margin of error, and the margin depends on how much data backs it. These formulas, standard in intro stats courses, invert that relationship: tell them the precision you want, and they return the n that delivers it.

The formulas

Proportion (Cochran): n0 = z² x p(1-p) / e². Plug in the z-score for your confidence level, your best guess at the proportion p (0.5 is the safe default), and the margin of error e as a decimal. Finite population correction: if you're sampling from a small group of N people, n = n0 / (1 + (n0-1)/N). Mean: n = (z x s / e)², with s the standard deviation from a pilot sample and e the margin in real units. Always round up: you need 385 completed responses, not 384.16 people.

How to use it

Pick the mode: Proportion for questions like "what percent of customers would churn?" and Mean for questions like "what's the average delivery time?" Choose 95% unless you have a reason otherwise. Set p to 50% when you have no prior data; enter your population size when the group is small enough that the correction matters (roughly under 20,000). The achieved-margin output shows what your final n actually buys you.

A worked example

A student council wants to know what fraction of a 1,000-student school favors later start times, within ±5%, at 95% confidence, with no prior data. Cochran: n0 = 1.96² x 0.5 x 0.5 / 0.05² = 384.16, so 385. But the population is only 1,000, so the correction gives n = 384.16 / (1 + 383.16/1000) = 277.7, so 278 students. Surveying all 1,000 would be pointless overkill; 278 delivers the promised ±5%.

Now a mean example. A logistics team knows delivery times have a standard deviation of about 15 minutes from last quarter's data and wants the average to within ±3 minutes at 95%. n = (1.96 x 15 / 3)² = 96.04, so 97 timed deliveries. If they only need ±5 minutes, n drops to (1.96 x 15/5)² = 34.6, or 35. Precision is expensive exactly when you demand it.

One caution: these formulas assume a simple random sample and honest responses. Non-response bias, convenience samples, and self-selection break the math no matter how big n is. A survey of 2,000 volunteers can be worse than 400 randomly chosen people.

Frequently Asked Questions

How many people do I need to survey for 95% confidence?

For a large or unknown population at a 5% margin of error and a 50/50 response split, Cochran's formula gives 385 responses. Tighten the margin to 3% and it jumps to 1,068; loosen it to 7% and it falls to 196. If your population is small, the finite population correction shrinks the number: 278 for 1,000 people, 218 for 500.

What is Cochran's sample size formula?

n0 = z² x p(1-p) / e², where z is the critical value for your confidence level, p is the estimated proportion, and e is the margin of error. With z=1.96, p=0.5, and e=0.05, that's 1.96² x 0.25 / 0.0025 = 384.16, rounded up to 385. For a finite population N, apply the correction n = n0 / (1 + (n0-1)/N).

Why does 385 work for almost any population?

Sample size grows with the square root of population, so it flattens fast. At 95%/5%, you need 278 of 1,000 people, 357 of 5,000, 370 of 10,000, and 385 of a million or more. The intuition: absolute precision depends on sample size, not what fraction of the population you sampled. That's why a national poll of ~1,000 people has a ±3.1% margin of error.

When do I use the sample mean formula instead?

When you're estimating an average rather than a percentage, use n = (z x s/e)², where s is the standard deviation from a pilot study or prior data and e is the margin of error in the same units. Estimating average delivery time to within 3 minutes when s=15 needs (1.96 x 15/3)² = 96.04, so 97 measurements.

What z-score goes with each confidence level?

The common pairs: 80% uses 1.282, 90% uses 1.645, 95% uses 1.96, 98% uses 2.326, and 99% uses 2.576. The z-score is how many standard errors you flank the estimate with; wider confidence needs a bigger z, which raises sample size with the square of it.

Why is p = 0.5 the default?

p(1-p) hits its maximum at p=0.5, so assuming a 50/50 split guarantees your sample is big enough whatever the true proportion turns out to be. If you already know the answer is lopsided, say 80/20, you can lower n: p(1-p) drops from 0.25 to 0.16, a 36% smaller sample.

Advertisement