logic.codes

Sample Size Calculator (Surveys)

How many respondents do I need for a given margin of error and confidence level?

Single calculationv1.0.0Verified 2026-11-01Runs in your browser

Spec sheet

cochran_proportion · v1.0.0
Method

Cochran's formula with finite population correction

  1. 01n₀ = z² · p(1 − p) / e²
  2. 02n = n₀ / (1 + (n₀ − 1)/N)
  3. 03invitations = n ÷ response rate
Limits — read before relying on it
  • Simple random sampling of a proportion; clustered or stratified designs need a design effect.
  • Not a power analysis for comparing groups.
Sources
  • Cochran, W. G. (1977). Sampling Techniques (3rd ed.). Wileytextbook

Worked example

computed by the same formula

95 %, ±5 %, p = 50 %

Inputs
Confidence level
95 %
Margin of error
5 %
Expected proportion
50 %
Expected response rate
100 %
Result
Completed responses needed
385
People to invite
385
Infinite-population size
385
  1. 1. z = 1.96
  2. 2. n₀ (unrounded) = 384.146

Questions

How is the sample size calculator calculated?

›

Cochran's formula with finite population correction. n₀ = z² · p(1 − p) / e² · n = n₀ / (1 + (n₀ − 1)/N) · invitations = n ÷ response rate

Example: 95 %, ±5 %, p = 50 %?

›

Completed responses needed: 385; people to invite: 385.

What does this calculator not cover?

›

Simple random sampling of a proportion; clustered or stratified designs need a design effect. Not a power analysis for comparing groups.

Where do the numbers come from?

›

Sources: Cochran, W. G. (1977). Sampling Techniques (3rd ed.). Wiley. The formula is versioned (cochran_proportion v1.0.0) and covered by automated tests.

Is my data stored?

›

No. The calculation runs in your browser and nothing is sent unless you choose to save a shareable link.

Also searched assample size calculator · how many survey responses do i need · survey sample size · sample size for 95 confidence 5 margin · cochran formula

Related

More research & statistics calculators