Sampling Error Calculator
Calculate sampling error (SE), margin of error, and confidence interval for means and proportions - with optional finite population correction.
📖 What is Sampling Error?
Sampling error is the inherent uncertainty introduced when you draw conclusions about a population from a sample. Because any sample is only a subset of the full population, your sample mean, proportion, or other statistic will not exactly equal the true population parameter - it will be off by some amount. This discrepancy is sampling error. It is not a mistake; it is a mathematically quantifiable consequence of working with samples instead of complete data.
The standard error (SE) is the standard deviation of the sampling distribution of a statistic. For the sample mean, SE = s/√n - it tells you how much the sample mean would vary across repeated samples of size n from the same population. For a proportion, SE = √(p̂(1−p̂)/n). The SE decreases as n increases (by a factor of √n), which is why larger samples give more precise estimates.
The margin of error (MoE) is SE multiplied by the critical z-value: MoE = z × SE. For a 95% confidence interval, z = 1.96. The confidence interval is (estimate − MoE, estimate + MoE). This is the range you would report to users: "the survey shows 42% support, with a ±4.8% margin of error (95% CI)."
A special case arises when sampling without replacement from a finite population. The Finite Population Correction (FPC) factor - √((N−n)/(N−1)) - reduces the SE because when you've sampled a large fraction of the population, there's less uncertainty remaining. FPC is important in organisational surveys, industrial quality control, and any context where n/N exceeds about 5%.
📐 Formulas
With Finite Population Correction:
SE_FPC = SE × √((N−n) / (N−1))
- N = population size, n = sample size
- FPC factor approaches 1 when n/N is small (< 5%); reduces SE materially when n/N > 5%
Margin of Error: MoE = z × SE, where z = invNorm(1 − α/2)
- 90% CI: z = 1.645; 95% CI: z = 1.960; 99% CI: z = 2.576
Confidence Interval: (x̄ − MoE, x̄ + MoE) for means; (p̂ − MoE, p̂ + MoE) for proportions
SE is maximised (proportions) at p̂ = 0.5: SE_max = 0.5/√n - used as conservative assumption when p is unknown
📖 How to Use This Calculator
📝 Example Calculations
Example 1 - Quality Sampling (SE of Mean)
A manufacturer measures the weight of 50 products. Sample mean = 250.4 g, s = 15.2 g. Find the SE and 95% CI.
SE = 15.2 / √50 = 15.2 / 7.071 = 2.150 g
MoE (95%) = 1.96 × 2.150 = 4.21 g; 95% CI: (246.2 g, 254.6 g)
Interpretation: We are 95% confident the true mean weight lies between 246.2 g and 254.6 g.
Example 2 - Survey Sampling Error (Proportion)
A survey of n = 400 people finds 42% (p̂ = 0.42) support a new policy. Find the sampling error and 95% CI.
SE = √(0.42 × 0.58 / 400) = √(0.000609) = 0.02469
MoE = 1.96 × 0.02469 = 0.0484 (≈ 4.8%); 95% CI: (37.2%, 46.8%)
Report: "42% support the policy ±4.8% at 95% confidence."
Example 3 - Finite Population Correction (Employee Survey)
An organisation has N = 400 employees. HR surveys n = 80 (20% of population). Sample mean satisfaction score = 72.3, s = 18.5.
SE (without FPC) = 18.5 / √80 = 2.069; FPC = √((400−80)/(400−1)) = √(320/399) = 0.896
SE_FPC = 2.069 × 0.896 = 1.854; MoE = 1.96 × 1.854 = 3.63; 95% CI: (68.7, 75.9)
FPC reduces the SE by 10.4% - a meaningful reduction because 20% of the population was sampled.
Example 4 - Clinical Measurement SE
A clinical study measures blood glucose for n = 25 patients: x̄ = 5.8 mmol/L, s = 1.2 mmol/L. Find the 99% CI.
SE = 1.2 / √25 = 1.2 / 5 = 0.240 mmol/L
MoE (99%) = 2.576 × 0.240 = 0.618; 99% CI: (5.18, 6.42 mmol/L)
The wider CI at 99% reflects greater certainty at the cost of precision.
Example 5 - Conservative Proportion Estimate (Unknown p)
A researcher wants to estimate a population proportion but has no prior estimate of p. They use p̂ = 0.5 (maximum SE assumption) with n = 100, 95% CI.
SE_max = √(0.5 × 0.5 / 100) = 0.5 / 10 = 0.0500
MoE = 1.96 × 0.05 = 0.098; Maximum CI half-width: ±9.8%
This is the worst-case margin of error for any proportion with n = 100. If the true p is 0.2 or 0.8, the actual MoE would be only ±7.8%.