Z Test Calculator

Margin of error calculator

=—
—
—
Margin of error calculator visualizationMargin of error versus sample size curve with your sample marked

    The working, step by step

      In plain words

      Assumption check

        What Is Margin of Error?

        The margin of error (MOE) is the ± range around a sample estimate that shows how far the estimate is likely to sit from the true population value at a given confidence level.

        A poll reporting 54% support with a margin of error of ±3.1% at 95% confidence means the true support is likely between 50.9% and 57.1%. George Gallup's polls made the margin of error a standard part of survey reporting from the 1930s. The margin of error covers random sampling error only. Test a survey result against a target value with the Z Test Calculator.

        Margin of Error Formulas

        There are 3 margin of error formulas.

        For a Proportion

        MOE = z* × √(p̂(1 − p̂) / n)

        For p̂ = 0.5, n = 1,000 and 95% confidence: MOE = 1.96 × √(0.25 / 1000) = 0.031, or ±3.1%.

        For a Mean

        MOE = z* × σ / √n

        For σ = 12, n = 100 and 95% confidence: MOE = 1.96 × 12 / 10 = ±2.35 units.

        With the Finite Population Correction

        MOE = z* × SE × √((N − n) / (N − 1))

        Apply the finite population correction (FPC) when the sample is more than about 5% of the population (N). Sampling 100 of 500 employees cuts the margin by √(400/499) = 0.895.

        How to Use the Margin of Error Calculator

        To use the margin of error calculator, follow 4 steps:

        1. Choose a proportion (survey percentage) or a mean.
        2. Enter p̂ (or σ) and the sample size n.
        3. Enter the population size N, or leave it blank for a large population.
        4. Set the confidence level.

        The curve shows how the margin of error falls as the sample grows, with your sample marked, and the band shows your estimate with its ± range.

        What Affects Margin of Error (Sample Size, Confidence, p)

        The margin of error depends on 3 inputs:

        • Sample size: the margin falls with √n, so 4 times the sample halves the margin.
        • Confidence level: 99% confidence widens the margin by 31% compared with 95%; 90% narrows it by 16%.
        • The proportion p: p = 0.5 gives the largest margin, and p = 0.1 or 0.9 gives a margin 40% smaller.

        Margin of Error Table by Sample Size (100 to 2,000 at 95%)

        Sample sizeMargin of error (p = 0.5, 95%)
        100±9.8%
        200±6.9%
        400±4.9%
        500±4.4%
        600±4.0%
        800±3.5%
        1,000±3.1%
        1,500±2.5%
        2,000±2.2%

        Margin of Error Examples

        There are 2 worked examples below.

        Example 1: Poll of 1,000 Voters

        A poll of 1,000 voters finds 50% support for a candidate.

        1. Standard error
          SE = √(0.5 × 0.5 / 1000) = 0.0158
        2. Margin of error
          1.96 × 0.0158 = ±3.1%
        3. Range
          46.9% to 53.1%

        Example 2: Customer Survey of 400 People

        248 of 400 customers (62%) would recommend a product.

        1. Standard error
          SE = √(0.62 × 0.38 / 400) = 0.0243
        2. Margin of error
          1.96 × 0.0243 = ±4.76%
        3. Range
          57.2% to 66.8%

        Margin of Error vs. Confidence Interval

        The margin of error is the ± half-width, and the confidence interval is the full range from estimate − MOE to estimate + MOE. 62% ± 4.76% is the same information as the interval [57.2%, 66.8%]. Build full intervals for means and proportions with the confidence interval calculator.

        FAQs

        Why do pollsters use p = 0.5?

        Pollsters use p = 0.5, since it gives the largest possible margin of error, so the reported margin is safe for every question in the poll. p(1 − p) peaks at 0.25 when p = 0.5. A poll reported at ±3.1% has a smaller margin for questions with lopsided answers.

        What is an acceptable margin of error for a survey?

        Most surveys aim for a margin of error between ±3% and ±5% at 95% confidence. National polls usually report about ±3% (around 1,000 respondents). Internal customer surveys often accept ±5% (about 385 respondents).

        Does margin of error cover non-response or biased questions?

        No, the margin of error covers random sampling error only. Non-response, leading questions, coverage gaps and false answers add error that the margin does not capture. The American Association for Public Opinion Research (AAPOR) asks pollsters to report these sources separately.

        How do I halve my margin of error?

        To halve the margin of error, quadruple the sample size. Going from ±5% to ±2.5% at 95% confidence takes the sample from 385 to 1,537. Plan the exact number with the sample size calculator.

        When should I use the finite population correction?

        Use the finite population correction when the sample is more than 5% of the population. Surveying 300 of a company's 1,000 staff shrinks the margin by about 16%. For national populations the correction is negligible. Find the z* for any confidence level with the z critical value calculator.