Sample Size Calculator
Calculate required sample size for surveys from population, confidence level, and margin of error.
By Konstantin Iakovlev · Updated December 2026 · Source: Khan Academy — Determining sample size from confidence and margin of error · Methodology
Required Sample
370
Infinite Pop.
385
Parameters
| Sample Size (finite pop.) | 370 |
| Sample Size (infinite pop.) | 385 |
| Z-value | 1.960 |
| Margin of Error | 5.0% |
| Proportion | 50.0% |
Use the Sample Size Calculator above to calculate your results. Enter your values and see instant results — all calculations run in your browser.
Disclaimer: This calculator is for informational purposes only. Results are estimates based on the information you provide and the assumptions described on this page.
You might also need
Permutation & Combination Calculator
Calculate permutations P(n,r) and combinations C(n,r) with factorial breakdown.
Square Root Calculator
Calculate square root, cube root, and nth root of any number.
Z-Score Calculator
Calculate z-score, percentile, and probability from a value, mean, and standard deviation.
How It Works
Before fielding a survey, you need to know how many responses will make the results trustworthy rather than noise. The right sample size lets your findings stand in for the whole target population with a known degree of confidence. Getting that number right is what separates a defensible conclusion from a guess.
For a population proportion that you cannot pin down in advance, the working formula is n = (Z² × p × (1-p)) / E². Here n is the sample size you are solving for, Z is the Z-score tied to your chosen confidence level, p is the estimated population proportion, and E is the margin of error you are willing to accept. Analysts frequently set p at 0.5, because that value assumes maximum variability and therefore yields the most conservative, safest sample size. When the population is finite, the calculator applies the finite population correction n = n0 / (1 + (n0 − 1) / N), where n0 is the result of the formula above and N is the population size, and rounds up; it shows both figures, for your population and for an unlimited one.
One assumption worth dropping is that a bigger population always demands a proportionally bigger sample. Past a certain threshold the required size levels off and barely moves, no matter how large the population grows. Your confidence level and margin of error do the real work: tightening either one, by demanding more confidence or a narrower margin, pushes the sample higher and drives up the cost and time the survey will take.
Example: Surveying 500,000 Business Customers
- 1 A company wants to survey its 500,000 business customers about a new product feature, with 95% confidence and a ±3% margin of error. It has no earlier estimate of the share who use the feature, so it leaves the proportion at 50%.
- 2 Enter Population Size = 500,000, Confidence Level = 95%, Margin of Error = 3 and Proportion = 50. Base size: n0 = 1.96² × 0.5 × 0.5 / 0.03² = 3.8416 × 0.25 / 0.0009 = 1,067.11, shown rounded up as 1,068 under Infinite Pop.
- 3 Finite population correction: 1,067.11 / (1 + 1,066.11 / 500,000) = 1,067.11 / 1.00213 = 1,064.84, rounded up to 1,065, the Required Sample.
- 4 So 1,065 completed responses give a ±3% margin at 95% confidence. The population is so much larger than the sample that the correction saves only three responses; with 10,000 customers the same settings need 965. The margin covers sampling error only, not bias from customers who choose not to answer.
Source: Khan Academy — Determining sample size from confidence and margin of error · Last updated: December 2026