U

Sample Size Calculator

Find the sample size needed for a survey from confidence level, margin of error and population proportion, or compute the margin of error for a given sample.
Find the sample size
5%
%
1%20%
50%
%
1%99%
0
01000000

Sample Size Estimate

Breakdown

Sample size (unlimited population)
0
Z-score for the confidence level
0

Key Assumptions

  • The sample size is computed for an estimated population proportion using the standard normal approximation: n0 = z² × p(1−p) / e², rounded up to a whole number of respondents.
  • A finite-population correction factor n0 / (1 + (n0 − 1) / N) is applied whenever a population size greater than zero is entered.
  • When the population size is left at zero, the survey is treated as having an unlimited population and only the uncorrected formula is used.
  • The margin-of-error tab assumes a simple random sample and reports the standard error band for the given sample size at the chosen confidence level.
  • Results assume proportions between 1 and 99 percent and a minimum margin of error of 1 percent; the most conservative proportion is 50 percent.

Formula Used

n0 = z² · p̂(1 − p̂) / e² (unlimited population) n = n0 / (1 + (n0 − 1) / N) (finite population correction) Margin of error = z · √(p̂(1 − p̂) / n) for a proportion where z is the z-score of the confidence level, p̂ the proportion, e the margin of error and N the population size.
Embed this calculator on your website

Add this embed page to your site — visitors use the calculator right from your page.

The Sample Size Calculator answers the question every survey designer starts with: how many people do I need to ask? Too few respondents and your results swing wildly; too many and you waste time and money collecting data you never needed. This calculator finds the minimum sample size for your survey from three inputs, confidence level, margin of error and the expected population proportion, and it also runs the reverse calculation, turning a given sample size back into the margin of error it supports. Both directions use the standard formulas statisticians have relied on for decades.

How to Determine Sample Size for a Survey

The logic of sample size starts with a simple fact: you cannot ask everyone, so you ask enough people that the answer you get is close to the answer the whole population would give. Close is defined by the margin of error, the plus-or-minus range around your result, and confident is defined by the confidence level, how sure you want to be that the true value falls inside that range. Fix those two, add your best guess at the population proportion, and the sample size formula does the rest. The trade-off is relentless: shrink the margin of error from 5 percent to 2 percent and the required sample roughly multiplies by six, because precision is expensive in respondents. Set the tolerance you can live with and the calculator returns the minimum sample that achieves it.

The Sample Size Formula, Step by Step

For a survey measuring a proportion, the required sample size is n equals z squared times p times one minus p, all divided by the margin of error squared. The z comes from your confidence level: 1.645 for 90 percent, 1.96 for the classic 95 percent, 2.58 for 99 percent. The p is the expected proportion of the population with the characteristic you are measuring, entered as a percentage. The margin of error is the maximum gap you will tolerate between the sample estimate and the truth, also a percentage. Because p times one minus p peaks at 0.5, using 50 percent gives the largest, safest sample. The calculator evaluates that expression and rounds the result up to a whole number, because you cannot interview a fraction of a respondent.

Confidence Levels and Their Z-Scores

The confidence level is the probability that your interval actually contains the true population value when the survey is repeated many times. A 95 percent confidence level does not mean your specific result is 95 percent likely to be exactly right; it means the estimation procedure produces a correct interval 95 percent of the time in the long run. Each confidence level maps to a z-score from the standard normal distribution, and the calculator stores those values directly in the selector: 80 percent uses 1.28, 85 percent uses 1.44, 90 percent uses 1.645, 95 percent uses 1.96, 98 percent uses 2.33, 99 percent uses 2.58 and 99.9 percent uses 3.29. Choose the confidence you need and the matching z-score is applied automatically, with the number shown on the results card for transparency.

The Margin of Error and Why It Is a Trade-Off

The margin of error is the tolerance band around your estimate. A poll reporting 45 percent support with a margin of error of 5 percent at 95 percent confidence means the true figure most likely sits between 40 and 50 percent. The relationship between sample size and margin of error is not linear: to halve the margin you must roughly quadruple the sample, which is why high-precision research gets expensive fast. The formula reflects that with the margin squared in the denominator. This is also why the calculator's Find Margin of Error tab is useful: given the sample you can actually collect, it tells you the honest precision you have, so you can decide whether to recruit more respondents or accept a wider interval.

Population Proportion: Why 50 Percent Is the Safe Default

The population proportion p is your estimate of the share of people who will answer in the way you care about, like the fraction who support a policy or the percentage who would buy the product. When you have no good guess, 50 percent is the standard choice, because p times one minus p reaches its mathematical maximum at 0.5, demanding the largest sample. Using 50 percent means your sample is big enough no matter where the true proportion lands. If you have solid prior evidence that the real share is much lower, say 20 percent, entering that figure shrinks the required sample noticeably without losing validity, because the formula is less demanding far from the middle.

Population Size and the Finite Correction

Surprisingly, the size of the population matters far less than most people expect. For populations above a few thousand, the required sample barely changes as the population grows, which is why the same 385 responses suffice for a city, a country or a planet. For small, finite populations, however, a correction is needed, because sampling a large share of a small group removes uncertainty quickly. The calculator applies the finite population correction whenever you enter a population size greater than zero, shrinking the sample toward a sensible ceiling. Leave the population field at zero and the survey is treated as having an unlimited population, which is the right model for national polls and for populations too large to enumerate.

Why 385 Is the Classic Rule of Thumb

The number 385 appears in countless sample size guides because it is the answer the formula gives for the most common settings: 95 percent confidence, a 5 percent margin of error and a 50 percent population proportion with an unlimited population. Plug in the numbers, 1.96 squared times 0.5 times 0.5 divided by 0.05 squared, and you get 384.16, which rounds up to 385. It is the instant answer for a general-purpose survey with no special precision requirements, and it is a reasonable starting point whenever you are unsure of the specifics. When your study demands tighter margins or higher confidence, the calculator replaces the rule of thumb with the exact figure.

Finding the Margin of Error From a Given Sample

The second tab flips the question around. Given the sample size you have actually managed to collect, plus a confidence level and the observed proportion, it computes the margin of error your results carry. The formula works the same in reverse: the margin equals the z-score times the square root of p times one minus p divided by n, adjusted for a finite population when one is specified. This is the number to report next to your results, the one that tells readers how much credence to give a 60 percent finding from 200 respondents versus 2000. If the margin comes out too wide for your purposes, the answer is more responses, a lower confidence level, or an honest note about the limitations.

Random Sampling and Why It Underpins Everything

All of these formulas assume one thing that is easy to take for granted: a sample that is genuinely random. The mathematics describes the behaviour of random samples, where every member of the population has a known chance of being selected. A biased sample, such as one drawn only from website visitors or only from people who respond to a particular ad, is not covered by any of this arithmetic, because the error it carries is systematic rather than random. Even a perfectly sized sample cannot fix a selection problem. That is why researchers obsess over sampling frames and response rates: the sample size formula tells you how many people to ask, but how you choose them determines whether the number means anything.

Common Mistakes

  • Using a 5 percent margin with 99 percent confidence and wondering why the sample balloons; both dials move the number.
  • Entering the proportion as a fraction like 0.5 when the field expects a percentage like 50.
  • Forgetting the finite-population correction on small populations, or applying it on populations of millions where it changes nothing.
  • Assuming more responses always means better data when a badly drawn sample stays biased regardless of size.
  • Reporting results with a margin of error computed for a different sample size than the one actually collected.

Key Assumptions

  • The sample is a simple random sample from the population of interest.
  • The quantity being estimated is a proportion, not a mean, so the proportion-based formulas apply.
  • The z-score approximation holds, which is reliable for the sample sizes and confidence levels this tool covers.
  • The population proportion is a percentage between 1 and 99, with 50 used when the true value is unknown.

Deciding how many people to survey is a question of mathematics, not guesswork. Choose your confidence level, decide how much error you can tolerate, estimate the population proportion, and the Sample Size Calculator returns the minimum number of responses you need, adjusted for finite populations when it matters. When the fieldwork is done, the same tool reports the honest margin of error your results carry. For the statistical foundations behind these numbers, explore the z-score calculator and the standard deviation calculator, and use the statistics calculator to summarize the data your carefully sized sample finally delivers.

Disclaimer

Results are provided as estimates for informational purposes only and may be inaccurate. Always verify outcomes with a qualified professional before making financial or personal decisions based on these calculations.

FAQs

Related Calculators