TTKTheTextKit

Sample Size Calculator

Choose a confidence level and a margin of error and see how many people you need to survey. It works for a percentage (such as the share who say yes) and for an average, applies the correction for a small population, and can run the other way to give the margin of error that a sample size produces. Everything runs in your browser.

Use 50 if you do not know

Leave empty if large or unknown

Sample size needed
385
Rounded up to a whole person
Before rounding
384.15
Critical value (z)
1.9600
Two-sided, from the confidence level

To estimate a percentage, the sample size is n = z² x p x (1 - p) / E², where z is the critical value for the confidence level (1.96 for 95%), p is the share you expect and E is the margin of error as a fraction. Using p = 50% gives the largest and so the safest sample. To estimate an average it is n = (z x s / E)², with s the standard deviation. For a small, known population the result is reduced by the finite population correction n / (1 + (n - 1) / N). The answer is always rounded up. For example, 95% confidence and a 5 point margin need 385 responses from a large population, and 278 from a population of 1,000. The formulas assume a simple random sample, so they do not cover bias from who chooses to answer. Everything is worked out in your browser and nothing is uploaded.

Related Tools

[5 suggestions]

About the Sample Size Calculator

The sample size for estimating a percentage is n = z^2 x p x (1 - p) / E^2, where z is the critical value for the confidence level, p is the share you expect and E is the margin of error as a fraction. For 95 percent confidence z is 1.96, and with p at 50 percent, which gives the largest and so the safest sample, a margin of 5 points needs 384.16, which is rounded up to 385 responses. A margin of 3 points needs 1,068 and a margin of 1 point needs 9,604. At 99 percent confidence the 5 point case needs 664, and at 90 percent it needs 271. To estimate an average the formula is n = (z x s / E)^2, with s the standard deviation and E in the same units as the measurement. When the population is small and known, the finite population correction n / (1 + (n - 1) / N) lowers the number: 95 percent confidence and a 5 point margin need 278 people from a population of 1,000, and 218 from 500, but still 383 from 100,000, which shows that population size matters little unless it is small. The margin of error for a given sample is z x the square root of p(1 - p) / n, so 1,000 responses give about plus or minus 3.1 points. Quadrupling the sample only halves the margin. The critical value is calculated from the normal distribution, so any confidence level works, not just 90, 95 and 99. These formulas assume a simple random sample and honest answers. They do not account for non-response, self-selection or a poorly worded question, which usually cause more error than sampling does. Nothing is uploaded.

How many responses do I need for a survey?▾

For 95 percent confidence and a margin of error of 5 percentage points, you need 385 responses from a large population. For a 3 point margin you need 1,068, and for a 1 point margin 9,604.

Why does the tool use 50 percent as the expected proportion?▾

Because p x (1 - p) is largest at 50 percent, so it gives the biggest sample size and a result that is safe whatever the true share turns out to be. If you have a good estimate, such as 20 percent, you can enter it and need fewer responses.

Does the population size matter?▾

Only when the population is small. For a population over about 20,000 the answer barely changes. For 1,000 people you need 278 instead of 385, and the finite population correction in the tool applies this.

What is the difference between confidence level and margin of error?▾

The margin of error is how far the result may be from the true value, such as plus or minus 5 points. The confidence level is how often that range would contain the true value if you repeated the survey, such as 95 percent of the time.

Is my data uploaded?▾

No. The calculation runs in your browser and nothing is sent anywhere.