๐ Sample Size Calculator for Surveys and Research
By Shihab Mia ยท Updated 2026-08-04
Set your confidence level, margin of error, and expected proportion to get the minimum sample size you need. Add a population size if you are surveying a known, limited group.
A sample size calculator tells you exactly how many people you need to survey to get a result you can trust. Enter your confidence level, margin of error, and expected proportion, and the calculator applies the standard sample-size-for-a-proportion formula to return the minimum number of respondents required. Add a population size and it also applies the finite population correction, which lowers the required sample size when you are drawing from a smaller, known group instead of an effectively unlimited one.
What is the Sample Size Calculator?
Every survey, poll, or study has to answer one practical question before a single response is collected: how many people is enough? Survey too few and your results bounce around too much to be useful; survey too many and you waste time, money, and respondent goodwill on precision you did not need. Sample size calculation exists to answer that question with a number instead of a guess, and it is one of the most useful pieces of math in market research, UX research, political polling, quality control, and academic studies.
The formula behind this calculator is n = Z^2 * p(1-p) / E^2. Here n is the sample size you are solving for, Z is the critical value from the normal distribution that corresponds to your chosen confidence level (1.645 for 90%, 1.96 for 95%, and 2.576 for 99%), p is the expected proportion of respondents who will give a particular answer, and E is your desired margin of error, expressed as a decimal. Once n is computed, it is always rounded up (ceiling, not rounding to the nearest whole number), because a fractional respondent does not exist and rounding down would leave you slightly short of your stated precision.
The expected proportion p deserves special attention because it changes the required sample size more than people expect. The term p(1-p) is at its largest when p equals 0.5, which is why 50% is the default and the standard conservative choice: it produces the biggest possible sample size for a given confidence level and margin of error, so you are covered no matter how the real answers split. If you already have a strong prior belief about the outcome, for example you expect around 80% of users to prefer a feature, plugging in 80% instead of 50% will noticeably shrink the required sample size, because p(1-p) is much smaller at the extremes than in the middle.
Population size only matters when you are working from a small, known group. The base formula assumes an effectively infinite population, which is a fine assumption for national surveys, general online polls, or any study drawing from a pool of many thousands or more. But if you are surveying, say, the 400 employees at a company or the 1,200 members of an association, the finite population correction reduces the required sample size because you cannot oversample a population that small. Leave the population field blank for a large or unknown population, or enter the exact count for a small, defined one.
When to use it
- Planning a customer satisfaction survey and needing to know the minimum number of responses before results are statistically meaningful.
- Setting a target number of participants for a UX research study, A/B test, or product feedback survey.
- Determining sample size for academic or market research where a defensible, published methodology is required.
- Sizing a political poll or public opinion survey at a stated confidence level and margin of error.
- Calculating how many employees to survey out of a known company headcount using the finite population correction.
- Checking whether an existing dataset or completed survey already has enough respondents for a given margin of error.
How to use the Sample Size Calculator
- Choose your confidence level: 90%, 95%, or 99%. 95% is the standard choice for most surveys and research.
- Set your acceptable margin of error as a percentage. Smaller margins (like 3%) need larger samples than wider ones (like 10%).
- Enter the expected proportion. Leave it at 50% if you are unsure, since that gives the most conservative (largest) sample size.
- If you are surveying a known, limited group, enter the total population size to see the smaller, corrected sample size; otherwise leave it blank.
Formula & method
Worked examples
A researcher wants a survey accurate to within plus or minus 5 percentage points, at 95% confidence, with no prior knowledge of how responses will split (so p = 50%).
- Z = 1.96 for 95% confidence, E = 0.05, p = 0.5
- Compute p(1-p) = 0.5 x 0.5 = 0.25
- Compute Z^2 = 1.96 x 1.96 = 3.8416
- n = (3.8416 x 0.25) / (0.05^2) = 0.9604 / 0.0025 = 384.16
- Round up: required sample size = 385
Result: The survey needs at least 385 respondents to hit a margin of error of plus or minus 5% at 95% confidence.
An HR team wants to survey a company of exactly 1,000 employees with the same 95% confidence and 5% margin of error, using the finite population correction.
- Start from the base sample size for an infinite population: n = 385 (as in the first example)
- Population N = 1,000
- Apply the correction: nAdjusted = n / (1 + (n-1)/N) = 385 / (1 + 384/1000)
- nAdjusted = 385 / 1.384 = 278.18
- Round up: adjusted sample size = 279
Result: Because the population is a known 1,000 employees rather than an unlimited pool, only 279 responses are needed instead of 385, a reduction of 106 respondents.
Sample size needed at 95% confidence, p = 50%, by margin of error
| Margin of error | Required sample size |
|---|---|
| +/- 10% | 97 |
| +/- 5% | 385 |
| +/- 4% | 601 |
| +/- 3% | 1,068 |
| +/- 2% | 2,401 |
| +/- 1% | 9,604 |
Sample size needed at a 5% margin of error, p = 50%, by confidence level
| Confidence level | Z-score | Required sample size |
|---|---|---|
| 90% | 1.645 | 271 |
| 95% | 1.96 | 385 |
| 99% | 2.576 | 664 |
Common mistakes to avoid
- Using an overconfident expected proportion. Plugging in a proportion far from 50% without solid prior evidence undersizes the sample. If the real split turns out closer to even than assumed, the actual margin of error will be wider than intended. When in doubt, use 50% for the largest, safest sample size.
- Confusing margin of error with confidence level. The margin of error is how far the sample result might be from the true value (plus or minus a percentage). The confidence level is how often that claim holds true across repeated samples (such as 95% of the time). Raising the confidence level increases the required sample size at a fixed margin of error, it does not shrink it.
- Applying the finite population correction to a large population. For populations in the tens of thousands or more, the finite population correction barely changes the result and can safely be skipped. It only meaningfully reduces the required sample size when the sample is a large share of a small, known population, for example surveying 300 out of 1,000 people rather than 300 out of 1,000,000.
- Treating the calculated sample size as a guarantee of validity. Hitting the target sample size controls sampling error, but it does not fix a biased sample, leading survey questions, or low response rates. A random, well-designed sample of the right size is what actually produces a reliable result, not the number alone.
Glossary
- Sample size (n)
- The number of respondents or observations needed to estimate a population value within a stated margin of error and confidence level.
- Confidence level
- The percentage of the time the survey method would produce an interval containing the true population value, if repeated many times. Commonly 90%, 95%, or 99%.
- Margin of error (E)
- The plus-or-minus range around the survey result within which the true population value is expected to fall, at the chosen confidence level.
- Z-score
- The critical value from the standard normal distribution matching a confidence level: 1.645 for 90%, 1.96 for 95%, 2.576 for 99%.
- Expected proportion (p)
- The anticipated share of respondents who will select a given answer, expressed as a decimal between 0 and 1. Set to 0.5 for the most conservative, largest sample size.
- Finite population correction (FPC)
- An adjustment that reduces the required sample size when the population being sampled is small and known, rather than effectively unlimited.
Frequently asked questions
What sample size do I need for a survey?
It depends on your confidence level, margin of error, and expected proportion. At the common default of 95% confidence, a 5% margin of error, and a 50% expected proportion, you need 385 respondents. Tighter margins or higher confidence levels raise that number; a smaller known population lowers it.
How do you calculate sample size for a survey?
Use n = Z^2 * p(1-p) / E^2, then round up. Pick the Z-score for your confidence level, set p to your expected proportion (0.5 if unsure), and set E to your desired margin of error as a decimal. This calculator does the arithmetic and applies the finite population correction automatically if you enter a population size.
Why is 385 such a common sample size number?
It is the result of the sample size formula at the most widely used defaults: 95% confidence, a 5% margin of error, and a 50% expected proportion, which is the most conservative assumption. Because these three settings are so common in surveys, 385 shows up constantly as the recommended minimum for a general-population survey.
Does a bigger population always mean a bigger required sample size?
No. Once a population is large enough (roughly tens of thousands or more), further growth in population size has almost no effect on the required sample size, because the formula already treats it as effectively unlimited. The sample size is driven mainly by your margin of error and confidence level, not by how big the population is.
What is the finite population correction and when should I use it?
It is an adjustment, nAdjusted = n / (1 + (n-1)/N), that lowers the required sample size when your population N is small and known, such as a company, club, or defined customer list. Use it whenever your sample would represent a meaningful fraction of that group; skip it for large, general populations where it makes little difference.
Should I always use 50% for the expected proportion?
Use 50% whenever you do not have reliable prior data, since it produces the largest, most conservative sample size and protects you if the real answers split close to even. If you already have strong evidence the split will be lopsided, such as 80/20, entering that real proportion will reduce the required sample size accurately for that situation.