# What is my margin of error?

Computes the margin of error of a survey percentage, z × √(p(1 − p) ÷ n), or of a mean, z × σ ÷ √n or t × s ÷ √n, at any confidence level.

- Page: https://www.acalculator.org/statistics/margin-of-error-calculator
- JSON spec: https://www.acalculator.org/statistics/margin-of-error-calculator.json
- Version: db2cab927d5c

## Default answer

Example with the default inputs (Margin of error for a Percentage, Sample percentage (p̂) 50%, Sample size (n) 1,000, Confidence level 95%): The margin of error is ±3.09898 percentage points at 95% confidence.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| type | Margin of error for a | A percentage (a proportion, as in a poll) or a mean. |
| p | Sample percentage (p̂) | The share of the sample with the answer, as a percent. Use 50% when you do not know it yet; it gives the largest margin. |
| sd | Standard deviation | The population σ when it is known, or the sample standard deviation s. |
| sigma | Standard deviation is | Known σ uses the normal z value; from the sample uses Student’s t with n − 1 degrees of freedom. |
| n | Sample size (n) | How many people or items are in the sample. |
| cl | Confidence level | How sure you want to be that the interval holds the true value; 95% is common. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| margin | Margin of error (±) | Critical value × standard error: in percentage points for a percentage, in the data’s units for a mean. |
| text | In words | The margin of error with its unit, to 6 significant digits. |
| se | Standard error | √(p(1 − p) ÷ n) in percentage points, or σ ÷ √n (s ÷ √n). |
| critical | Critical value | z (or t with n − 1 degrees of freedom) with an upper-tail area of (1 − confidence) ÷ 2. |
| lower | Interval low | p̂ − margin, in percent (for a percentage). |
| upper | Interval high | p̂ + margin, in percent (for a percentage). |

## Method

Percentage: z × √(p̂(1 − p̂) ÷ n); mean: z × σ ÷ √n, or t(n − 1) × s ÷ √n.

## Assumptions

- A simple random sample from a population much larger than the sample (no finite-population correction).
- The percentage margin uses the normal approximation, which needs enough successes and failures (n p̂ and n(1 − p̂) of 10 or more is a common rule); it gives 0 at 0% and 100%.
- The margin covers random sampling error only, not bias from who answered or how the question was asked.

## Worked examples

1. type = proportion, p = 50%, n = 1,000, cl = 95% gives margin = 3.098975, se = 1.581139, critical = 1.959964. Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.4.1 Confidence intervals (the normal approximation p̂ ± z₁₋α/₂ √(p̂(1 − p̂) ÷ n)), https://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm (retrieved 2026-10-02).
2. type = proportion, p = 84.2%, n = 500, cl = 95% gives margin = 3.197037. Source: OpenStax, Introductory Statistics 2e, §8.3 A Population Proportion, Example 8.10 (n = 500, p′ = 0.842, 95%: EBP = 0.032), https://openstax.org/books/introductory-statistics-2e/pages/8-3-a-population-proportion (retrieved 2026-10-02) (EBP rounded to 0.032, so tolerance 2e-2).
3. type = mean, sigma = known, sd = 3, n = 36, cl = 90% gives margin = 0.822427, se = 0.5. Source: OpenStax, Introductory Statistics 2e, §8.1 A Single Population Mean using the Normal Distribution, Example 8.2 (σ = 3, n = 36, 90%: EBM = 1.645 × 0.5 = 0.8225), https://openstax.org/books/introductory-statistics-2e/pages/8-1-a-single-population-mean-using-the-normal-distribution (retrieved 2026-10-02) (the book rounds z to 1.645; the exact z gives 0.822427).
4. type = mean, sigma = sample, sd = 10, n = 25, cl = 95% gives margin = 4.127797, critical = 2.063899. Source: NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.2 Confidence Limits for the Mean (Ȳ ± t₁₋α/₂,N−1 s ÷ √N), https://www.itl.nist.gov/div898/handbook/eda/section3/eda352.htm (retrieved 2026-10-02).

## FAQ

### What is the margin of error?

Half the width of a confidence interval: the most the sample estimate is likely to differ from the true value, at the chosen confidence level, from random sampling alone. A poll result of 52% ± 3.1 points means the interval 48.9% to 55.1%.

### How do I calculate the margin of error for a survey?

Multiply the critical z value by the standard error √(p̂(1 − p̂) ÷ n). For 1,000 people at 50% and 95% confidence: 1.96 × √(0.25 ÷ 1,000) = 0.031, so ±3.1 percentage points.

### Why use 50% when I do not know the percentage?

p̂(1 − p̂) is largest at p̂ = 50%, so 50% gives the largest, most cautious margin. Survey planners use it before they have results; any other percentage gives a smaller margin for the same sample size.

### How does sample size change the margin of error?

The margin shrinks with the square root of n. Four times as many people halve the margin: at 95% and 50%, 250 people give about ±6.2 points, 1,000 about ±3.1, and 4,000 about ±1.5.

### What is the margin of error for a mean?

z × σ ÷ √n when the population standard deviation σ is known, or t × s ÷ √n with n − 1 degrees of freedom when you use the sample standard deviation s. OpenStax’s example: σ = 3, n = 36 and 90% give 1.645 × 0.5 = 0.8225.

### Does the margin of error cover every kind of error?

No. It covers random sampling error only. Who was asked, who answered, and how the question was worded can bias a result in ways no margin of error shows.

## Sources

- NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.4.1 Confidence intervals (the normal approximation for a proportion, p̂ ± z₁₋α/₂ √(p̂(1 − p̂) ÷ n)). https://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm (retrieved 2026-10-02)
- NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.2 Confidence Limits for the Mean (Ȳ ± t s ÷ √N with N − 1 degrees of freedom). https://www.itl.nist.gov/div898/handbook/eda/section3/eda352.htm (retrieved 2026-10-02)
- OpenStax, Introductory Statistics 2e, §8.3 A Population Proportion (Example 8.10: n = 500, p′ = 0.842, 95% confidence, EBP = 0.032). https://openstax.org/books/introductory-statistics-2e/pages/8-3-a-population-proportion (retrieved 2026-10-02)
- OpenStax, Introductory Statistics 2e, §8.1 A Single Population Mean using the Normal Distribution (Example 8.2: σ = 3, n = 36, 90% confidence, EBM = 0.8225). https://openstax.org/books/introductory-statistics-2e/pages/8-1-a-single-population-mean-using-the-normal-distribution (retrieved 2026-10-02)
