Sample Size Calculator for Surveys & Studies

Statistics, survey and study planning tool

Estimate the sample needed for a survey, a mean, two proportions or two means. The calculator separates completed observations from invitations or enrollment, applies an optional finite population correction, and shows every planning assumption.

Last Updated: July 27, 2026
  • Four planning modes
  • Finite population correction
  • Design effect and nonresponse
  • Power and sensitivity table

Sample Size Calculator with Formula and Steps

Select the result you plan to estimate or compare. Enter assumptions on their stated scales, then review the rounded target, recruitment plan, formula and sensitivity analysis.

Runs in your browser

Set the planning goal

The correct formula depends on whether you need precision around one estimate or power for a difference between two independent groups.

Survey or single proportion

Use 50 when no prior estimate is available.
Leave blank for a large or unknown population.
Use percentage points for proportion margins and differences. Design effect is a variance multiplier. A value of 1 represents simple random sampling. Recruitment adjustment changes how many people you approach, not the completed sample required for analysis.
Completed survey responses
370 completed responses

Plan to invite 463 people at an expected response rate of 80%.

Base sample384.1459
After correction369.9706
Critical value1.959964
Achieved precision4.9998%

Sample size by margin of error

Survey sensitivity
Survey sample size sensitivity A line chart comparing required completed responses across margins of error.

Smaller margins require larger samples when other assumptions stay fixed.

Planning breakdown

Stage Calculated value Rounded target Meaning

Margin of error sensitivity

Each row changes one precision input while keeping the other assumptions fixed.

Margin Completed sample Invitations Change from target

Calculation steps

  1. Enter valid planning assumptions and select Calculate sample size.

Recent calculations

Your six latest calculations appear here for this page session.

How to Use This Sample Size Calculator

  1. Select one proportion, one mean, two proportions or two means.
  2. For one estimate, enter the confidence level and desired margin of error. Add a finite population only when sampling without replacement from a known group.
  3. For two groups, enter the values you expect under the alternative, the significance level, target power, test direction and allocation ratio.
  4. Set the design effect when your sampling plan changes variance relative to simple random sampling.
  5. Enter the expected response or completion rate. This produces the number to invite or enroll.
  6. Select Calculate sample size. Review the rounded targets, warning, substituted steps and sensitivity table.

Always round a minimum sample size up. A continuous result of 369.1 requires 370 completed observations, not 369. Keep the completed sample and the recruitment target separate. Nonresponse does not reduce the statistical sample you need. It increases how many people you must approach to obtain that sample.

What Does Sample Size Mean?

Sample size is the number of usable, independent observations included in an analysis. It is not a universal quality score. The required number depends on the estimand, analysis method, precision, confidence level, expected variation, study design, population and practical loss between invitation and completion.

A larger sample usually reduces random sampling error, but it does not remove selection bias, measurement error, missing-data bias or a poor sampling frame. A representative probability sample of 500 can support a stronger population estimate than a much larger convenience sample. Planning must address both quantity and how observations are selected.

Survey Sample Size Formula for One Proportion

For a large population under simple random sampling, the normal-approximation planning formula is:

n0 = z2p(1 − p) ÷ e2

Here, z is the two-sided critical value for the confidence level, p is the expected proportion as a decimal, and e is the desired half-width of the confidence interval. At 95% confidence, z is about 1.96. A five-percentage-point margin means e = 0.05.

When no defensible prior estimate exists, p = 0.50 is a conservative choice because p(1 - p) is largest at 0.50. It creates the largest sample under this formula. If the target proportion is rare, the normal approximation and symmetric margin may be unsuitable. Use a method designed for rare events or exact binomial precision.

Finite Population Correction

Sampling without replacement from a known finite population reduces uncertainty when the sampling fraction is material. After applying design effect to the large-population requirement, this calculator uses:

n = Nnd ÷ (N + nd − 1)

N is the population size and nd is the design-adjusted large-population sample. For a population of 10,000, 95% confidence, 5% margin, p = 0.50 and design effect 1, the uncorrected result is 384.15. The finite-population result is 369.97, so the minimum is 370 completed responses.

Do not enter the number of invitations as N. Population size means the complete eligible population represented by the estimate. Leave it blank when the population is unknown or so large that the correction has little practical effect.

Design Effect and Expected Response Rate

Design effect is the sampling variance under the planned design divided by the variance under simple random sampling at the same nominal sample size. A design effect above 1 increases the required sample. Clustered observations often increase it because people within a cluster can resemble one another. Stratification can sometimes reduce variance, so a defensible design effect can be below 1.

Design-adjusted sample = simple-random sample × design effect

Use a design effect supported by pilot data, a similar survey or analysis from a statistician. It is not a generic safety percentage. This page accepts it as an explicit variance multiplier and reports the assumption.

After the statistical target is rounded up, the recruitment plan is:

Invitations or enrollment = required completions ÷ expected completion rate

If 370 completed responses are required and 80% of invitees are expected to respond, plan for ceiling(370 / 0.80) = 463 invitations. If a finite population contains fewer eligible people than the calculated invitation target, the requested precision is not feasible at the entered response rate without changing the plan.

Sample Size for Estimating a Mean

For a mean with a known or planning standard deviation, the large-sample formula is:

n0 = (zσ ÷ e)2

σ is the expected standard deviation in the measurement unit, and e is the desired margin in that same unit. If σ = 12, e = 2 and the confidence level is 95%, the result is (1.96 × 12 / 2)2 = 138.29, which rounds up to 139 before any design, finite-population or response adjustment.

The standard deviation is an assumption made before collecting the full sample. Use a prior study, pilot sample or defensible upper value. Underestimating it produces an undersized plan. For a small sample with an unknown standard deviation, a Student t based iterative method can require more observations than this normal-approximation formula.

Power for Comparing Two Independent Groups

Precision planning asks how tightly one quantity will be estimated. Power planning asks how likely a test is to detect a stated difference when that difference is real. For two independent proportions, this calculator uses an uncorrected large-sample normal approximation with separate null and alternative variances. For two independent means, it uses a normal approximation with the entered group standard deviations.

The inputs have distinct roles:

  • Significance level, α, controls the planned Type I error threshold.
  • Power, 1 − β, is the planned probability of rejecting the null at the entered alternative.
  • The group values define the smallest difference the plan is intended to detect.
  • The allocation ratio r is Group 2 sample divided by Group 1 sample.
  • Completion rate inflates enrollment after both group requirements are rounded up.

For two means, the Group 1 planning equation is:

n1 = (zα + z1−β)212 + σ22/r] ÷ Δ2

Then n2 = rn1. Unequal allocation can be useful when one group is more costly or limited, but moving away from an efficient allocation often raises the total sample.

One-Sided vs Two-Sided Tests

A two-sided test allows evidence in either direction and is the safer default when either direction matters. A one-sided test places the rejection region in one prespecified direction and therefore requires fewer observations for the same nominal alpha, power and effect size.

Select one-sided only when the direction was justified before seeing data and the opposite result would not support the same claim. Choosing one-sided after observing the direction invalidates the stated Type I error. Protocol, regulatory, journal or course rules can require a two-sided analysis.

Worked Sample Size Examples

Example 1: Customer survey

A business has 10,000 eligible customers. It wants 95% confidence, a 5% margin and uses p = 50%, design effect 1 and an 80% response rate. The base sample is 384.15. FPC reduces it to 369.97. Round up to 370 completions, then divide by 0.80 and round up to 463 invitations.

Example 2: Compare conversion rates

Suppose Group 1 is expected to convert at 20% and Group 2 at 30%. A two-sided 5% test with 80% power and equal allocation needs a separate completed target for each group. The difference entered here is an assumed planning effect, not a promise about the observed estimate. A smaller expected difference produces a larger sample.

Assumptions and Limits

ModeCore assumptionMain limitation
One proportionProbability sampling and a normal planning approximationRare proportions or tiny samples need another method
One meanA defensible expected standard deviationNormal critical values can understate small-sample needs
Two proportionsIndependent groups and specified alternative proportionsApproximation excludes continuity correction and exact tests
Two meansIndependent observations and stable planning SDsNot a full Welch or noncentral-t power calculation

The calculator does not cover paired measurements, survival outcomes, repeated measures, multilevel models, equivalence or noninferiority tests, multiple primary outcomes, multiple-comparison corrections, unequal cluster sizes or complex adaptive designs. Those plans need a method matched to the intended analysis.

Common Sample Size Mistakes

  • Using p = 0.50 even when a strong prior estimate supports another value, or using an optimistic prior value without evidence.
  • Confusing a confidence level with the probability that one calculated interval contains the fixed parameter.
  • Entering confidence-interval width when the calculator asks for half-width or margin of error.
  • Rounding down a minimum sample size.
  • Applying nonresponse adjustment before identifying the completed sample target.
  • Using finite population correction with the wrong population or with replacement sampling.
  • Ignoring clustering, repeated observations or unequal weighting.
  • Choosing an effect size because it produces an affordable sample instead of defining practical importance first.
  • Switching from a two-sided to one-sided test after looking at outcomes.
  • Treating adequate sample size as proof that the sample is representative or unbiased.

Calculation Method and Review Sources

The survey workflow, design-effect adjustment, nonresponse inflation and finite-population guidance were reviewed against the WHO STEPS survey planning manual. The mean precision formula and its limitations were reviewed against the NIST sample-size guidance for means. Confidence-level interpretation was checked against the CDC Field Epidemiology Manual.

Two-group inputs and terminology were checked against the official R documentation for two-sample proportion power and one- and two-sample t-test power. This page reports its comparison modes as normal planning approximations. It does not claim exact agreement with R's root-solved procedures.

Related Calculators

Frequently Asked Questions

What is a good sample size?

There is no universal good sample size. The target depends on the result, desired precision or power, expected variation, sampling design, population and planned analysis.

Why is 385 a common survey sample size?

For a large population, 95% confidence, a 5% margin and p = 50%, the continuous result is about 384.15, which rounds up to 385 completed responses.

Should I enter 50% for the expected proportion?

Use 50% when no defensible prior estimate exists and you want the largest sample under the standard proportion formula. Use reliable prior evidence when available.

When should I use finite population correction?

Use it for sampling without replacement from a known finite eligible population. Leave population size blank when the population is unknown or the sampling fraction is negligible.

What does design effect mean?

Design effect is planned sampling variance divided by simple-random-sampling variance at the same nominal size. A value above 1 increases the required sample.

Does response rate change the completed sample?

No. It changes how many people you must invite or enroll to obtain the completed sample. The calculator applies this adjustment after rounding the analysis target up.

Why must sample size be rounded up?

The formula returns a minimum. Rounding down would fall below that minimum, so a fractional result is always rounded to the next whole observation.

What is statistical power?

Power is the planned probability of rejecting the null hypothesis at the specified alternative effect when the assumptions and analysis model hold.

Should I choose a one-sided or two-sided test?

Use two-sided when either direction matters. Use one-sided only when the direction was justified before data collection and the opposite direction would not support the claim.

Does a larger sample remove bias?

No. A larger sample reduces random error under the model, but it does not correct selection bias, measurement error, confounding or a poor sampling frame.

Calculation and Research Disclaimer

This free calculator provides statistical planning estimates for educational use. It does not replace a sampling plan, protocol, power analysis by a qualified statistician, ethics review, regulatory guidance or professional research advice. Verify inputs, assumptions, formulas and results before collecting data.

Post a Comment

0Comments

Post a Comment (0)