Sample Size Calculator

Calculate required sample size for surveys from population, confidence level, and margin of error.

By Konstantin Iakovlev · Updated September 2026 · Source: Khan Academy

%
%

Required Sample

370

Infinite Pop.

385

Parameters

Sample Size (finite pop.)370
Sample Size (infinite pop.)385
Z-value1.960
Margin of Error5.0%
Proportion50.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.

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. 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. 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. 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. 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 · Last updated: September 2026

Frequently Asked Questions

How many survey responses do I need?
For a very large population at 95% confidence, a 5% margin of error and p = 0.5, you need 385 responses; for a 3% margin, 1,068. Smaller populations need fewer: with 10,000 people the finite population correction brings these to 370 and 965.
What affects required sample size?
Three factors: confidence level (higher = larger sample), margin of error (smaller = larger sample), and population variability (more variable = larger sample). Doubling precision quadruples the required sample size.
What is a good margin of error for a survey?
There is no fixed standard; it is a trade-off between precision and cost, because halving the margin roughly quadruples the sample. For a large population at 95% confidence and p = 0.5, a ±3% margin takes 1,068 responses, ±5% takes 385 and ±10% only 97.