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%.
❓ Frequently Asked Questions
🔗 Related Calculators
What is sampling error?
Sampling error is the difference between a sample statistic (e.g., sample mean x̄) and the corresponding population parameter (e.g., population mean μ), arising because a sample is only a subset of the full population. It is not a mistake - it is an inherent, quantifiable uncertainty. The standard error (SE) measures the typical magnitude of sampling error. Larger samples reduce sampling error; larger population variance increases it.
What is the standard error of the mean (SEM)?
The standard error of the mean (SEM) is the standard deviation of the sampling distribution of the sample mean: SE = s/√n. It quantifies how much the sample mean x̄ would vary if you repeated the sampling process many times. SE decreases as n increases (inverse square root relationship) and increases with greater variability (larger s). The SEM is used to build confidence intervals: CI = x̄ ± z × SE.
How is sampling error different from standard deviation?
Standard deviation (s) measures the spread of individual data points around the sample mean. Standard error (SE = s/√n) measures the precision of the sample mean as an estimator - how much the mean would vary across different samples. SD tells you about individual variability; SE tells you about the variability of your summary statistic. As n increases, SE shrinks, but SD does not (it estimates a population parameter, σ, which is fixed).
What is the Finite Population Correction (FPC)?
The Finite Population Correction (FPC) is a factor applied to SE when sampling without replacement from a finite population: FPC = √((N−n)/(N−1)), where N is the population size and n is the sample size. When n/N is small (< 5%), FPC ≈ 1 and can be ignored. When n/N is large (e.g., sampling 40% of a population), FPC significantly reduces SE, giving a more accurate (tighter) confidence interval. Example: sampling 200 from N = 500 gives FPC = √(300/499) ≈ 0.776.
How do I calculate sampling error for a proportion?
For a proportion p̂ = x/n, the standard error is SE = √(p̂(1−p̂)/n). This is maximised at p̂ = 0.5 (where SE = 0.5/√n) and decreases for extreme proportions near 0 or 1. The margin of error is MoE = z × SE, so for a 95% CI: MoE = 1.96 × √(p̂(1−p̂)/n). This formula assumes sampling with replacement (or from a large population). If sampling from a finite population, multiply by the FPC factor.
What is the relationship between SE and margin of error?
The margin of error (MoE) is the half-width of a confidence interval: MoE = z × SE, where z depends on the confidence level (z = 1.645 for 90%, z = 1.96 for 95%, z = 2.576 for 99%). The confidence interval is then (estimate − MoE, estimate + MoE). MoE is what pollsters report when they say 'the poll has a ±3% margin of error' - it means the 95% CI extends 3 percentage points either side of the reported proportion.
When should I use FPC?
Apply FPC when (1) sampling without replacement, and (2) the sampling fraction n/N exceeds 5%. For most large-scale surveys (n = 1000, N = millions), FPC ≈ 1 and can safely be ignored. But for organisational surveys (e.g., sampling 200 employees out of 500), industrial quality control (testing 50 items from a batch of 200), or government census supplementary sampling, FPC materially reduces the SE and should be applied.
How does confidence level affect the margin of error?
A higher confidence level requires a larger z-value, which increases MoE. Going from 90% (z = 1.645) to 95% (z = 1.960) to 99% (z = 2.576) increases the z-multiplier by about 19% and 31% respectively. So a 99% CI is about 31% wider than a 95% CI for the same data. The trade-off: higher confidence = wider interval = less precision. In most research, 95% confidence is the standard balance between precision and certainty.