induwara.lk
induwara.lkResearch · Statistics

Sample Size Calculator

Work out the minimum number of survey or experiment respondents you need for a chosen confidence level and margin of error. Uses Cochran's formula with the finite-population correction, shows the working, and gives you a sentence to cite. No signup, no ads.

By Induwara AshinsanaUpdated Jun 11, 2026
Calculate your sample sizeCochran's formula
NIST · Cochran 1977
%

± precision, e.g. 5

%

Use 50 if unknown

Optional — leave blank if very large

Common scenarios
Required sample size
385
Rounded up to whole respondents
Unadjusted (n₀)
385
No population correction needed
z value used
1.960
Two-tailed standard normal
Delivered margin
±4.99%
At this rounded sample size

Your numbers in the formula

n₀ = z² · p · (1 − p) / e²

= 1.96² × 0.5 × 0.50 / 0.05²

= 3.8416 × 0.2500 / 0.0025 = 384.16

Required sample size = ⌈384.16⌉ = 385

Precision trade-off

Margin of errorSample size needed
±1%9,604
±2%2,401
±3%1,068
±5%385
±10%97

For your methodology section

A sample of 385 respondents was required for a 95% confidence level and a ±5.0% margin of error, assuming an expected proportion of 50% (Cochran, 1977).

Method: Cochran (1977), Sampling Techniques, with the finite-population correction; z critical values from the NIST/SEMATECH e-Handbook. Sources linked under the calculator. Assumes simple random sampling.

How it works

The calculator uses the method published by W. G. Cochran in Sampling Techniques (1977) for estimating a single population proportion under simple random sampling. It runs in four steps, each of which is shown back to you with your own numbers substituted in.

  1. Pick the z critical value. Each confidence level maps to a two-tailed standard-normal critical value (NIST/SEMATECH e-Handbook §1.3.6.7.1): 80% → 1.282, 85% → 1.440, 90% → 1.645, 95% → 1.960, 99% → 2.576.
  2. Convert to decimals. The margin of error e and proportion p are divided by 100, so a 5% margin becomes 0.05 and a 50% proportion becomes 0.5.
  3. Compute the unadjusted size. Cochran's formula is n₀ = z² · p · (1 − p) / e². The term p·(1−p) is the variance of a proportion and is largest at p = 0.5, which is why 50% gives the safest (largest) sample when the true proportion is unknown.
  4. Apply the finite-population correction. If you supply a population N, the tool applies n = n₀ / (1 + (n₀ − 1) / N), which lowers the requirement when the population is small relative to n₀. With no population entered, the infinite-population assumption applies and n = n₀.

The result is always rounded up to a whole respondent — you cannot survey a fraction of a person, and rounding down would undershoot your target precision. As an independent check, the tool feeds the rounded-up sample size back through the inverse of the formula, e = z · √(p·(1 − p) / n₀), and reports the margin of error that size actually delivers. That figure is always at or inside your requested margin, which confirms the rounding is on the safe side. The default proportion is 50% precisely because it maximises this safety margin.

Worked examples

95% confidence, ±5%, unknown population

The classic survey default

  1. z = 1.960, p = 0.5, e = 0.05
  2. n₀ = 1.960² × 0.5 × 0.5 / 0.05²
  3. = 3.8416 × 0.25 / 0.0025
  4. = 0.9604 / 0.0025 = 384.16
  5. Rounded up → 385 respondents

99% confidence, ±3%, faculty of 2,000

Finite-population correction in action

  1. z = 2.576, p = 0.5, e = 0.03, N = 2,000
  2. n₀ = 2.576² × 0.25 / 0.03² = 1,843.27
  3. n = 1,843.27 / (1 + (1,843.27 − 1) / 2,000)
  4. = 1,843.27 / 1.92114 = 959.47
  5. Rounded up → 960 respondents

95% confidence, ±10%, unknown population

Coarser precision needs far fewer people

  1. z = 1.960, p = 0.5, e = 0.10
  2. n₀ = 3.8416 × 0.25 / 0.01
  3. = 0.9604 / 0.01 = 96.04
  4. Rounded up → 97 respondents

Frequently asked questions

Sources & references

The formula and z critical values were last cross-checked against these sources on 2026-06-11. This version assumes simple random sampling of a single proportion; it does not cover two-group comparisons, statistical power, stratified or cluster designs, or sample size for estimating a mean.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.