InfyCalculator
📊

Margin of Error Calculator (with Finite Population Correction and Sample Size)

Find the margin of error for a survey proportion or a mean from the sample size and confidence level, with the finite population correction and design effect. Or work backwards to the sample size you need. Includes Wilson and exact intervals, tables, a chart and the steps.

Calculate
Sample size (n)
Expected proportion
Number who gave the answer (optional)
Standard deviation
The standard deviation is
Sample mean (optional, for the interval)
Target margin of error (±)
Target margin of error (±, in data units)
Confidence level
Population size (optional)
Design effect
Expected response rate
Loading calculator…

How it works

Proportion: E = z × √(p(1 − p) ÷ n) × √((N − n) ÷ (N − 1)) × √deff · Mean: E = z (or t with n − 1 df) × SD ÷ √n × FPC × √deff · Sample size: n₀ = z² p(1 − p) deff ÷ E² (or (z × SD ÷ E)² × deff), then n = n₀ ÷ (1 + (n₀ − 1) ÷ N), rounded up

The margin of error is the half-width of a confidence interval: the “±” after a poll or survey result. For a proportion it grows with the z-value for your confidence level and with the spread p(1 − p), and it shrinks with the square root of the sample size. p = 0.5 gives the widest margin, which is why most published polls assume it. For a mean, the standard deviation replaces √(p(1 − p)). When that SD comes from the sample, the t distribution replaces z. If your sample is a sizeable share of a known population (roughly 5% or more), the finite population correction √((N − n) ÷ (N − 1)) shrinks the margin. Weighted or clustered samples have a design effect that widens it by √deff. Switch to a sample-size mode to work backwards from the margin you want to the number of responses you need. A response rate turns that into the number of people to invite. For proportions, a table compares the usual Wald margin with the Wilson, Agresti–Coull and exact Clopper–Pearson intervals. Those are more reliable for small samples or proportions near 0% or 100%.

Worked example

For a poll of 1,000 people at 95% confidence with p = 0.5: E = 1.96 × √(0.25 ÷ 1000) = 1.96 × 0.0158 ≈ 0.031, or about ±3.1%. A candidate polling at 50% is really somewhere between roughly 46.9% and 53.1%. If those 1,000 people came from a town of 10,000 adults, the correction √(9,000 ÷ 9,999) = 0.9487 cuts the margin to ±2.94%. Working backwards, a ±5% margin at 95% confidence needs 1.96² × 0.25 ÷ 0.05² = 384.1, so 385 responses from a large population. From a population of 1,000 it needs 384.1 ÷ (1 + 383.1 ÷ 1,000) = 278.

Sources: NIST/SEMATECH e-Handbook — 7.2.4.1 Confidence intervals for a proportion · Pew Research Center — 5 key things to know about the margin of error in election polls

Frequently asked questions

Why do so many national polls report about ±3%?

Because a sample of around 1,000 at 95% confidence gives a margin near 3.1%. It is a sweet spot: large enough for a tight margin and small enough to stay affordable, so it became the industry standard.

Does the size of the population change the margin?

Barely, once the population is large. Sampling 1,000 people gives about the same margin whether the population is 100,000 or 100 million. It starts to matter when the sample is more than about 5% of the population. Then enter the population size and the finite population correction shrinks the margin: 500 out of 2,000 gives ±3.8% instead of ±4.4%.

How many responses do I need for a 5% margin of error?

At 95% confidence with p = 0.5, about 385 from a large population. From smaller populations you need fewer: about 278 from 1,000 and 218 from 500. Choose “Sample size needed — proportion” and enter your population. Divide by your expected response rate to see how many people to invite.

What does the margin of error leave out?

Only sampling error is covered. It says nothing about biased questions, non-response or bad sampling frames, which can distort a survey far more than the reported margin suggests.

When should I use the Wilson or exact interval instead?

When the sample is small or the proportion is close to 0% or 100%. A rule of thumb is fewer than 10 expected “yes” or “no” answers. The simple ±margin can then run below 0% or cover too little. The table under the results gives Wilson, Agresti–Coull and Clopper–Pearson intervals for your numbers.

What is a design effect?

It is how much a survey’s weighting or clustering inflates the variance compared with a simple random sample. Many published polls have design effects of 1.3–2. The margin grows by the square root, so a design effect of 2 turns ±3.1% into about ±4.4%.

Related calculators

For education — check assumptions (sample size, distribution) before using statistics in real decisions.