Sample Size Calculator Online Free
Sample Size Calculator
Sample Size Formula
n = (Z² × p × (1-p)) / E²
Where n = sample size, Z = z-score, p = population proportion, E = margin of error
Statistical Sample Size Calculations
Formula: n = (Z² × p × (1-p)) / E²
Statistical Parameters
Typical value: 5% (±5%)
Use 50% if not sure (most conservative)
Leave blank for infinite population
Sample size determines how many observations you need to detect an effect or estimate a parameter with a specified precision. Too small a sample and you miss real effects. Too large a sample wastes resources. This calculator finds the required sample size for estimating means, proportions, or detecting a difference between groups.
Sample Size for Estimating a Proportion
The most common sample size calculation for surveys. Use p = 0.5 when you do not know the population proportion (this gives the largest -- most conservative -- sample size).
n = (z² × p(1-p)) / E² Where: z = z-score for confidence level p = expected proportion (use 0.5 if unknown) E = margin of error Example: 95% CI (z=1.96), p=0.5, E=0.05 n = (1.96² × 0.5 × 0.5) / 0.05² = 385
A 3% margin of error at 95% confidence requires n ≈ 1,068.
Finite Population Correction
If your population is small relative to the sample, the required sample size is smaller than the formula above suggests. Apply the finite population correction when the sample would be more than 5% of the population.
n_adjusted = n / (1 + (n-1)/N) Where N = population size
For a population of 1,000, a raw sample of 385 corrects to 278.
Frequently Asked Questions
Why do most political polls use ~1,000 respondents?⌄
A sample of 1,000 gives a margin of error of about ±3% at 95% confidence for a 50/50 question, regardless of the population size. This is precise enough for most political polling needs. The mathematics of sampling means that doubling sample size to 2,000 only reduces margin of error to ±2.2% -- a modest improvement for double the cost.
Does sample size depend on population size?⌄
Surprisingly little. The required sample size for a given precision depends mainly on the desired margin of error and confidence level, not the population size, as long as the population is large. A margin of ±3% at 95% confidence requires about 1,068 people whether the population is 10,000 or 10 million.
What is statistical power and how does it affect sample size?⌄
Power is the probability of detecting a real effect when it exists (1 - Type II error rate). For a hypothesis test comparing two groups, you need to specify the minimum effect size you want to detect and the desired power (usually 80% or 90%). Larger effect sizes require smaller samples; higher power requirements demand larger samples.
What happens if I use a smaller sample than recommended?⌄
An underpowered study has a high chance of failing to detect real effects (Type II error). Results may be inconclusive or incorrectly suggest there is no effect when one actually exists. This is a common problem in medical research and can lead to treatments being abandoned that would actually be effective with an adequately powered study.