Sample Size Calculator

Mean • Proportion • Confidence level • FPC
Auto-updates

Settings

Pick Mean if you know population σ. Pick Proportion for surveys / yes-no outcomes.
CL
z
Choosing a CL auto-fills z. Selecting “Custom z” lets you type a z-value.
Quick summary
Enter inputs to compute required sample size.

Inputs

E must be > 0. For proportion, E is absolute (0.03 = 3%).
Used only in Mean mode.
Use when population is not huge relative to sample size.

Results

Required sample size (n)
We round up to the next whole number.
Base n (before FPC)
Inputs used
Updating…

Action

Hard reset: cancels pending updates and clears everything on the first click.

Use this Sample Size Calculator to estimate how many observations you need for a target margin of error and confidence level. It supports both mean-based and proportion-based sample size formulas, with optional finite population correction for smaller populations.

This calculator is useful for survey planning, research design, quality checks, business estimates, and confidence-interval planning when you want a chosen level of precision before collecting data.

Reviewed by: AjaxCalculators Editorial Team
Last updated: May 2, 2026
Method source: Confidence-interval sample size formulas for estimating a population mean or population proportion, with optional finite population correction
Editorial standards: AjaxCalculators Editorial Policy

What This Sample Size Calculator Calculates

This calculator estimates the required sample size needed to achieve a chosen margin of error at a selected confidence level.

It supports two common planning modes:

  • Mean mode: for estimating a population mean when you have a reasonable population standard deviation estimate
  • Proportion mode: for surveys, yes/no outcomes, percentages, approval rates, conversion rates, and other proportion-style estimates

It can also apply finite population correction, often abbreviated as FPC, when the total population size is known and not very large relative to the planned sample.

What Sample Size Means

Sample size is the number of observations, people, items, responses, or measurements included in a study or survey. A larger sample size usually gives a more precise estimate, but it may cost more time, money, and effort.

In confidence-interval planning, sample size is mainly controlled by:

  • Confidence level: how confident you want the interval procedure to be
  • Margin of error: the maximum half-width you want around the estimate
  • Variability: standard deviation for means or p(1 − p) for proportions
  • Population size: only when finite population correction is used

What This Calculator Is Designed For

This calculator is designed for confidence-interval sample size planning. That means it answers questions such as:

  • How many survey responses do I need for a 3 percentage-point margin of error?
  • How many observations do I need to estimate an average within a chosen margin?
  • How does the required sample size change if I choose 90%, 95%, or 99% confidence?
  • How much does finite population correction reduce the required sample?

This is different from statistical power analysis. Power analysis is used for detecting differences or effects in hypothesis tests, while this calculator focuses on precision for estimating a mean or proportion.

Sample Size for a Mean

Mean mode is used when your goal is to estimate a population average, such as average height, average spending, average test score, average delivery time, or average measurement value.

For a large population, the common sample-size formula for estimating a mean is:

n = (z × σ / E)2

Where:

  • n = required sample size
  • z = z value for the selected confidence level
  • σ = assumed population standard deviation
  • E = target margin of error

This formula chooses a sample size large enough so the confidence interval half-width is no larger than the margin of error entered.

Sample Size for a Mean with Finite Population Correction

When the population size is known and the population is not very large, finite population correction can reduce the sample size.

A finite-population form for estimating a mean is:

n = 1 / [E² / (z²σ²) + 1 / N]

Where:

  • N = finite population size
  • E = margin of error
  • z = confidence-level z value
  • σ = population standard deviation estimate

If the population is very large compared with the required sample, the finite population correction usually has little effect.

Sample Size for a Proportion

Proportion mode is used when your result is a percentage, rate, share, or yes/no outcome. Examples include support percentage, defect rate, conversion rate, satisfaction share, pass rate, or the percentage of respondents choosing a specific option.

For a large population, the standard sample-size formula for a proportion is:

n ≈ z²p(1 − p) / E²

Where:

  • n = required sample size
  • z = z value for the selected confidence level
  • p = expected population proportion
  • E = absolute margin of error

In proportion mode, the margin of error should be entered as an absolute proportion. For example:

  • 0.03 means 3 percentage points
  • 0.05 means 5 percentage points
  • 0.01 means 1 percentage point

Why p = 0.50 Is Conservative

If you do not know the expected population proportion, using p = 0.50 is a conservative choice because it maximizes p(1 − p).

Expected Proportion p p(1 − p) Sample Size Effect
0.10 0.09 Smaller required sample than p = 0.50
0.25 0.1875 Moderate required sample
0.50 0.25 Largest required sample
0.75 0.1875 Same variability as p = 0.25
0.90 0.09 Same variability as p = 0.10

Using p = 0.50 is often safer in early survey planning because it avoids underestimating the required sample size when the true proportion is unknown.

Sample Size for a Proportion with Finite Population Correction

When estimating a proportion from a small finite population, the corrected sample size can be written as:

n = m / [1 + (m − 1) / N]

Where:

  • m = large-population sample size before correction
  • N = finite population size

The large-population sample size is:

m = z²p(1 − p) / E²

Finite population correction matters most when the planned sample is a meaningful share of the total population.

Formula Summary

Calculation Formula Use
Mean sample size, large population n = (zσ / E)2 Estimate a population mean
Mean sample size with FPC n = 1 / [E² / (z²σ²) + 1 / N] Estimate a mean from a finite population
Proportion sample size, large population n ≈ z²p(1 − p) / E² Estimate a population proportion
Proportion sample size with FPC n = m / [1 + (m − 1) / N] Estimate a proportion from a finite population
Conservative proportion choice p = 0.50 Use when expected proportion is unknown
Final sample size Round up Required because sample size must be a whole number

Common Confidence Levels and z Values

The confidence level controls the z value used in the formula. Higher confidence requires a larger z value, which usually increases the required sample size.

Confidence Level Approximate z Value Sample Size Effect
90% 1.645 Smaller sample than 95%
95% 1.960 Common planning choice
98% 2.326 Larger sample than 95%
99% 2.576 Larger sample than 95% or 98%

Use a confidence level that matches the decision context. Higher confidence increases precision demands but also increases data-collection needs.

Worked Example A: Proportion Sample Size

Suppose you want to estimate a survey proportion with:

  • Confidence level: 95%
  • z value: 1.96
  • Margin of error: 0.03
  • Estimated proportion: 0.50

Step 1: Use the large-population formula

n ≈ z²p(1 − p) / E²

Step 2: Substitute the values

n ≈ 1.96² × 0.50 × 0.50 / 0.03²

Step 3: Calculate

n ≈ 3.8416 × 0.25 / 0.0009

n ≈ 1067.11

Step 4: Round up

Required sample size = 1068

Result: You need about 1068 completed responses for a 95% confidence estimate with a 3 percentage-point margin of error under these assumptions.

Worked Example B: Finite Population Correction

Now suppose the total population is only 2,000, and the large-population sample size from Example A is m = 1068.

Step 1: Use the finite population correction formula

n = m / [1 + (m − 1) / N]

Step 2: Substitute the values

n = 1068 / [1 + (1068 − 1) / 2000]

Step 3: Calculate the denominator

1 + 1067 / 2000 = 1.5335

Step 4: Calculate corrected sample size

n = 1068 / 1.5335 ≈ 696.45

Step 5: Round up

Required sample size = 697

Result: With a finite population of 2,000, the corrected required sample size is about 697 instead of 1068.

Worked Example C: Sample Size for a Mean

Suppose you want to estimate an average with:

  • Confidence level: 95%
  • z value: 1.96
  • Assumed standard deviation σ: 12
  • Margin of error E: 2

Step 1: Use the mean sample-size formula

n = (zσ / E)2

Step 2: Substitute the values

n = (1.96 × 12 / 2)2

Step 3: Calculate

n = (11.76)2 = 138.30

Step 4: Round up

Required sample size = 139

Result: You need about 139 observations to estimate the mean with a margin of error of 2 units at 95% confidence, assuming σ = 12.

Worked Example D: Effect of Margin of Error

Margin of error has a strong effect on required sample size because it appears in the denominator as .

For a 95% confidence proportion estimate with p = 0.50:

Margin of Error Meaning Approx. Required Sample Size
0.05 5 percentage points 385
0.03 3 percentage points 1068
0.02 2 percentage points 2401
0.01 1 percentage point 9604

Result: Smaller margins of error require much larger samples. Cutting the margin of error in half usually requires about four times as many observations.

Mean Mode vs Proportion Mode

Choose the mode based on the type of outcome you want to estimate.

Mode Use When Estimating Example Outcome Main Variability Input
Mean mode An average numeric value Average score, average spending, average delivery time Standard deviation σ
Proportion mode A percentage or yes/no outcome Approval rate, conversion rate, defect rate, satisfaction percentage Estimated proportion p

Using the wrong mode can produce a misleading sample-size estimate.

Finite Population Correction Explained

Finite population correction can reduce the required sample size when the total population is small enough that sampling a large share of it gives more information.

Population Situation FPC Effect Practical Meaning
Very large population Small or negligible effect The corrected sample is close to the large-population sample
Moderate population Some reduction FPC may reduce required sample size
Small population Meaningful reduction Sampling a large share of the population improves precision

Finite population correction should only be used when the population size is known and the sample is drawn from that specific finite population.

Response Rate and Completed Responses

The calculator estimates the number of completed observations needed. If you expect a response rate below 100%, you may need to invite more people than the required sample size.

Invitations needed = required completed responses ÷ expected response rate

For example, if you need 400 completed responses and expect a 40% response rate:

Invitations needed = 400 ÷ 0.40 = 1000

This response-rate adjustment is separate from the confidence-interval sample size formula.

Design Effects and Complex Sampling

Simple sample-size formulas usually assume a simple random sample. Real surveys may use clustered, stratified, weighted, or multi-stage designs.

If a survey has a design effect, the effective sample size may be smaller than the raw number of responses.

Adjusted sample size ≈ simple random sample size × design effect

For example, if a simple random sample requires 500 responses and the design effect is 1.5:

Adjusted sample size ≈ 500 × 1.5 = 750

This calculator does not automatically adjust for design effects unless you manually account for them outside the tool.

How to Use This Sample Size Calculator

  1. Select Mean or Proportion mode.
  2. Choose a confidence level or enter a custom z value.
  3. Enter the desired margin of error.
  4. If using Mean mode, enter the population standard deviation estimate σ.
  5. If using Proportion mode, enter the estimated proportion p. If unknown, use 0.50 for a conservative result.
  6. Turn on finite population correction if you want to use a known population size N.
  7. Review the required sample size and the base sample size before FPC.
  8. Round up to the next whole number if the calculator shows a decimal result.
  9. Consider response rate, missing data, or design effects before finalizing recruitment targets.

How to Interpret the Result

Required sample size tells you how many completed observations you need to achieve the selected confidence and margin-of-error target under the assumptions entered.

Base n shows the sample size before finite population correction, which is useful when comparing large-population and finite-population planning.

Finite-population corrected n shows the reduced sample size after accounting for a known finite population.

Result Pattern Possible Meaning What to Check
Sample size is very large Margin of error may be very small, confidence may be high, or variability may be large Review whether the precision target is realistic
FPC greatly reduces sample size Population may be small relative to the required sample Confirm the population size is correct
Proportion sample size seems high p = 0.50 is conservative Use prior data if a credible p estimate exists
Mean sample size changes sharply Standard deviation assumption is driving the result Use a pilot study or prior literature when possible

When This Calculator Is Useful

This calculator is useful when planning sample sizes for confidence intervals.

  • Plan survey sample sizes
  • Estimate how many observations are needed for a target margin of error
  • Compare mean-based and proportion-based planning
  • See how confidence level changes required sample size
  • Apply finite population correction for smaller populations
  • Estimate completed responses needed before data collection
  • Compare different margin-of-error targets
  • Plan simple descriptive research estimates

When You May Need More Than This Calculator

This calculator does not cover every study design. Use a more advanced method or qualified statistical guidance when your project involves:

  • hypothesis-test power analysis
  • A/B testing for detecting differences
  • clinical trials or intervention studies
  • regression models
  • ANOVA or multiple groups
  • clustered sampling
  • stratified sampling with allocation rules
  • survey weights
  • nonresponse adjustment
  • longitudinal or repeated-measures data
  • rare outcomes
  • complex regulatory, policy, medical, or legal decisions

Common Mistakes to Avoid

  • Confusing sample-size planning with power analysis: this calculator estimates sample size for confidence-interval precision, not effect detection.
  • Entering percent margins incorrectly: in proportion mode, 0.03 means 3 percentage points, not 3 as a whole number.
  • Using p = 0.50 when good prior data exists: p = 0.50 is conservative, but prior estimates may be more appropriate for planning.
  • Ignoring response rate: the required sample size means completed observations, not invitations sent.
  • Ignoring non-random sampling: a large sample does not fix biased sampling.
  • Using finite population correction incorrectly: FPC only applies when sampling from a known finite population.
  • Forgetting to round up: sample size must be a whole number, so always round up.
  • Ignoring design effects: clustering, weighting, and complex sampling can require a larger sample.
  • Using a weak standard deviation estimate: mean-mode results depend heavily on σ.

Assumptions and Important Notes

  • This calculator is for confidence-interval sample size planning, not full experimental power analysis.
  • The mean formula assumes you have a reasonable estimate of the population standard deviation σ.
  • In proportion mode, the margin of error is entered as an absolute proportion, so 0.03 means 3 percentage points.
  • If the population is very large compared to the sample, finite population correction usually has little effect.
  • If the population is relatively small, FPC can reduce the required sample size meaningfully.
  • The final sample size should be rounded up to the next whole number.
  • The formulas assume an appropriate sampling method, often a simple random sample or an equivalent design.
  • The calculator does not automatically adjust for response rate, missing data, dropout, clustering, weighting, or design effects.
  • The result does not guarantee that survey results will be unbiased.
  • The calculator provides educational planning estimates and should not replace full statistical design review for high-stakes work.

Practical Uses of a Sample Size Calculator

  • Estimate completed survey responses needed
  • Plan confidence intervals for means
  • Plan confidence intervals for proportions
  • Compare 90%, 95%, 98%, and 99% confidence levels
  • Test different margin-of-error targets
  • Apply finite population correction
  • Estimate recruitment needs after expected response-rate adjustment
  • Document assumptions before collecting data

References

  1. Penn State STAT 506: Confidence Intervals and Sample Size
  2. Penn State STAT 415: Estimating a Proportion for a Small, Finite Population
  3. Penn State STAT 415: Estimating a Proportion for a Large Population
  4. Penn State STAT 415: Estimating a Mean
  5. NIST/SEMATECH e-Handbook of Statistical Methods: Confidence Intervals
  6. NIST/SEMATECH e-Handbook of Statistical Methods: Sample Sizes Required

Related Calculators

Frequently Asked Questions

What does this Sample Size Calculator calculate?

It estimates the number of completed observations needed to achieve a selected margin of error at a chosen confidence level for a mean or proportion.

What is margin of error?

Margin of error is the planned half-width around an estimate. For example, a 3 percentage-point margin of error means the estimate is planned to be within plus or minus 3 percentage points under the assumptions used.

What is a confidence level?

A confidence level describes the long-run reliability of the confidence interval procedure. Common choices include 90%, 95%, and 99%.

What z value should I use?

Common z values are about 1.645 for 90% confidence, 1.96 for 95% confidence, and 2.576 for 99% confidence.

When should I use Mean mode?

Use Mean mode when estimating an average numeric value, such as average spending, average score, average height, or average measurement.

When should I use Proportion mode?

Use Proportion mode when estimating a percentage, share, rate, or yes/no outcome, such as approval rate, satisfaction percentage, or conversion rate.

Why use p = 0.50 for a proportion?

When the expected proportion is unknown, p = 0.50 is conservative because it produces the largest required sample size for the standard proportion formula.

What does 0.03 mean in proportion mode?

It means 3 percentage points. In proportion mode, margins of error should be entered as decimals, so 0.05 means 5 percentage points and 0.01 means 1 percentage point.

What is finite population correction?

Finite population correction adjusts the required sample size when the total population is known and the sample is a meaningful share of that population.

When should I use finite population correction?

Use it when you are sampling from a known finite population and the required sample is not tiny relative to the population size.

Does a larger sample remove bias?

No. A larger sample can reduce random sampling error, but it does not fix biased sampling, poor survey questions, low response quality, or nonresponse bias.

Is this the same as power analysis?

No. This calculator estimates sample size for confidence-interval precision. Power analysis is used to plan studies for detecting differences or effects.

Should I increase the sample size for nonresponse?

Usually, yes. If you need a certain number of completed responses and expect a lower response rate, invite more people than the required completed sample size.

Does this calculator work for complex surveys?

Not directly. Complex surveys with clustering, stratification, weights, or design effects may need adjusted sample-size methods.

Can this calculator replace a statistician?

No. It is an educational planning tool. Use qualified statistical guidance for research, publication, medical, legal, policy, financial, or high-stakes decisions.

Disclaimer: This Sample Size Calculator provides educational confidence-interval planning estimates for estimating a population mean or population proportion. Results depend on the selected mode, confidence level, z value, margin of error, standard deviation estimate, expected proportion, finite population size, rounding method, and sampling assumptions entered. The calculator is not a full experimental power-analysis tool and does not determine whether a study can detect a treatment effect or group difference. Mean-mode results depend heavily on the assumed standard deviation, while proportion-mode results depend on the expected proportion; when the proportion is unknown, using 0.50 is a conservative planning choice. Finite population correction can reduce the required sample size when the population is small relative to the sample, but it does not fix biased sampling, low response rates, missing data, clustering, weighting, stratification, non-random selection, or poor questionnaire design. Use this calculator for early planning and educational estimates, and use a full survey design, statistical review, or qualified professional guidance for research, publication, medical, financial, legal, policy, or high-stakes decisions.

More of our calculators...

t-statistic Calculator

Use our t-Statistic Calculator to compute the t value, degrees of freedom, and standard error for one-sample, two-sample, Welch, pooled, or paired t-tests.

t-test Calculator

Use our T-Test Calculator to compute t statistic, p-value, confidence interval, and conclusion for one-sample, Welch, pooled, or paired t-tests.

Outlier Calculator (Tukey Fences)

Use our Outlier Calculator to find low and high outliers with Tukey fences and the IQR method. Get Q1, Q3, IQR, fences, counts, and sorted data fast.

Power Analysis Calculator

Use our Power Analysis Calculator to estimate sample size per group, statistical power, and minimum detectable effect for a two-sample mean test with alpha and standard deviation.

Margin of Error Calculator

Use our Margin of Error Calculator to find margin of error for a mean or proportion from sample size, confidence level, and z value.

Percentile Calculator

Use our Percentile Calculator to find percentile values from a data set with nearest rank or linear interpolation. Supports raw numbers and value:count input.

Variance Calculator

Use our Variance Calculator to find sample or population variance from a data set. Get mean, variance, standard deviation, SSE, range, and sorted values fast.

IQR (Interquartile Range) Calculator

Use our IQR Calculator(Interquartile Range) to find Q1, Q3, median, and interquartile range from a data set. Supports raw numbers, value:count input, and two quartile methods.

Standard Deviation Calculator

Use our Standard Deviation Calculator to find sample or population standard deviation from a data set. Get variance, mean, range, and sorted values fast.