keepcalculator

06 Numbers and Powers

Sampling Error Calculator & How to Use It

Card No. 06·1240 · Updated · Standard formula, shown below

The calculator on this card is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

A sampling error calculator estimates the margin of error for a survey or poll based on your sample size, population size, and confidence level. You enter those three values, and the calculator returns the sampling error as a percentage (e.g., ±3.2%). This number tells you how much the results from your sample might differ from the true value in the full population.

Formula

The calculator uses the standard formula for the margin of error (sampling error) for a proportion:

e = z × √( p(1−p) / n ) × √( (N−n) / (N−1) )

  • e = sampling error (margin of error), expressed as a decimal (multiply by 100 for percent).
  • z = z-score corresponding to your chosen confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%).
  • p = estimated proportion of the population with the attribute of interest. The calculator uses 0.5 (50%) because that gives the largest possible error – a conservative choice when you don’t know the true proportion.
  • n = your sample size (number of respondents).
  • N = total population size (number of people in the group you’re studying).

The first part (z × √(p(1−p)/n)) is the margin of error for an infinite population. The second factor, √((N−n)/(N−1)), is the finite population correction – it shrinks the error when your sample is a large fraction of the population.

Worked Example

Using the default values from the calculator above:

  • Sample size (n) = 500
  • Population size (N) = 10,000
  • Confidence level = 95% (z = 1.96)

Step 1: Compute p(1−p) = 0.5 × 0.5 = 0.25.

Step 2: Divide by n: 0.25 / 500 = 0.0005.

Step 3: Take the square root: √0.0005 ≈ 0.02236.

Step 4: Multiply by z: 1.96 × 0.02236 ≈ 0.04383.

Step 5: Apply the finite population correction: √((10,000−500)/(10,000−1)) = √(9500/9999) ≈ √0.9501 ≈ 0.9747.

Step 6: Multiply: 0.04383 × 0.9747 ≈ 0.04272.

Step 7: Convert to percent: 0.04272 × 100 = 4.27%.

So with 500 respondents from a population of 10,000, you can say (at 95% confidence) that your survey results are accurate within ±4.3 percentage points.

Why Sampling Error Matters

Whenever you survey a subset of people rather than the entire population, the results will differ from what you’d get if you asked everyone. Sampling error quantifies that difference. For example, if 52% of your sample says they prefer product A, and the sampling error is ±4%, then the true percentage in the full population is likely between 48% and 56% (at your chosen confidence level).

This matters in opinion polls, market research, customer satisfaction surveys, and any study that draws conclusions from a sample. Without knowing the sampling error, you can’t tell whether a difference between two groups is real or just due to chance.

How to Choose the Right Confidence Level

The confidence level reflects how sure you want to be that the true value falls within your margin of error. The most common choices are:

  • 90% (z=1.645) – used when a small risk of being wrong is acceptable, such as internal business surveys.
  • 95% (z=1.96) – the standard for most academic and published research.
  • 99% (z=2.576) – used in high-stakes decisions like medical trials or election forecasting where accuracy is critical.

Higher confidence means a larger z-score, which increases the sampling error. To keep the error small at a high confidence level, you need a larger sample size.

Common Mistakes and Misconceptions

Mistake 1: Ignoring the finite population correction. When your sample is more than 5% of the population, the correction factor matters. For a population of 1,000 and a sample of 500, the correction is √(500/999) ≈ 0.707, which reduces the error by about 30%. Many online calculators skip this, giving an overestimated error.

Mistake 2: Using the wrong z-score. A 95% confidence level corresponds to z=1.96, not 2.0. Using 2.0 gives a slightly larger error, which is conservative but not standard.

Mistake 3: Assuming the sampling error is the only error. Sampling error doesn’t include non-response bias, question wording, or data collection errors. A poorly designed survey can have a small sampling error but still be wildly inaccurate.

Mistake 4: Interpreting the confidence level as a probability. Saying “95% confidence” does not mean there’s a 95% chance the true value is in your interval. It means that if you repeated the survey many times, 95% of the intervals you compute would contain the true value.

When to Use This Calculator vs. Others

This calculator is specifically for estimating the margin of error for a proportion (e.g., percentage of people who say yes). If you are measuring a continuous quantity like average income or height, you need a different formula that uses the standard deviation of your sample. Also, if you’re trying to determine the sample size needed to achieve a certain error, you would use a sample size calculator instead – this one works in the reverse direction.

For most survey research, the proportion-based formula is appropriate because the key results are percentages. Use the conservative p=0.5 when you don’t know the true proportion; if you have a good estimate (e.g., from a prior study), you can plug that in manually, but the calculator uses 0.5 for safety.

Limitations of the Formula

The formula assumes simple random sampling – every person in the population has an equal chance of being selected. If you use stratified, cluster, or convenience sampling, the actual error may be different. The formula also assumes a large sample size (usually n > 30) and that the population is much larger than the sample, though the finite population correction handles cases where it isn’t.

Finally, remember that the sampling error only accounts for random variation. It does not cover systematic errors like a biased question or a non-representative sample. Always consider the full context of your survey design.

Frequently Asked Questions

What is a good sampling error?

There’s no universal standard, but in most social science research, a margin of error of ±5% or less is considered acceptable. For political polls, ±3% is common. The smaller the error, the more precise your estimate, but achieving very small errors requires large sample sizes, which cost more.

How does population size affect sampling error?

For large populations, the effect is tiny. Going from 10,000 to 1,000,000 people changes the error only slightly because the finite population correction approaches 1. The sample size matters much more than the population size. A sample of 1,000 gives roughly the same error for a city of 100,000 as for a country of 300 million.

Can sampling error be zero?

Only if you survey the entire population (census), in which case there is no sampling error. For any sample smaller than the population, there is always some sampling error, though it can be very small with a large enough sample.

What is the difference between sampling error and standard error?

Standard error measures the variability of a sample statistic (like the mean) across repeated samples. Sampling error (margin of error) is the standard error multiplied by the z-score for your confidence level. In practice, the margin of error is what you report alongside a survey result.

Does a larger sample always reduce sampling error?

Yes, but with diminishing returns. The error decreases proportionally to the square root of the sample size. To halve the error, you need to quadruple the sample size. For example, going from 100 to 400 respondents halves the error, but going from 400 to 1,600 only halves it again.

Related

Formula used
in n | Sample size | people | 500 | 1 | 10000000
in N | Population size | people | 10000 | 1 | 1000000000
in z | Confidence level | - | 90%=1.645, 95%=1.96, 99%=2.576 | 1.96
out e | Sampling error (margin of error) | % | (z * sqrt( (0.5 * (1 - 0.5)) / n ) * sqrt( (N - n) / (N - 1) )) * 100 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →