Cochran’s Formula Calculator

Calculate sample size with Cochran's formula and the finite population correction, with a step-by-step solution.

%
How sure you want to be. 95% is the standard in most research.
%
50% gives the largest, safest sample.
Adds the finite population correction.
Sample size
—

Step-by-step solution

				

Cochran’s formula is the most widely used method to calculate a sample size for surveys that estimate a percentage. It lets you choose your margin of error, confidence level and expected proportion, and it can be adjusted for small populations. The calculator above shows every step, so you can copy the working straight into your methodology chapter.

Cochran’s formula

n₀ = Z² × p × q / e²
  • n₀ = the sample size for a large (unlimited) population
  • Z = the z-score for your confidence level
  • p = the estimated proportion of the population with the attribute you measure (0.5 if unknown)
  • q = 1 − p
  • e = the desired margin of error as a decimal (5% = 0.05)

Z-scores for common confidence levels

Confidence levelZ-scoren₀ at e = 5%, p = 0.5
90%1.645271
95%1.96385
99%2.576664

Finite population correction

The basic formula assumes a very large population. If your population is small, you can survey fewer people and still reach the same precision. Cochran’s correction is:

n = n₀ / (1 + (n₀ − 1) / N)

where N is the population size. A common rule of thumb is to apply the correction when n₀ is more than 5% of the population. Enter a population size in the calculator and it is applied automatically.

Worked example

A hospital wants to survey its 2,000 patients with a 5% margin of error at 95% confidence. There is no earlier estimate, so p = 0.5.

  1. Square the z-score. 1.96² = 3.8416.
  2. Multiply by p × q. 3.8416 × 0.5 × 0.5 = 0.9604.
  3. Divide by e². 0.9604 / 0.0025 = 384.16. This is n₀.
  4. Check the population. 384.16 is 19% of 2,000, so apply the correction.
  5. Correct for the population. 384.16 / (1 + 383.16 / 2,000) = 384.16 / 1.1916 = 322.4.
  6. Round up. The hospital needs 323 patients.

Choosing the value of p

If an earlier study or a pilot survey gives you an estimate, use it. Suppose earlier research found that about 20% of people have the attribute you are measuring. Then p = 0.2 and q = 0.8:

n₀ = 1.96² × 0.2 × 0.8 / 0.05² = 245.9 → 246

That is much smaller than the 385 you get with p = 0.5. Only do this when you have a solid estimate: if the true proportion turns out to be closer to 50%, your margin of error will be larger than planned.

Cochran vs. Slovin vs. Raosoft vs. Krejcie & Morgan

MethodInputsN = 1,000, e = 5%
Cochran (with correction)e, confidence, p, N278
Raosofte, confidence, response distribution, N278
Krejcie & Morgan table (1970)N (fixed at 95%, e = 5%)278
Slovin / Yamanee, N286

Raosoft and the Krejcie & Morgan table are both based on the same idea as Cochran’s formula with the finite population correction, which is why they give the same answer. Slovin’s formula is a simplified version that uses a z-score of 2 and gives a slightly larger sample.

Cochran’s formula for averages

When you want to estimate an average (for example, average weekly hours of study) rather than a percentage, use the continuous version:

n₀ = Z² × σ² / e²

Here σ is the standard deviation and e is the margin of error in the same unit as your measurement. If σ = 6 hours and you want to be within ±1 hour at 95% confidence: n₀ = 3.8416 × 36 / 1 = 138.3, so 139 respondents.

Reporting Cochran’s formula in your thesis

A typical methodology paragraph reads:

“The sample size was calculated with Cochran’s formula (Cochran, 1977) using a 95% confidence level, a 5% margin of error and an estimated proportion of 0.5. After applying the finite population correction for a population of 2,000, the required sample size was 323.”

Also mention your expected response rate and how many people you invited. Our sample size calculator works out the number of invitations for you, and the margin of error calculator tells you the precision you reached after data collection.

Frequently Asked Questions

What is Cochran's formula?

Cochran's formula, n₀ = Z² × p × q / e², calculates the sample size needed to estimate a proportion with a chosen margin of error (e) and confidence level (Z). With 95% confidence, p = 0.5 and e = 0.05 it gives 384.16, so 385 respondents.

When should I use the finite population correction?

When your sample would be a noticeable share of the population. A common rule is to apply it when n₀ is more than 5% of N. The correction n = n₀ / (1 + (n₀ − 1) / N) always lowers the required sample size.

Is the Raosoft calculator based on Cochran's formula?

Yes. The Raosoft formula is Cochran’s formula combined with the finite population correction, written in percentages. Both give the same results.

What value of p should I use?

Use an estimate from earlier research or a pilot study if you have one. If you do not, use p = 0.5 (50%). That gives the largest possible sample size, so your sample is large enough whatever the true proportion turns out to be.

Can Cochran's formula be used for averages instead of percentages?

Yes, there is a version for continuous data: n₀ = Z² × σ² / e², where σ is the standard deviation and e the margin of error in the same units. You need an estimate of σ from earlier research or a pilot study.

What is the reference for Cochran's formula?

Cochran, W. G. (1977). Sampling Techniques (3rd ed.). New York: John Wiley & Sons. The first edition appeared in 1953.

More statistics calculators