Margin of Error Calculator

Understanding Margin of Error for Survey Precision

Introduction to Margin of Error in Survey Samples

This margin of error calculator explains how much uncertainty is built into a survey, poll, or sample-based study when only part of a population is measured. Rather than collecting a census, researchers take a smaller group and use it to estimate what the full population is likely to think, prefer, or experience. The margin of error summarizes the random sampling variation that comes from that shortcut. In plain terms, it shows how far the sample result could reasonably land from the true population value just because the study used a sample.

This calculator estimates the margin of error for a proportion, such as the share of respondents who answered yes, supported a candidate, preferred a product, or reported a particular trait. It uses the standard proportion-based formula and can also apply a finite population correction when the sample comes from a known, limited population. That makes it handy for public polling, customer satisfaction surveys, classroom projects, employee questionnaires, membership studies, and any other survey where you want a fast read on statistical precision.

In margin of error calculations, smaller is better because it signals a tighter estimate. A larger margin means the reported percentage could be farther from the true population value. If a poll reports 52% support with a margin of error of ±3 percentage points, the result is commonly read as meaning the true population proportion is likely somewhere near 49% to 55%, assuming the sample was random and the model assumptions are reasonable.

How to Use This Margin of Error Calculator

This margin of error calculator uses four inputs, and each one changes the answer in a different way. Start with the sample size, which is the number of completed responses or observations in your sample. Larger samples usually shrink the margin of error because they give a clearer picture of the population. The effect is not linear, though: doubling the sample size does not halve the margin. Instead, precision improves according to a square-root pattern, so each additional gain becomes a little smaller as the sample gets bigger.

The optional population size field is meant for surveys drawn from a finite, known group, such as a school with 2,000 students, a company with 850 employees, or a membership list with 5,000 names. If the total population is very large compared with the sample, leave this field blank and the calculator will use the standard large-population formula. When the sample is a meaningful portion of the whole group, entering the population size lets the calculator apply the finite population correction, which slightly lowers the margin of error.

The proportion input is the estimated share of the sample with the characteristic you care about, entered as a decimal between 0 and 1. For example, 50% should be entered as 0.5, 10% as 0.1, and 72% as 0.72. If you do not yet have a prior estimate, 0.5 is a conservative choice because it creates the largest variability and therefore the largest margin of error. Survey planners often use 0.5 when they want a cautious estimate before collecting data.

The confidence level determines how cautious the interval should be. Common choices are 90%, 95%, and 99%. A higher confidence level means you want a greater chance that the interval captures the true population value, so the margin of error becomes wider. In practice, 95% is the most common default because it offers a good balance between caution and usefulness for many reporting situations.

After entering your values, choose the confidence level and press the compute button. The result appears as a percentage-point margin, such as ±4.90 percentage points. That wording matters because percentage points describe the width around a proportion estimate, not a relative percent change. If your sample estimate is 60% and the margin is ±4.90 points, the implied interval is about 55.10% to 64.90%.

Margin of Error Formula

This margin of error calculator uses the standard formula for a sample proportion. For a large population, the equation is:

Formula: MOE = z × sqrt((p(1 - p)) / n)

MOE = z × p ( 1 - p ) n

In this expression, z is the z-score associated with the selected confidence level, p is the sample proportion, and n is the sample size. The term under the square root is the estimated variance of the sample proportion. As that variance gets smaller, the margin of error gets smaller too.

When the sample is drawn without replacement from a finite population, the calculator multiplies the large-population formula by the finite population correction factor. The full expression is:

Formula: MOE = z × sqrt((p(1 - p)) / n) × sqrt((N - n) / (N - 1))

MOE = z × p ( 1 - p ) n × N - n N - 1

Here N is the population size. If the population is huge compared with the sample, this correction factor is very close to 1, so it has little practical effect. If the sample is a substantial share of the population, the factor becomes smaller than 1 and reduces the margin of error. That reduction reflects the fact that sampling a large fraction of a small population gives you more information than sampling the same number from an effectively unlimited population.

The table below lists the z-scores used for the confidence levels available in the form:

Confidence z-score
90% 1.645
95% 1.96
99% 2.576

One especially important detail in margin of error work is the role of p. The product p(1-p) is largest when p=0.5. That is why a 50/50 split produces the largest margin of error for a given sample size and confidence level. If the estimated proportion is closer to 0 or 1, the margin becomes smaller because the variability is lower.

Margin of Error Example

This margin of error example uses a poll of 400 people at a 95% confidence level. If the estimated proportion is 0.5, the margin of error is calculated as:

MOE = 1.96 × 0.5 ( 1 - 0.5 ) 400 ≈ 0.049, or ±4.9 percentage points.

That means if the sample result were 50%, the corresponding confidence interval would be about 45.1% to 54.9%. If the observed result were 62%, the interval would be about 57.1% to 66.9%. The margin itself does not depend on the reported percentage alone; it depends on the sample size, confidence level, and the proportion value used in the formula.

Now imagine increasing the sample size from 400 to 800 while keeping the same 95% confidence level and the same proportion of 0.5. The margin drops to roughly ±3.5 percentage points. This is a good illustration of diminishing returns in margin of error calculations. You doubled the sample size, but the margin did not get cut in half. That is normal and expected because the formula improves precision at the rate of the square root of the sample size.

The finite population correction can also matter. Suppose the population is only 5,000 and the sample size is 800. Applying the correction multiplies the margin by 5000 - 800 5000 - 1 , reducing the margin from about 3.5 points to about 3.2 points. The difference is not dramatic here, but it is real and can be useful when reporting results from smaller, closed populations.

For comparison, here are typical margins at 95% confidence when p=0.5 and no finite population correction is used:

Sample Size Margin of Error
100 ±9.8%
400 ±4.9%
1,000 ±3.1%
10,000 ±1.0%

These values help explain why many public polls use samples around 1,000 respondents. That size often yields a margin near ±3 percentage points, which is widely seen as a practical compromise between cost and precision. Reaching ±1 point usually requires a much larger sample, which can be expensive and time-consuming.

The proportion value also changes the result. If you expect only 10% support for an issue and use p = 0.1 with n = 1000 , the formula becomes 1.96 × 0.1 ( 0.9 ) 1000 ≈ 0.018, or ±1.8 percentage points. Because the variability is lower than at 0.5, the margin is smaller.

Margin of Error Limitations and Assumptions

This margin of error calculator is useful, but it does not describe every source of uncertainty in a survey. The result only reflects random sampling error under the assumptions of the model. It does not account for biased wording, poor sampling frames, nonresponse bias, weighting problems, interviewer effects, measurement error, or mistakes in data processing. A survey can have a small margin of error and still be misleading if the sample is not representative.

This calculator is built for proportion estimates and uses a normal-approximation style formula. That approach is common and practical, especially for moderate to large samples, but it is still an approximation. In very small samples, or when the proportion is extremely close to 0 or 1, more specialized interval methods may be preferable. The result should therefore be treated as a standard planning or reporting estimate, not as a guarantee of exact inferential performance in every edge case.

Another important assumption in margin of error analysis is that the sample is random or close to random. If respondents self-select into a survey, if certain groups are systematically underrepresented, or if the sample design is complex, the simple formula may understate the true uncertainty. Professional survey reports often discuss weighting, design effects, and methodology notes for exactly this reason.

Researchers sometimes reverse the calculation to estimate the sample size needed for a target margin of error. Solving for n gives:

n = z 2 p ( 1 - p ) MOE 2

That rearranged form is often used in survey planning, but it still relies on the same assumptions described above. In other words, collecting the mathematically required number of responses does not automatically solve problems of bias or poor questionnaire design.

Used appropriately, though, margin of error remains one of the clearest ways to communicate sampling precision. It helps readers compare estimates, understand uncertainty, and avoid overinterpreting small differences. If two survey results differ by less than their margins of error, that difference may not be meaningful. If the difference is much larger, the evidence for a real gap is stronger, though still subject to the broader quality of the study design.

Enter the count of responses in your sample.
Leave blank for a very large population, or enter a known total to apply finite population correction.
Use a value between 0 and 1; 0.5 is a conservative default.
Higher confidence gives a larger margin of error.
Enter sample information to estimate margin of error.

Embed this calculator

Copy and paste the HTML below to add the Margin of Error Calculator - Survey Precision, Confidence Levels, and Sampling Error to your website.