Home / ⚡ Geometry/ Sample Size Calculator

Sample Size Calculator

Print
Determine the necessary sample size for research projects or solve for margins of error given fixed populations.
Sample Size
Margin of Error
%
%
Calculation Output
Required Sample Size
385
Z-Score 1.96
Population Size Unlimited
Confidence Interval Margin of Error (e) Range

In statistics, researchers gather data about a large population by studying a representative, finite random sample. Assuming the sample is unbiased, characteristics observed within this subset—such as the sample proportion (pˆ)—can estimate the true population parameter (p). However, unless the entire population is measured, the estimate suffers from sampling noise due to individual selection variations. Sampling statistics allow us to compute confidence intervals, specifying the mathematical margin of error surrounding our estimate.

Our free Sample Size Calculator serves a dual purpose. You can calculate the minimum sample size necessary to meet desired confidence levels, or compute the exact margin of error of an existing observation or survey. The calculator supports both unlimited populations and finite population correction factors.


Statistics of a Random Sample

The uncertainty in any random sample is governed by the Central Limit Theorem. The sample proportion estimate (pˆ) is normally distributed with a mean equal to the true proportion (p) and a variance of p(1 - p) / n.

A confidence interval defines the range around the true proportion where an estimate is likely to fall. A confidence level indicates how reliable the interval is. For example, a 95% confidence level means that if an experiment is repeated multiple times, the resulting interval will contain the true population parameter in 95% of those trials.


Confidence Levels and Z-Scores

A z-score represents the number of standard deviations a data point lies away from the mean. Standard normal distribution tables yield the following z-scores for common confidence levels:

Confidence Level Z-Score (±) Confidence Interval Width
70% (0.70) 1.04 Narrow / Lower Certainty
80% (0.80) 1.28 Moderate Certainty
90% (0.90) 1.645 Standard Academic
95% (0.95) 1.96 Standard Business & Polling
99% (0.99) 2.58 High Certainty / Wide Interval
99.9% (0.999) 3.29 Extreme Certainty / Medical

Confidence Interval Formulas

The equation used to determine a proportion’s confidence interval varies depending on whether the population is infinite or finite:

1. Unlimited Population

When the population size (N) is extremely large or unlimited:

CI = pˆ ± z × √[ pˆ(1 - pˆ) / n ]

2. Finite Population Correction (FPC)

When the sample represents a significant proportion of a small, finite population (N), individual selections are not independent. We adjust the variance using the Finite Population Correction factor:

CI = pˆ ± z × √[ pˆ(1 - pˆ) / n ] × √[ (N - n) / (N - 1) ]

FPC Calculation Example

Company Q has N = 120 employees, and n = 85 of them drink coffee daily (sample proportion pˆ = 85 / 120 ≈ 0.7083). Let’s calculate the 99% confidence interval (z = 2.576):

CI = 0.7083 ± 2.576 × √[ 0.7083 × 0.2917 / 85 ] × √[ (120 - 85) / (120 - 1) ]

CI = 0.7083 ± 2.576 × 0.0493 × 0.5422 ≈ 0.7083 ± 0.0688

Thus, the 99% confidence interval is 63.95% to 77.71%.


Sample Size Calculation Formulas

To calculate the minimum sample size required to keep your margin of error within a target value (ε), rearrange the confidence interval equation to solve for n:

1. Unlimited Population

Using Cochran’s formula:

n = [ z² × pˆ(1 - pˆ) ] / ε²

If you are unsure of the population proportion, assume pˆ = 0.50. This maximizes the variance and guarantees that the resulting sample size is large enough regardless of the actual proportion.

2. Finite Population

If the population (N) is finite, adjust the unlimited sample size (n) as follows:

n_finite = n / [ 1 + (n - 1) / N ]

Sample Size Calculation Example

Determine the sample size required to estimate the proportion of U.S. supermarket shoppers who identify as vegan with 95% confidence (z = 1.96) and a 5% margin of error (ε = 0.05). Assume a maximum variance of pˆ = 0.5:

n = [ 1.96² × 0.5 × (1 - 0.5) ] / 0.05² = [ 3.8416 × 0.25 ] / 0.0025 = 0.9604 / 0.0025 ≈ 384.16

Rounding up, a sample size of at least 385 shoppers is required.

Calculate data dispersion using our Standard Deviation Calculator or solve general probability conditions with the Probability Calculator.


Frequently Asked Questions (FAQ)

What is margin of error?

Margin of error (ε) represents the maximum expected difference between the sample statistic (like the sample proportion) and the true population parameter, calculated at a specific confidence level. It defines the radius of your confidence interval.

Why do researchers use 50% for the population proportion?

The product p(1 - p) reaches its maximum mathematical value when p = 0.5. Assuming a 50% population proportion yields the maximum possible variance, which results in the most conservative (largest) sample size estimate to safeguard survey accuracy.

How does population size affect sample size?

For very large populations (e.g., millions of people), population size has almost no effect on sample size. A sample of 385 people is equally effective for a population of 100,000 as it is for a population of 10,000,000. Population size only reduces required sample sizes when the population is small and the FPC factor is applied.

What does a 95% confidence level mean?

A 95% confidence level does not mean there is a 95% chance that the true parameter lies in a specific calculated interval. Rather, it means that if you draw 100 random samples and calculate 100 corresponding confidence intervals, approximately 95 of those intervals will contain the true population parameter.