Sample Size Calculator
Free sample size calculator: find how many survey respondents or observations you need for a given confidence level and margin of error, with the finite-population correction and every formula step shown.
You need 385 respondents
Sample size, step by step
z for 95% confidence = 1.96.
n = z² × p × (1 − p) / E² = 1.96² × 0.5 × 0.5 / 0.05² = 385.
What sample size means
Sample size is the number of respondents or observations a survey or study needs to estimate a population value — a proportion (like "60% of customers prefer X") or a mean (like "average order value is $42") — within a stated margin of error, at a stated confidence level. Too small a sample and your estimate could be far off; too large and you have spent more time and money than the extra precision was worth. This calculator computes the minimum sample size for either case and shows the formula with your numbers plugged in.
Proportion vs. mean
Estimating a proportion (a percentage, like "what share of visitors convert") uses Cochran's formula and needs an expected proportion — use 50% if you have no prior estimate, since it is the most conservative choice and gives the largest required sample. Estimating a mean (an average, like "average time on page") instead needs an estimated standard deviation for the thing you are measuring; if you have raw data to compute that from, the standard deviation calculator will get it for you. Both modes need a confidence level (how sure you want to be — 95% is standard) and a margin of error (how much wiggle room you will accept in the final estimate — smaller margins need dramatically larger samples, since required sample size grows with the square of 1/margin).
Worked example
Say you want to estimate what share of your customers prefer a new feature, with 95% confidence and a margin of error of ±5 percentage points, and you have no prior estimate of the true proportion (so use the conservative 50%). The 95% confidence z-value is 1.96. Sample size = 1.96² × 0.5 × (1 − 0.5) / 0.05² = 3.8416 × 0.25 / 0.0025 = 384.16, rounded up to 385 respondents. If you know your customer base is only 1,000 people, the finite-population correction brings that down to 278 — you need fewer respondents when you are sampling a known, smaller population.
The finite-population correction
The finite-population correction adjusts the sample size down when you are sampling from a known, limited population rather than an effectively infinite one (the general public, all possible transactions, and so on). Without it, the formula assumes there is no upper limit on how many people you could sample; with a population size entered, the correction accounts for the fact that sampling a larger share of a small population buys you more certainty per respondent. Leave the population size blank if your population is unknown or very large — the calculator uses the standard infinite-population formula.
How to use it
- Choose whether you are estimating a proportion (a percentage) or a mean (an average).
- Set your confidence level (95% is standard) and the margin of error you will accept.
- For a proportion, enter an expected proportion if you have one (50% is the safe default). For a mean, enter an estimated standard deviation.
- Optionally enter a population size if you are sampling from a known, limited group — leave it blank otherwise.
- Read the required sample size and the step-by-step working, and download the sensitivity chart or a CSV report of the calculation.
FAQ
- How many survey responses do I need?
- It depends on your confidence level, margin of error, and (for a proportion) your expected split. A common baseline — 95% confidence, ±5% margin, no prior estimate — needs 385 respondents from a large or unknown population. Enter your own numbers above for an exact answer.
- What sample size do I need for 95% confidence?
- 95% confidence alone does not determine sample size — you also need a margin of error and, for a proportion, an expected split. At 95% confidence with a ±5% margin and an unknown proportion (use 50%), you need 385 respondents; a tighter ±3% margin needs 1,068.
- What does margin of error mean?
- Margin of error is how far your sample estimate might be from the true population value, in either direction, at your chosen confidence level. A margin of error of ±5% on an estimate of 60% means the true value is likely between 55% and 65%. Smaller margins require larger samples — cutting the margin in half roughly quadruples the required sample size.
- Do I need to adjust for a small population?
- Only if you know your total population is small and finite — for example, surveying all 500 employees at a company, not the general public. Enter that number as the population size and the calculator applies the finite-population correction, which lowers the required sample size. Leave it blank for an unknown or effectively unlimited population.