Przejdź do treści
Liczbnik

Sample Size Calculator

Enter the confidence level (90%, 95% or 99%), expected proportion (p = 0.5 gives the largest sample for the worst case), and acceptable margin of error. The calculator returns the minimum number of respondents. Optionally provide the population size to apply the finite population correction and reduce the required sample.

Reviewed byRedakcja Liczbnik
Calculator
ResultSample size n385
z-value
1.96

How we calculate sample size

We apply the formula n = (z^2 * p * (1-p)) / e^2, where z is the critical value of the normal distribution for the chosen confidence level (90% -> 1.645; 95% -> 1.960; 99% -> 2.576), p is the expected proportion and e is the margin of error. The result is rounded up (Math.ceil). When population size N > 0 is provided, the finite population correction is applied: n_adj = n*N / (n+N-1).

Example: nationwide opinion poll

You want a survey with 95% confidence level, 5% margin of error and unknown response distribution (p = 0.5). Formula: n = (1.960^2 * 0.5 * 0.5) / 0.05^2 = 384.16 -> rounded up n = 385. If the population is 1,000 people, the finite correction reduces the sample to about 278 respondents.

Frequently asked questions

What is sample size?

Sample size (n) is the minimum number of respondents or observations needed for survey results to be representative of the entire population with a specified accuracy and confidence level. A larger sample reduces the margin of error but increases cost and time.

How does the sample size formula work?

The basic formula is n = (z^2 * p * (1-p)) / e^2, where z is the normal distribution quantile for the chosen confidence level, p is the expected proportion, and e is the acceptable margin of error. The result is rounded up to the nearest integer.

What is a confidence level and how do I choose one?

A 95% confidence level means that if the study were repeated many times, 95% of the resulting confidence intervals would contain the true population parameter. Social and market research typically uses 95%; scientific and medical research often requires 99%.

What does the margin of error mean?

The margin of error e is the maximum acceptable difference between the sample result and the true population parameter. For example, e = 0.05 means the result may differ by at most 5 percentage points from the true value. A smaller margin of error requires a larger sample.

What value of p should I use when the expected proportion is unknown?

When the expected proportion is unknown, use p = 0.5. This is the conservative worst-case scenario because p*(1-p) is maximised at 0.25, producing the largest possible sample size and ensuring adequate precision regardless of the true proportion.

What is the finite population correction?

The basic formula assumes an infinite population. When the population size N is known, apply the correction: n_adj = n*N / (n+N-1). This reduces the required sample size. The correction makes a significant difference when N is small relative to the uncorrected n.

Indicative result

Results are statistical estimates assuming simple random sampling. The calculator does not account for response rate, stratification or other methodological factors. For scientific research, consult a statistician.
  • Z-Score Calculator

    Calculate the z-score (standardized value) and its corresponding percentile in the normal distribution. Enter the value, mean and standard deviation — instant result.

    Statistics
  • Confidence Interval Calculator

    Calculate the confidence interval for a mean or proportion. Choose 90%, 95% or 99% confidence level, enter sample mean, standard deviation and sample size — instant result.

    Statistics