Sample Size Calculator

Determine the required sample size for surveys and research. Enter confidence level, margin of error, and population proportion to get the number you need.

Determine how many survey respondents or study participants you need for statistically valid results. Enter your desired confidence level, margin of error, and expected proportion to get the required sample size with step-by-step formula working.

Ad
Ad

About Sample Size Calculator

The Sample Size Formula

The calculator uses Cochran's formula from Sampling Techniques (3rd edition, 1977), the standard reference cited across peer-reviewed survey research. For estimating a population proportion:

n = (z² × p × (1-p)) / E²

where z is the critical value for your confidence level, p is the expected proportion, and E is the desired margin of error.

Worked example: You want to survey customer satisfaction with 95% confidence and ±5% margin of error. You expect about 60% satisfaction.

  1. z for 95% = 1.960
  2. p = 0.60, so p(1-p) = 0.60 × 0.40 = 0.24
  3. E = 0.05
  4. n = (1.960² × 0.24) / 0.05² = (3.8416 × 0.24) / 0.0025 = 0.922 / 0.0025 = 369
  5. You need 369 respondents

Finite Population Correction

When sampling from a known population, you may need fewer responses:

n_adj = n / (1 + (n-1)/N)

where N is the total population and n is the uncorrected sample size.

Example: From the 369 above, if your total customer base is 2,000:

  • n_adj = 369 / (1 + 368/2000) = 369 / 1.184 = 312
  • You only need 312 respondents instead of 369

The correction matters most when the sample is more than 5% of the population. For very large populations (over 100,000), the correction has negligible effect.

Sample Size by Confidence Level and Margin of Error

Using p = 0.50 (most conservative, infinite population):

Margin of Error90% Confidence95% Confidence99% Confidence
±1%6,7659,60416,587
±2%1,6912,4014,147
±3%7521,0681,843
±5%271385664
±10%6897166

Why Use p = 0.50 When Unsure?

The value p(1-p) is maximised when p = 0.50 (giving 0.25). Any other proportion gives a smaller product:

Expected Proportion (p)p × (1-p)Sample Size (95%, ±5%)
0.500.2500385
0.40 or 0.600.2400369
0.30 or 0.700.2100323
0.20 or 0.800.1600246
0.10 or 0.900.0900139

Using 0.50 guarantees your sample is large enough regardless of the actual proportion. If you have a reasonable prior estimate, using it will reduce the required sample size.

How Inputs Affect Sample Size

ChangeEffect on Sample SizeWhy
Increase confidence (95% → 99%)Increases (~1.7×)Higher z-value needs more data
Decrease confidence (95% → 90%)Decreases (~0.7×)Lower z-value needs less data
Halve margin of error (5% → 2.5%)Quadruples (~4×)E is squared in denominator
Double margin of error (5% → 10%)Quarters (~0.25×)Larger E means less precision needed
p closer to 0.50IncreasesMore variance, more data needed
p closer to 0 or 1DecreasesLess variance, fewer observations needed

Sample Size for Means

When estimating a population mean instead of a proportion:

n = (z × σ / E)²

where σ is the population standard deviation and E is the desired margin of error in the same units.

Example: Estimate average delivery time with 95% confidence, ±2 minutes, σ estimated at 8 minutes:

  • n = (1.96 × 8 / 2)² = (7.84)² = 61.5, round up to 62

Practical Considerations

  • Response rate: If you expect a 30% response rate, invite 385/0.30 = 1,284 people to get 385 responses
  • Subgroup analysis: If you plan to analyse subgroups separately, each subgroup needs its own adequate sample size
  • Budget constraints: Increasing margin of error from 3% to 5% cuts sample size by 64% - a practical tradeoff
  • Pilot studies: Run a small pilot (30-50 respondents) to estimate proportion and standard deviation before the full study

After collecting your data, the confidence interval calculator computes the actual interval from your results. For hypothesis testing, the p-value calculator determines statistical significance.

What Is a Good Response Rate in 2026?

For external online and email surveys, 20-30% is the respectable band reported across 2025-2026 benchmarks, with anything above 30% placing you in the top quartile for most B2C sectors. Email-only surveys typically fall between 15% and 25%, while NPS follow-ups sent by email cluster around 12-15%. In-app and SMS prompts routinely outperform email, and B2B SaaS benchmarks sit lower, with 22% already beating roughly three-quarters of peers.

Factor the response rate into your invitation list. If you need 385 completed responses and expect a 25% response rate, you must invite 385 / 0.25 = 1,540 people. Sending too few invitations is the single most common reason surveys fail to hit their target sample, especially in cold-email outreach and customer panels where disengaged members inflate your list without ever responding.

Sample Size for Means vs Proportions

The choice of formula depends on what you are measuring. Proportions (yes/no, satisfied/not satisfied, clicked/did not click) use Cochran's formula above. Means (average spend, average weight, average response time) use the standard-deviation version n = (z × σ / E)². A third class of design, comparing two groups in A/B testing or clinical trials, uses power analysis rather than this calculator - the p-value calculator and the standard deviation calculator cover the inputs you need to plan those studies.

Research QuestionFormulaKey Input Needed
% of voters who prefer candidate An = z²p(1-p)/E²Prior estimate of p (use 0.5 if unsure)
Average customer satisfaction scoren = (zσ/E)²Estimated standard deviation
A/B test on conversion ratePower analysisBaseline rate, minimum detectable effect, power (usually 80%)
Rare event detectionn = z²p(1-p)/E²Very small p requires enormous n

Common Mistakes That Waste Budget

  • Confusing margin of error with confidence level. A 95% confidence level with ±5% margin means you are 95% confident the true value lies within ±5 percentage points of your sample estimate. It does NOT mean 95% of respondents agree.
  • Using a percentage margin instead of an absolute margin. If your expected proportion is 10% and you set the margin to "10%", the calculator interprets that as ±10 percentage points (i.e. between 0% and 20%). For tight precision on rare outcomes, set E in absolute terms (e.g. ±1 percentage point), which dramatically increases n.
  • Ignoring design effect in clustered samples. If you are sampling classrooms, clinics, or households rather than individuals, multiply the calculated n by the design effect (typically 1.5 to 3) to account for within-cluster correlation.
  • Planning for the whole sample but analysing subgroups. If your survey compares men and women, each group needs its own adequate sample. Budgeting 385 total respondents means 193 per group, roughly halving your precision on subgroup estimates.
  • Treating the finite population correction as optional. For populations under 10,000, the correction can cut required sample sizes by 20-50%. Skipping it wastes survey budget; misapplying it (e.g. using total customer count when you only sample active customers) understates the required n.

Invitations, Completions, and the Oversampling Arithmetic

Invite roughly sample-size / expected-response-rate people to hit your target completions. A polished invitation pipeline plans for partial completions and disqualifications on top of that baseline. Screen-out rates of 10-30% are normal in consumer panel work, and partial completion (respondents abandoning mid-survey) runs 15-25% for surveys over ten minutes long.

Target CompletionsResponse RatePartial/Screen-out LossInvitations Required
38530%10%1,426
38520%15%2,265
38510%20%4,813
1,06815%15%8,376

The arithmetic is: invitations = n / (response_rate × (1 - loss_rate)). Missing this step is the single biggest cause of surveys re-running with a second invitation wave, which damages the representativeness of the final sample.

Regulatory and Clinical Contexts

For clinical trials and medical device studies, sample size calculation is governed by the FDA's Statistical Guidance for Clinical Trials and ICH E9, which require formal power analysis beyond the proportion formula above. The NIST/SEMATECH e-Handbook of Statistical Methods publishes the standard reference tables used across US regulatory and industrial research. For consumer surveys, UK and US market research bodies (MRS and Insights Association) treat margins above ±5% at 95% confidence as the minimum defensible standard for public reporting, and most published political polling reports a margin of ±3% at 95% confidence, corresponding to roughly 1,068 respondents with p = 0.5.

When to Use 95% vs 99% Confidence

95% confidence is the default across market research, political polling, and customer experience work because it balances precision and cost. Moving to 99% increases required sample size by roughly 70% while only narrowing the margin of error modestly. Use 99% only where the cost of being wrong is severe: clinical trials, regulatory submissions, and high-stakes product safety studies. Drop to 90% for internal exploratory research, low-stakes UX tests, and pilot studies where speed matters more than publishable precision. The z-score calculator shows the underlying critical values for any confidence level.

Sources

All calculations run in your browser. No data is sent to any server.

Frequently Asked Questions

How do I determine sample size for a survey?

You need three things: your desired confidence level (usually 95%), acceptable margin of error (usually 5%), and an estimate of the population proportion (use 50% if unsure). Enter these into the calculator and it gives the required number of respondents.

Why use 50% for population proportion when unsure?

50% gives the maximum possible variance (p times 1-p is largest at 0.5), so it produces the largest required sample size. This is conservative - your actual required sample size will be the same or smaller.

What is the finite population correction?

When your population is small, you don't need as large a sample. The finite population correction adjusts the sample size downward based on the total population. It matters most when the sample is more than about 5% of the population.

How does confidence level affect sample size?

Higher confidence requires larger samples. Going from 95% to 99% confidence roughly doubles the required sample size. Going from 95% to 90% reduces it by about 30%.

How does margin of error affect sample size?

Halving the margin of error quadruples the required sample size because the margin of error is squared in the formula. Going from 5% to 2.5% margin of error means you need about 4 times as many respondents.

Link to this tool

Copy this HTML to link to this tool from your website or blog.

<a href="https://toolboxkit.io/tools/sample-size-calculator/" title="Sample Size Calculator - Free Online Tool">Try Sample Size Calculator on ToolboxKit.io</a>