Sampling Error Calculator

Quick answer

The sampling error calculator estimates how far a sample proportion or sample mean is likely to be from the true population value. Enter the sample size and the proportion (or the standard deviation for a mean) and the confidence level to get the ± sampling error and the resulting interval.

Critical value
1.96
Standard error
0.01947
Sampling error (±)
0.03816
Sampling error in percentage points
3.816 ± percentage points
Interval from
0.31184
Interval to
0.38816
Relative sampling error
10.9 %
Sample size needed to halve the error
2,400

No sample is a perfect copy of its population. Even a flawless random sample gives a mean or percentage that differs a little from the true value, and a different sample would differ in another direction. That chance difference is the sampling error. It cannot be removed, but it can be measured: statistical theory tells us how much estimates vary from sample to sample, through the standard error, and multiplying it by a critical value gives a bound that the error stays within at a chosen confidence level.

For a proportion the standard error is √(p̂(1 − p̂)/n); for a mean it is σ/√n, or s/√n when the standard deviation is estimated from the sample, in which case the t distribution supplies the critical value. In both cases the sampling error falls as the sample grows, but only with the square root of n, so halving it costs four times the sample.

Sampling error is different from non-sampling error (bias from a poor sampling frame, non-response, measurement mistakes or leading questions), which does not shrink with a bigger sample. A small sampling error is no guarantee of an accurate result if the sample is biased.

How to use the Sampling Error Calculator

  1. Error to estimate
  2. Sample size (n)
  3. Sample proportion (p̂, between 0 and 1)
  4. Information you know
  5. Standard deviation
  6. Sample mean (optional, for the interval)
  7. Confidence level

Results update as you type, and everything is calculated in your browser.

How it works

The calculator computes the standard error for the chosen statistic, multiplies it by z* (proportions, or means with known σ) or t* with n − 1 degrees of freedom (means with a sample standard deviation) and reports the result as a ± bound around the estimate.

Worked example

In a sample of 600 households, 35% (p̂ = 0.35) have a heat pump. The standard error is √(0.35 × 0.65 ÷ 600) = 0.01947. At 95% confidence the sampling error is 1.96 × 0.01947 = ±0.0382, so the population share is estimated at 31.2% to 38.8%. For the mean electricity bill in the same sample (x̄ = 84, s = 12.5) the standard error is 12.5 ÷ √600 = 0.5103 and t* (599 df) = 1.9639, giving ±1.002, an interval of 83.0 to 85.0.

How the error shrinks with sample size (p̂ = 0.5, 95%)

n Sampling error
100 ±9.8 points
400 ±4.9 points
1,600 ±2.45 points
6,400 ±1.2 points

Inputs explained

Field What to enter
Error to estimate Choose one: Sample proportion error, Sample mean error
Sample size (n) A number
Sample proportion (p̂, between 0 and 1) A number
Information you know Choose one: Sample standard deviation s, Population standard deviation σ
Standard deviation A number
Sample mean (optional, for the interval) A number
Confidence level Choose one: 80%, 90%, 95%, 98% …

What each result means

  • Sampling error (±) = [Critical value]×[Standard error]
  • Sampling error in percentage points = [Sampling error (±)]×100
  • Sample size needed to halve the error = 4×[Sample size (n)]

Formula

Proportion: E = z* × √(p̂(1 − p̂) ÷ n) · Mean: E = t* × s ÷ √n (s from the sample) or z* × σ ÷ √n (σ known)

Worked example

Inputs: Error to estimate: Sample proportion error; Sample size (n): 600; Sample proportion (p̂, between 0 and 1): 0.35; Confidence level: 95%.
Results: Critical value = 1.96; Standard error = 0.01947; Sampling error (±) = 0.03816; Sampling error in percentage points = 3.816 ± percentage points; Interval from = 0.31184; Interval to = 0.38816; Relative sampling error = 10.9 %; Sample size needed to halve the error = 2,400.

Key terms

Sampling error
Chance difference between a sample estimate and the population value.
Non-sampling error
Error from bias, non-response, measurement or processing.
Standard error
Standard deviation of an estimate across repeated samples.

Frequently asked questions

What is sampling error?

The difference between a sample statistic and the true population value that arises purely because only a sample was observed.

How do you calculate sampling error for a proportion?

z* × √(p̂(1 − p̂)/n). For p̂ = 0.35, n = 600 at 95%: 1.96 × 0.01947 = ±0.0382, or ±3.82 percentage points.

How do you calculate sampling error for a mean?

t* × s/√n. With s = 12.5 and n = 600 at 95%: 1.964 × 0.5103 = ±1.002.

How can sampling error be reduced?

Increase the sample size (the error falls with √n) or use a more efficient design such as stratified sampling.

Is sampling error the same as the margin of error?

In practice yes. The margin of error reported with a survey is the sampling error at the chosen confidence level.

What is the difference between sampling and non-sampling error?

Sampling error comes from chance and shrinks with larger samples; non-sampling error comes from bias, non-response or measurement problems and does not.

Why use t instead of z for a mean?

When the standard deviation is estimated from the same sample, t accounts for that extra uncertainty; for large n the two are almost equal.

Sources

  1. OpenStax: Introductory Statistics 2e
  2. NIST/SEMATECH e-Handbook of Statistical Methods
  3. Penn State STAT 500: Applied Statistics

Cite this calculator

Speedy Calculator. (2026). Sampling Error Calculator. Speedy Calculator. https://speedycalculator.com/calculators/statistics/sampling-error/