Sample Size Calculator (Proportion)

Sample Size Calculator (Proportion)

Emerging AI Skill PRO

Enter Calculation

Formula

n=⌈Z2·p(1−p)e2⌉n = \left\lceil \frac{\text{Z}^{2} \cdot \text{p}\,(1 - \text{p})}{\text{e}^{2}} \right\rceil
Usage stats

Advertisement

Results

Required Sample Size
385
respondents (rounded up)
Unrounded sample size 384.16

Report an error on this page

What it is

This calculator estimates the minimum number of survey respondents you need to estimate a population proportion within a chosen margin of error and confidence level. It is the standard formula used in market research, polling, and clinical surveys when the outcome is a percentage (e.g. "what share of people say yes").

How to use it

Pick your confidence level (90%, 95%, or 99%), enter the expected proportion as a percentage, and enter your desired margin of error as a percentage. If you have no prior estimate of the proportion, use 50% — this is the most conservative value and yields the largest required sample.

The formula explained

The sample size is $$n = \left\lceil \frac{\text{Z}^{2} \cdot \text{p}\,(1 - \text{p})}{\text{e}^{2}} \right\rceil$$ Here \(z\) is the standard normal critical value (1.645 for 90%, 1.96 for 95%, 2.576 for 99%), \(p\) is the expected proportion as a decimal, and \(E\) is the margin of error as a decimal. Because a sample must be a whole number, the result is rounded up.

Advertisement
Bell curve with two shaded tails marking critical z-values for a confidence level
The z-score corresponds to the chosen confidence level, marking the tails of the normal distribution.

Worked example

For 99% confidence (\(z = 2.576\)), \(p = 30\%\) (0.30), and \(E = 4\%\) (0.04): $$n = 2.576^{2} \times 0.30 \times 0.70 / 0.04^{2} = 6.635776 \times 0.21 / 0.0016 = 1.39351296 / 0.0016 \approx 870.95$$ Rounded up, you need 871 respondents.

Advertisement
Point estimate with symmetric error bars showing the margin of error E on each side
The margin of error E sets how far the estimate may stray from the true proportion.

Key Terms: Confidence Level, Margin of Error, and Z-Score

Confidence level
How often the sampling procedure would produce an interval that contains the true population value if the survey were repeated many times (for example, 95% of the time). It describes the long-run reliability of the method, not the probability that one particular interval contains the true value. Once computed, a given interval either contains the true value or it does not.
Margin of error (E)
The half-width of the confidence interval, expressed in the same units as the proportion. A margin of ±3% means the estimate is reported as the sample proportion plus or minus 3 percentage points. In the calculator, enter it as a decimal (0.03 for 3%).
Critical z-value (z)
The number of standard deviations of the standard normal distribution that matches the chosen confidence level (two-sided): 1.645 for 90%, 1.96 for 95%, and 2.576 for 99%.
Expected proportion (p)
Your prior estimate of the share of the population with the trait of interest, entered as a decimal. When it is unknown, use 0.5, which maximizes p(1−p) and gives the safest (largest) sample size.
Finite population correction
An adjustment used when the sample is a sizable fraction of a small population (commonly above about 5%). The adjusted size is \(n_{adj} = \dfrac{n}{1 + (n-1)/N}\), where N is the population size. The basic formula here assumes a very large or infinite population and does not apply this correction.
Sample size (n)
The number of completed responses needed to meet the chosen confidence level and margin of error. It is always rounded up to the next whole number. Plan for non-response by inviting more people than n.

FAQ

Why use 50% if I don't know the proportion? \(p(1-p)\) is largest at \(p = 0.5\), so it gives the safest (largest) sample size.

Does this account for population size? No — this is the infinite-population formula. For small populations apply a finite population correction.

What is the margin of error? It is the ± range around your estimate at the chosen confidence level.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators