Statistics

Sample Size Calculator

Required sample size. Fast, accurate, and completely free.

Favorites

Recent Tools

Use 50% for maximum sample size (worst case / unknown).
Enter for finite population correction (FPC).
Results
Required Sample Size
Without FPC (n₀)
With FPC (n)
Z-Value
Confidence Level

Step-by-Step Calculation

Mathematical Formula

n_0 = \frac{Z^2 \cdot p(1-p)}{E^2} \quad n = \frac{n_0}{1 + \frac{n_0 - 1}{N}}

n₀ = Sample size (infinite population)

n = Adjusted sample size (finite population correction)

Z = Z-value for chosen confidence level

p = Population proportion (as decimal)

E = Margin of error (as decimal)

N = Total population size

How to Use this Calculator

  1. Select your desired Confidence Level (90%, 95%, or 99%).

  2. Enter the acceptable Margin of Error as a percentage (e.g., 5%).

  3. Enter the estimated Population Proportion (use 50% if unknown for maximum sample size).

  4. Optionally enter the total Population Size for finite population correction.

  5. Click Calculate to see the required sample size with step-by-step formulas.

How to Determine the Right Sample Size

Sample size determination is one of the most critical steps in designing a survey, experiment, or research study. An insufficient sample size leads to results with wide confidence intervals and low statistical power, while an unnecessarily large sample wastes resources. This calculator helps you find the optimal balance.

The Core Formula

For estimating a population proportion (e.g., the percentage of customers who prefer a product), the required sample size for an infinite population is: n₀ = Z² × p(1−p) / E², where Z is the z-value corresponding to the desired confidence level, p is the expected proportion, and E is the margin of error. This formula is derived from the normal approximation to the binomial distribution.

Confidence Level and Z-Values

The confidence level represents how certain you want to be that the true population parameter falls within your margin of error. Common choices are 90% (Z = 1.645), 95% (Z = 1.96), and 99% (Z = 2.576). A higher confidence level requires a larger sample. The 95% confidence level is the most widely used standard in research.

Margin of Error

The margin of error (E) is the maximum acceptable difference between your sample estimate and the true population value. A ±5% margin of error means that if your survey finds 60% approval, the true value is likely between 55% and 65%. Halving the margin of error requires approximately quadrupling the sample size.

Population Proportion

If you have no prior estimate of the population proportion, use 50% (p = 0.5), which maximizes the product p(1−p) and gives the largest (most conservative) sample size. If prior research or pilot studies suggest the proportion is far from 50%, using that estimate will reduce the required sample.

Finite Population Correction (FPC)

When sampling from a small, finite population (e.g., all employees of a company), the standard formula overestimates the required sample size. The finite population correction adjusts for this: n = n₀ / (1 + (n₀ − 1)/N). This correction becomes significant when the sample is more than about 5% of the population.

Practical Considerations

Always increase your calculated sample size to account for expected non-response. If you anticipate a 30% response rate, divide the required sample by 0.30. Also consider stratification, clustering effects (design effect), and the specific statistical tests you plan to perform, as more complex analyses may require larger samples.

Frequently Asked Questions (FAQ)

Why is 50% the recommended population proportion?

A proportion of 50% maximizes the product p(1−p), giving the largest possible sample size. This is the most conservative (safe) choice when you don't have prior information about the true proportion.

When should I use finite population correction?

Apply FPC when your target population is known and finite, and the calculated sample size is more than about 5% of the population. For very large populations, FPC has negligible effect.

What confidence level should I use?

The 95% confidence level is standard in most fields. Use 99% for high-stakes decisions (medical, safety) and 90% when resources are limited and slightly lower precision is acceptable.

How does margin of error affect sample size?

Sample size is inversely proportional to the square of the margin of error. Reducing the margin from 5% to 2.5% quadruples the required sample size.

Does this calculator work for means (not proportions)?

This calculator is designed for proportions. For sample size based on means, you would need to know or estimate the population standard deviation and use a different formula: n = (Z × σ / E)².

Explore more tools you might find useful