AbraCalc

Sample Size Calculator

Calculate the required sample size for estimating a population proportion.

Embed this tool on your site
Cite this tool

APA

AbraCalc. (2026). Sample Size Calculator [Online calculator]. Retrieved from https://abracalc.com/calculator/sample-size-calculator/

BibTeX

@misc{abracalc-sample-size-calculator, author = {AbraCalc}, title = {Sample Size Calculator}, year = {2026}, howpublished = {\url{https://abracalc.com/calculator/sample-size-calculator/}} }

Did this tool answer your question?

How to use this tool

  1. Enter expected proportion (p), z* (confidence level) and margin of error (e) in the fields above.
  2. Results update instantly as you type — or click Calculate.
  3. Read your required sample size (n) and the full breakdown beneath it.

Calculate the minimum sample size needed: n = (z*² × p × (1−p)) / e². Always round up to the next whole number.

Formula

Required sample size: n = ⌈ (z2 × p × (1 − p)) / e2

Where z is the critical value for the chosen confidence level, p is the expected proportion, and e is the desired margin of error. The result is rounded up to the nearest whole number.

How it works

This calculator uses the standard formula for estimating a population proportion, computing the minimum number of survey respondents needed so that the margin of error does not exceed the specified value at the chosen confidence level.

The formula assumes simple random sampling, an infinite (or very large) population, and that the true proportion is approximately p. When the population is small, a finite-population correction should be applied separately.

Worked example

  1. Inputs: expected proportion p = 0.5, confidence level z* = 1.96 (95%), margin of error e = 0.05.
  2. Compute the numerator: z² × p × (1 − p) = 1.96² × 0.5 × 0.5 = 3.8416 × 0.25 = 0.9604.
  3. Compute the denominator: e² = 0.05² = 0.0025.
  4. Divide: 0.9604 ÷ 0.0025 = 384.16.
  5. Round up to the nearest whole number: ⌈384.16⌉ = 385.

Required sample size n = 385

Common mistakes to avoid

  • Using p = 0.5 (maximum variance) when prior research suggests a different proportion. While conservative, it inflates the required sample size and wastes resources.
  • Confusing margin of error as a percentage point with as a proportion. A desired margin of 3% must be entered as e = 0.03, not 3.
  • Forgetting to apply a finite population correction when sampling from a small population. Without the correction the formula overestimates the needed sample size.

Key terms

Margin of error (e)
The maximum acceptable difference between the sample estimate and the true population value, expressed as a proportion (e.g., 0.05 for ±5%).
Confidence level
The probability that the true population proportion falls within the margin of error. Common levels are 90%, 95%, and 99%, corresponding to z* values of 1.645, 1.96, and 2.576.
Z* (critical value)
The number of standard deviations from the mean that corresponds to the chosen confidence level in a standard normal distribution.
Population proportion (p)
The expected fraction of the population that holds a given characteristic. Using p = 0.5 yields the most conservative (largest) sample size estimate.
Simple random sampling
A sampling method where every member of the population has an equal chance of being selected, which is the assumption underlying this formula.

Frequently asked questions

Why use p = 0.5 when the proportion is unknown?
p × (1−p) is maximised at p = 0.5, giving the most conservative (largest) required sample size. If you have a prior estimate of p, use it to get a smaller required n.

References & sources