Cochran's formula online: sample size calculator
Calculate your questionnaire's sample size with Cochran's formula: enter the population size (or leave it blank if unknown), choose the confidence level and margin of error, and the sample size is shown along with the calculation steps. The Morgan table is further down this page.
Calculate the sample size for your own study
If unknown or very large, leave blank.
z = 1.96
e.g. 0.05 or 5%
Unknown: 0.5
Required sample size
385people
unknown or very large population · 95% confidence · margin 0.05
- n₀ = (1.96)² × 0.5 × 0.5 ÷ (0.05)² = 384.16
- ⌈384.16⌉ = 385
Ready-made text for the methods chapter
Sample size was determined with Cochran's formula for an unknown population. With a 95% confidence level, a margin of error of 0.05 and a proportion of 0.5, the required sample size is 385.
What is Cochran's formula? The z, p, q and d components
Cochran's formula gives a study's sample size from the confidence level (z), the proportion of the population with the attribute (p and q) and the margin of error (d), and when the population size (N) is known it corrects the result for a finite population. For example, a population of 1000 at 95% confidence and a 0.05 margin of error needs a sample of 278.
Formula
n₀ = z² × p × q ÷ d²Sample size for a large or unknown population; q is simply 1 minus pn = n₀ ÷ (1 + (n₀ − 1) ÷ N)Finite population correctionn = N × z² × p × q ÷ (N × d² + z² × p × q)The one-line form common in Persian textbooks; it uses n₀ instead of n₀ − 1, so its result is sometimes one person lower
Cochran's formula has four components, and each must be reported in your methodology chapter:
- z: the normal distribution value for the confidence level; 1.645 for 90%, 1.96 for 95% and 2.576 for 99%. Some textbooks call it t.
- p and q: p is the proportion of the population that has the attribute under study and q the proportion that doesn't, i.e. 1 minus p. If you don't know it, set p to 0.5 so that q is 0.5 too; this yields the largest sample size and is the most conservative choice.
- d: the margin of error, or estimate precision; 0.05 is the most common value. A smaller margin needs a larger sample: halving d roughly quadruples the sample size.
- N: the population size; when known, it is used for the finite population correction.
The calculator always rounds up, because the sample size must be a whole number and rounding down means slightly less precision than you asked for.
Known and unknown populations
If the population is very large — say, every university student in the country — or you don't know its exact size, the first part of the formula is enough: leave the population box empty. With 95% confidence, p = 0.5 and d = 0.05 the result is 384.16, usually written as 384 in textbooks; because the calculator rounds up, it shows 385.
If the population is finite and known — say, a company's staff or a school's students — the finite population correction lowers the sample size. The smaller the population, the bigger the reduction; for populations in the hundreds of thousands the difference all but disappears and the number stays close to 384.
Worked examples of Cochran's formula
A common question: how large a sample does a population of 1000 need at 95% confidence and a 0.05 margin of error? Step by step:
Calculation for N = 1000
n₀ = 1.96² × 0.5 × 0.5 ÷ 0.05² = 384.16Sample size for an infinite populationn = 384.16 ÷ (1 + 383.16 ÷ 1000) = 277.74Finite population correction⌈277.74⌉ = 278rounded up
So you need at least 278 complete questionnaires. The one-line form of the formula gives 277.54 for the same population, which also rounds up to 278, and the Morgan table suggests 278. The table below shows the same calculation with other inputs:
| Scenario | N | Confidence | d | p | n₀ | Sample size |
|---|---|---|---|---|---|---|
| Baseline: a population of 1000 | 1,000 | 95% | 0.05 | 0.5 | 384.16 | 278 |
| Unknown population | Unknown | 95% | 0.05 | 0.5 | 384.16 | 385 |
| Higher confidence (99%) | 500 | 99% | 0.05 | 0.5 | 663.58 | 286 |
| Smaller margin of error (0.03) | 2,000 | 95% | 0.03 | 0.5 | 1,067.11 | 697 |
| p known from a pilot study | 1,000 | 95% | 0.05 | 0.2 | 245.86 | 198 |
| Quick estimate with a 0.1 margin | 300 | 95% | 0.1 | 0.5 | 96.04 | 73 |
The same calculation in Excel
=ROUNDUP((1.96^2*0.5*0.5/0.05^2)/(1+((1.96^2*0.5*0.5/0.05^2)-1)/A1),0)Population size in cell A1; gives 278 for 1000=ROUNDUP(1.96^2*0.5*0.5/0.05^2,0)Unknown population: 385
Both use 95% confidence, a 0.05 margin of error and p = 0.5; for other values, change 1.96, 0.05 and 0.5. If your Excel expects “/” as the decimal separator or “;” between arguments, use those instead of “.” and “,”.
Cochran sample size table for common population sizes
If your population size is in this table, take the number directly. Every value uses p = 0.5 and is rounded up, and the “95% confidence, 0.05 margin” column is the usual thesis setting; for sizes between rows, use the calculator at the top of the page.
| Population size (N) | 95% confidence, 0.05 margin | 95% confidence, 0.03 margin | 95% confidence, 0.1 margin | 99% confidence, 0.05 margin |
|---|---|---|---|---|
| 50 | 45 | 48 | 34 | 47 |
| 100 | 80 | 92 | 50 | 88 |
| 150 | 109 | 132 | 59 | 123 |
| 200 | 132 | 169 | 66 | 154 |
| 250 | 152 | 203 | 70 | 182 |
| 300 | 169 | 235 | 73 | 207 |
| 400 | 197 | 292 | 78 | 250 |
| 500 | 218 | 341 | 81 | 286 |
| 750 | 255 | 441 | 86 | 353 |
| 1,000 | 278 | 517 | 88 | 400 |
| 1,500 | 306 | 624 | 91 | 461 |
| 2,000 | 323 | 697 | 92 | 499 |
| 3,000 | 341 | 788 | 94 | 544 |
| 5,000 | 357 | 880 | 95 | 586 |
| 10,000 | 370 | 965 | 96 | 623 |
| 20,000 | 377 | 1,014 | 96 | 643 |
| 50,000 | 382 | 1,045 | 96 | 655 |
| 100,000 | 383 | 1,056 | 96 | 660 |
| 1,000,000 | 385 | 1,066 | 97 | 664 |
| Unknown or very large | 385 | 1,068 | 97 | 664 |
Morgan table
The Krejcie & Morgan (1970) table did the same calculation in advance for common population sizes, with 95% confidence (χ² = 3.841), a proportion of 0.5 and a margin of error of 0.05. The third column is Cochran's formula with the finite population correction, so you can see both methods side by side.
| Population size (N) | Morgan sample size | Cochran with finite population correction |
|---|---|---|
| 10 | 10 | 10 |
| 20 | 19 | 20 |
| 30 | 28 | 28 |
| 50 | 44 | 45 |
| 75 | 63 | 63 |
| 100 | 80 | 80 |
| 150 | 108 | 109 |
| 200 | 132 | 132 |
| 300 | 169 | 169 |
| 400 | 196 | 197 |
| 500 | 217 | 218 |
| 750 | 254 | 255 |
| 1,000 | 278 | 278 |
| 1,500 | 306 | 306 |
| 2,000 | 322 | 323 |
| 3,000 | 341 | 341 |
| 5,000 | 357 | 357 |
| 10,000 | 370 | 370 |
| 20,000 | 377 | 377 |
| 50,000 | 381 | 382 |
| 100,000 | 383 | 383 |
| 1,000,000 | 384 | 385 |
The full 90-row Krejcie and Morgan table, its formula and a calculator that gives the table value for any population size are on the page Morgan table.
Cochran or the Morgan table?
- The Morgan table is Cochran's calculation done in advance for common population sizes at 95% confidence, a proportion of 0.5 and a 0.05 margin of error; its numbers differ from Cochran's by at most one person.
- If you need a different confidence level or margin of error (say 99% or 0.03), know p from a pilot study, or don't know the population size, use Cochran's formula.
- If your supervisor asked for the Morgan table and your population size is in it, take the number from the table and cite Krejcie and Morgan (1970).
- For a population between two rows of the table, don't guess: get the exact number from the Morgan table calculator or the calculator on this page.
For example, for the 1,200 teachers of one province, Cochran gives 292 and the Morgan table 291; both numbers are acceptable in a thesis — just cite the method you used and its source.
Sample attrition in online questionnaires
Sample size means complete, usable questionnaires — not the number of people who open the link. In an online questionnaire some people always drop out halfway, and some give careless or duplicate answers that have to be discarded.
To compensate, divide the sample size by the share of usable responses you expect. If you think 20% of responses will be discarded, collect at least 482 responses instead of 385 (385 divided by 0.8).
Building and publishing are free, and the free account gets 50 responses a month; more responses unlock with any monthly, quarterly or yearly plan, and no response is ever lost. The “suspicious responses” report separates very fast answers and straight-lined matrices, and the “incomplete responses analysis” and “drop-off point per question” reports show where respondents abandoned the questionnaire. For the questionnaire itself, see Build an online questionnaire for details.
After you have your sample size
Build the questionnaire
Build your online questionnaire for free, or, if a validated instrument exists for your construct, start from the ready-made standard questionnaires; either way you get a link to send to your sample.
Check reliability
With your pilot data, check reliability with the Cronbach's alpha calculator; 0.7 or higher is usually acceptable.
Report the method
In the methods chapter, write: “Using Cochran's formula with a 95% confidence level and a 0.05 margin of error, the sample size for a population of 1000 was set at 278.” The calculator at the top of the page writes this sentence with your own numbers.
Frequently asked questions
What sample size does Cochran's formula give for an unknown population?
At 95% confidence, p = 0.5 and a 0.05 margin of error, the formula gives 384.16; sources usually write 384, or 385 when rounding up.
What sample size does Cochran's formula give for a population of 1000?
278, at 95% confidence, a 0.05 margin of error and p = 0.5: n₀ is 384.16, and after the finite population correction it becomes 277.74, which is rounded up. The Morgan table also gives 278 for this population.
Why set p to 0.5?
Because the product p × (1 − p) is largest when p is 0.5. When you don't know the proportion in the population, 0.5 gives the largest and most conservative sample size.
What is q in Cochran's formula?
q is the proportion of people who don't have the attribute under study, equal to 1 minus p. When you set p to 0.5, q is 0.5 too and the product p × q reaches its maximum, 0.25.
How does the Morgan table differ from Cochran's formula?
The Morgan table has pre-computed the same calculation at 95% confidence and a 0.05 margin of error for common population sizes. The two methods differ by at most one person, due to rounding and the χ² value.
What if I don't know the population size?
Leave the population size box empty. Cochran's formula is then applied without the finite population correction, which gives the largest sample size for that confidence level and margin of error.
How do I calculate Cochran's formula in Excel?
If the population size is in cell A1, the formula =ROUNDUP((1.96^2*0.5*0.5/0.05^2)/(1+((1.96^2*0.5*0.5/0.05^2)-1)/A1),0) gives the calculator's number at 95% confidence, a 0.05 margin of error and p = 0.5: 278 for a population of 1000.
Can respondents enter Persian digits too?
Yes. The calculator accepts Persian and English digits, and you can write the decimal separator as a period, “٫” or “/”; for example 0.05 or 5%.
Related pages
- Morgan tableThe full Krejcie and Morgan table and a sample size calculator for any population.
- Cronbach's alpha calculatorPaste data from Excel or SPSS: alpha, each item's correlation and alpha if item deleted, with a ready-made thesis sentence.
- Build an online questionnaireThesis questionnaires with Likert scales, matrices, conditional logic and direct SPSS export.
- Build an online surveyCustomer and employee satisfaction surveys with invitations and ready-made reports.
Survey & analysis guides
All posts- How to Determine Sample Size: Cochran's Formula, the Morgan Table or Power AnalysisCochran and Morgan were built to estimate a proportion in a population, not to test a relationship. With worked examples, this guide shows when to use which method, how to apply the finite population correction and allow for attrition, and what power analysis gives for correlation, regression and group comparisons.9 min read
- Running Your Thesis Questionnaire Online: From Design to SPSS ExportTen practical steps for running a thesis questionnaire online: preparation before you build, starting from a standard or researcher-made instrument, coding for SPSS, an informed-consent page, blocking duplicates, piloting, distributing with a short link and QR code, daily monitoring and a .sav export with labels ready.9 min read
- Questionnaire Design: A Guide to Standard Questionnaires for Theses and Research (With Sample Questions)The standard structure of a questionnaire, choosing a scale, validity (face, content with Lawshe's CVR table, construct) and reliability (Cronbach's alpha with a worked example), sample size, a complete 15-item sample, running it online, and exporting to SPSS.14 min read
Now build your questionnaire
You have your sample size; build the online questionnaire for free and send the link to your population.