ES EN FR PT DE IT

Sample Size Calculator

Sample Size Calculator. Free online calculator with formula, examples and step-by-step guide.

The Sample Size Calculator is a free statistics calculator. Sample Size Calculator. Free online calculator with formula, examples and step-by-step guide. Analyze your data instantly with precise statistical formulas.
Inputs
Result
Enter values and press Calculate

Sample Size Calculator: Determine Your Survey Size

The sample size calculator determines how many respondents you need in a survey or study to achieve a desired level of statistical precision. It balances confidence level, margin of error, and population proportion so you can collect data that is both reliable and cost-effective.

Sample Size Formula

n = Z² × p(1 − p) / e²

Where:

  • n = required sample size
  • Z = Z-score corresponding to the desired confidence level (1.96 for 95%, 2.576 for 99%)
  • p = estimated proportion of the population (use 0.5 when unknown for maximum sample size)
  • e = desired margin of error expressed as a decimal (e.g., 0.05 for ±5%)

This formula, known as Cochran's formula, assumes an infinite or very large population. When your population is small, apply the finite population correction: nadjusted = n / (1 + (n − 1) / N), where N is the total population size.

Worked Examples

Example 1: Customer Satisfaction Survey

A retail company wants to measure customer satisfaction with a 95% confidence level and a ±5% margin of error. They have no prior estimate of the satisfaction proportion, so they use p = 0.5.

Calculation: n = 1.96² × 0.5(1 − 0.5) / 0.05² = 3.8416 × 0.25 / 0.0025 = 0.9604 / 0.0025 = 384.16 → 385 respondents

The company needs at least 385 completed surveys to achieve the desired precision.

Example 2: Political Polling with Small Population

A university with 2,000 students wants to poll student opinion with 99% confidence and a ±3% margin of error. Using p = 0.5 for maximum variability:

Step 1 — Initial size: n = 2.576² × 0.5(1 − 0.5) / 0.03² = 6.6358 × 0.25 / 0.0009 = 1.6589 / 0.0009 = 1,843

Step 2 — Finite population correction: nadj = 1,843 / (1 + (1,843 − 1) / 2,000) = 1,843 / (1 + 0.921) = 1,843 / 1.921 = 959 respondents

After correction, only 959 students need to be surveyed instead of 1,843.

Common Uses

  • Designing market research surveys with known statistical precision
  • Planning academic research studies and thesis data collection
  • Determining sample sizes for quality control inspections in manufacturing
  • Setting respondent targets for political polling and public opinion research
  • Calculating participant numbers for clinical trials and medical studies
  • Sizing employee engagement surveys in human resources departments

Common Mistakes

  • Using p = 0.5 when you have reliable prior data, which inflates the sample size unnecessarily
  • Forgetting the finite population correction when surveying a small, defined group
  • Confusing margin of error (e) with confidence level — they are independent parameters
  • Ignoring non-response rates and collecting exactly n responses instead of oversampling to account for dropouts

Pro Tip

Always oversample by 15–30% above your calculated sample size to account for non-responses, incomplete surveys, and data quality exclusions. If you need 385 responses, aim to invite 500–550 people. This buffer ensures you still meet your statistical requirements after attrition.

Frequently Asked Questions

The product p(1 − p) reaches its maximum value of 0.25 when p = 0.5. Using this value gives the largest possible sample size, ensuring your study is adequately powered regardless of the true proportion.

95% confidence (Z = 1.96) is the standard for most social science and market research. Use 99% (Z = 2.576) for high-stakes studies like medical research or regulatory compliance where errors are costly.

Not necessarily. Beyond a certain point, increasing sample size yields diminishing returns in precision. A sample of 1,000 gives a ±3.1% margin of error, while 4,000 only improves it to ±1.5%. Balance precision with budget and time constraints.

Apply the correction when your initial sample size exceeds 5% of the total population (n/N > 0.05). For large populations (e.g., national surveys), the correction has negligible effect and can be skipped.

Written and reviewed by the CalcToWork editorial team. Last updated: 2026-04-29.

Frequently Asked Questions

The mean is the sum of all values divided by the count. The median is the middle value when data is sorted. The median is more resistant to outliers.
It measures how spread out data is from the mean. A low standard deviation means data clusters close to the mean; a high one means greater spread.
Probability = favorable outcomes / total outcomes. The result is between 0 (impossible) and 1 (certain). Multiplied by 100 gives the percentage.