📊">

Sample Size Calculator

Confidence intervals & margin of error • 2026 edition

Sample Size Formulas:

Show the calculator

Basic Sample Size: \( n = \frac{Z^2 \cdot p(1-p)}{E^2} \)

With Population Correction: \( n = \frac{n_0}{1 + \frac{n_0-1}{N}} \)

Margin of Error: \( E = Z \cdot \sqrt{\frac{p(1-p)}{n}} \)

Confidence Level Z-scores: 90% (1.645), 95% (1.96), 99% (2.576)

Finite Population Correction: \( n_{adj} = \frac{n}{1 + \frac{n-1}{N}} \)

Sample size calculation determines the minimum number of observations needed to achieve reliable statistical results. It depends on confidence level, margin of error, population proportion, and population size. Larger samples provide more precise estimates but require more resources.

Sample Parameters

Results

0
Required Sample Size
0.00
Confidence Interval
0.00%
Actual Margin of Error
0.00
Z-Score
Confidence Level
95%
Expected Proportion
50%
Population Size
Infinite
Required Precision
±5%
Sample Size Implications
Response Rate Needed: 0%
Sampling Error: 0.00%
Statistical Power: 0%
Sample Size Sensitivity
Confidence Level Margin of Error Sample Size

Sample Size Calculation Guide

What is Sample Size?

Sample size is the number of observations or participants in a study required to achieve statistically significant results. It determines the precision and reliability of statistical estimates. A properly calculated sample size ensures that a study has sufficient power to detect meaningful effects while controlling for Type I and Type II errors.

Basic Sample Size Formula

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

Where Z is the Z-score for the confidence level, p is the expected proportion, and E is the margin of error.

Finite Population Correction

\( n_{adj} = \frac{n}{1 + \frac{n-1}{N}} \)

Used when population size N is known and relatively small compared to the calculated sample size.

Key Properties:
  • Higher confidence level = larger sample size
  • Smaller margin of error = larger sample size
  • Proportion near 50% = largest sample size
  • Finite populations allow smaller samples

Sample Size Calculation Learning Quiz

Question 1: Multiple Choice - Sample Size Factors

Which of the following would result in the SMALLEST required sample size?

Solution:

The answer is C) 90% confidence level, 5% margin of error. Sample size is directly proportional to confidence level (higher confidence = larger sample) and inversely proportional to the square of the margin of error (smaller margin = larger sample). Therefore, the combination of lowest confidence level (90%) and largest margin of error (5%) will yield the smallest sample size.

Pedagogical Explanation:

The sample size formula shows that sample size increases with higher confidence levels (because the Z-score is larger) and decreases with larger margins of error (because the denominator E² is larger). When choosing parameters, researchers must balance the need for precision and confidence against resource constraints. The relationship between parameters is crucial for making informed decisions about study design.

Key Definitions:

Confidence Level: Probability that the true parameter falls within the confidence interval

Margin of Error: Range of values above and below the sample statistic

Sample Size: Number of observations in a study

Important Rules:

• Sample size ∝ Confidence level

• Sample size ∝ 1/(Margin of Error)²

• Sample size ∝ p(1-p)

Tips & Tricks:

• Higher confidence = larger sample

• Smaller error = larger sample

• Proportion of 50% maximizes sample size

Common Mistakes:

• Confusing direct and inverse relationships

• Forgetting that margin of error is squared

• Not considering population size effects

Question 2: Sample Size Calculation

Calculate the sample size needed for a 95% confidence level with a 4% margin of error and an expected proportion of 30%. Use the basic sample size formula. Show your work.

Solution:

Step 1: Identify the parameters

Confidence level = 95%, so Z = 1.96

Margin of error (E) = 4% = 0.04

Expected proportion (p) = 30% = 0.30

Step 2: Apply the formula

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

n = (1.96² × 0.30 × (1-0.30)) / 0.04²

n = (3.8416 × 0.30 × 0.70) / 0.0016

n = (3.8416 × 0.21) / 0.0016

n = 0.806736 / 0.0016

n = 504.21

Step 3: Round up to whole number

n = 505 participants needed

Pedagogical Explanation:

The sample size formula balances precision and confidence. The Z-score represents the desired confidence level, the proportion p(1-p) reflects the expected variability in the data, and the margin of error E defines the desired precision. The formula shows that sample size increases quadratically as we demand more precision (smaller E).

Key Definitions:

Z-Score: Number of standard deviations from the mean

Proportion: Fraction of population with specific characteristic

Sample Size Formula: n = (Z² × p × (1-p)) / E²

Important Rules:

• Always round sample size up

• Use Z-score for confidence level

• Square the margin of error in denominator

Tips & Tricks:

• Round up to ensure minimum sample

• Use p=0.5 for conservative estimate

• Remember margin of error is squared

Common Mistakes:

• Forgetting to square the Z-score

• Not squaring the margin of error

• Forgetting to round up the result

Question 3: Word Problem - Survey Design

A market researcher wants to estimate the percentage of customers who prefer online shopping with 95% confidence and a margin of error of 3%. Based on previous studies, about 60% of customers prefer online shopping. What sample size is needed? If the company has 10,000 customers, how does this affect the sample size?

Solution:

Step 1: Calculate basic sample size

Z = 1.96 (for 95% confidence)

p = 0.60, 1-p = 0.40

E = 0.03

n = (1.96² × 0.60 × 0.40) / 0.03²

n = (3.8416 × 0.24) / 0.0009

n = 0.921984 / 0.0009 = 1,024.43

Basic sample size = 1,025

Step 2: Apply finite population correction

N = 10,000

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

n_adj = 1,025 / (1 + (1,024)/10,000)

n_adj = 1,025 / (1 + 0.1024) = 1,025 / 1.1024 = 929.8

Adjusted sample size = 930

The finite population correction reduces the required sample size from 1,025 to 930.

Pedagogical Explanation:

This problem demonstrates how finite population size affects sample size requirements. When the population is relatively small compared to the calculated sample size, we can reduce the sample size using the finite population correction formula. This adjustment recognizes that sampling a significant portion of the population provides more information than sampling from an infinite population.

Key Definitions:

Finite Population Correction: Adjustment for known population size

Survey Design: Planning methodology for data collection

Market Research: Collecting and analyzing consumer data

Important Rules:

• Use finite correction when n/N > 0.05

• Always round sample size up

• Correction reduces required sample size

Tips & Tricks:

• Apply finite correction for small populations

• Use p=0.5 for maximum sample size estimate

• Consider practical constraints when designing surveys

Common Mistakes:

• Forgetting to apply finite population correction

• Using wrong formula for finite populations

• Not considering practical sampling constraints

Question 4: Application-Based Problem - Quality Control

A quality control manager needs to determine the sample size for inspecting products. The manager wants 99% confidence that the sample proportion of defective items is within 2% of the true proportion. Historical data suggests about 8% of items are defective. How many items should be inspected? What would happen if the confidence level was reduced to 95%?

Solution:

Step 1: Calculate sample size for 99% confidence

Z = 2.576 (for 99% confidence)

p = 0.08, 1-p = 0.92

E = 0.02

n = (2.576² × 0.08 × 0.92) / 0.02²

n = (6.635776 × 0.0736) / 0.0004

n = 0.488393 / 0.0004 = 1,220.98

For 99% confidence: 1,221 items needed

Step 2: Calculate sample size for 95% confidence

Z = 1.96 (for 95% confidence)

n = (1.96² × 0.08 × 0.92) / 0.02²

n = (3.8416 × 0.0736) / 0.0004

n = 0.282741 / 0.0004 = 706.85

For 95% confidence: 707 items needed

Reducing confidence level from 99% to 95% reduces sample size from 1,221 to 707 items (about 42% reduction).

Pedagogical Explanation:

This example shows how confidence level dramatically affects sample size requirements. The Z-score increases from 1.96 (95%) to 2.576 (99%), which squares to approximately 3.84 to 6.64, more than doubling the required sample size. This demonstrates the cost-benefit trade-off in statistical design: higher confidence comes at the expense of significantly larger samples.

Key Definitions:

Quality Control: Process of maintaining product standards

Defective Items: Products that fail to meet quality standards

Statistical Trade-offs: Balancing precision, confidence, and cost

Important Rules:

• Higher confidence = much larger sample

• Z-score increases exponentially with confidence

• Consider practical constraints in quality control

Tips & Tricks:

• Evaluate cost-benefit of higher confidence levels

• Use historical data for proportion estimates

• Consider stratified sampling for quality control

Common Mistakes:

• Not considering practical feasibility of large samples

• Using unrealistic proportion estimates

• Forgetting to square the Z-score in calculations

Question 5: Multiple Choice - Proportion Effects

Which expected proportion would require the LARGEST sample size, assuming all other parameters remain constant?

Solution:

The answer is C) 50%. The sample size formula includes the term p(1-p), which represents the variance of a proportion. This value reaches its maximum when p = 0.5 (50%). At 50%, p(1-p) = 0.5 × 0.5 = 0.25. At 10%, p(1-p) = 0.1 × 0.9 = 0.09. At 25%, p(1-p) = 0.25 × 0.75 = 0.1875. At 75%, p(1-p) = 0.75 × 0.25 = 0.1875. Therefore, 50% requires the largest sample size.

Pedagogical Explanation:

The p(1-p) term in the sample size formula represents the variance of a binomial proportion. This value peaks at p = 0.5 and decreases symmetrically as p moves away from 0.5. This is because the maximum uncertainty occurs when the probability of success equals the probability of failure (50-50 chance). For proportions near 0% or 100%, there's less uncertainty, requiring smaller samples for the same level of precision.

Key Definitions:

Proportion Variance: p(1-p) term in sample size calculation

Binomial Proportion: Outcome with two possible values

Maximum Uncertainty: Occurs at 50% probability

Important Rules:

• p(1-p) is maximized at p = 0.5

• Maximum occurs at 50% proportion

• Symmetric around 50%

Tips & Tricks:

• Use p = 0.5 for conservative sample size estimate

• Proportions near 0% or 100% require smaller samples

• Maximum uncertainty at 50%

Common Mistakes:

• Not understanding why 50% requires largest sample

• Confusing the p(1-p) relationship

• Forgetting that variance peaks at 50%

FAQ

Q: What is the difference between confidence level and confidence interval?

A: Confidence level and confidence interval are related but different concepts:

  • Confidence Level: Probability (e.g., 95%) that the true parameter falls within the confidence interval
  • Confidence Interval: Range of values (e.g., 45% to 55%) within which we expect the true parameter to fall

For example, a 95% confidence level means that if we repeated the study 100 times, about 95 of the confidence intervals would contain the true value.

Q: How do researchers determine appropriate sample sizes in practice?

A: Researchers consider multiple factors:

  • Resource Constraints: Budget, time, personnel limitations
  • Effect Size: Smaller effects require larger samples to detect
  • Population Variability: More diverse populations need larger samples
  • Power Analysis: Ensuring adequate statistical power to detect effects
  • Practical Considerations: Accessibility of target population

Often, researchers start with calculated minimum sample size and adjust based on practical feasibility.

About

Statistics Team
This sample size calculator was created
This calculator was created by our Math Calculators Team , may make errors. Consider checking important information. Updated: April 2026.