WorkedMathGlossary

Sample Size Calculator

Enter your confidence level and margin of error below to instantly get the minimum sample size you need.

How Sample Size Is Calculated

n = (z² × p × (1 − p)) / e², where z corresponds to your confidence level, p is the expected proportion (0.5 is the safest assumption when you don't know it, since it produces the largest, most conservative sample size), and e is your margin of error as a decimal.

Worked example

95% confidence, 5% margin of error, unknown population.

n = (1.96² × 0.5 × 0.5) / 0.05² = 0.9604 / 0.0025 ≈ 384.16

Round up to a whole number: 385 people needed.

Frequently Asked Questions

What is sample size, and why does it matter?

Sample size is how many people or items you need to survey or test to draw a reliable conclusion about a larger population. Too small a sample and your results could be off by a wide margin just from random chance; too large wastes time and money beyond what accuracy actually requires.

What is margin of error?

Margin of error is how much your sample's result might differ from the true value in the full population. A 5% margin of error on a 60% survey result means the true value is likely somewhere between 55% and 65%.

What is confidence level?

Confidence level is how sure you want to be that your margin of error actually contains the true value. A 95% confidence level means that if you repeated the survey many times, about 95% of those surveys would produce a result within the stated margin of error.

Why does population size matter if it's optional?

For a very large or unknown population, the population size barely affects the required sample size. For a small population (a school of 200 students, say), the finite population correction can meaningfully reduce how many people you actually need to survey.

Related Calculators

View all calculators →

Related Terms