Margin of error: polls, sample size and the 95% rule

Run 100 pretend polls of the same town and see how often the margin of error catches the true share. Change the sample size and the true percentage to see why bigger polls are more precise, but only by the square root.

Keep it one tap away for everyday use.

Bookmark Margin of error?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

Or install fibub as an app: every tool you open then works offline.

  1. Share, n
  2. Run polls
  3. Bars
  4. Quiz
Nothing is uploadedWorks offline once open

Imagine 100 polls of the same town. Each asks n people the same yes or no question. The dots are what each poll found. The ones that miss the true share are in a different colour.

Try this

  • Press "Run 100 new polls" a few times. About 95 of 100 bars should reach the true share.
  • Raise n from 400 to 1,600. The bars get half as wide, not a quarter.
  • Set the true share to 50% and then 10%. Which gives a wider margin for the same n?

Check yourself

What it does

When a poll asks 400 people instead of everyone, its answer is only an estimate. The margin of error says how far the estimate is likely to be from the truth, and “95%” means that if you ran the poll again and again, about 95 out of 100 of the bars would reach the true share. This page lets you do exactly that, 100 polls at a time, and count how many bars miss.

Each row on the graph is one poll: a dot for what it found and a bar for its margin of error. Bars that miss the true share (the orange line) turn red. The size of the margin depends on how many people you ask and on the share itself. See normal curve lab for the bell curve behind the rule and hypothesis tests for the next step.

How to use it

  1. Set the true share saying yes (say 50%) and the number of people asked.
  2. Look at the margin of error in the sentence under the graph.
  3. Press “Run 100 new polls” and read how many bars caught the true share.
  4. Change n and run again. Watch the bars get narrower or wider.
  5. Answer the quiz questions at the bottom.

What each setting does

  • True share saying yes: the real percentage in the whole town.
  • People asked (n): the sample size. More people means narrower bars.
  • Run 100 new polls: redraws with a new random sample for every poll.

Worked example

A poll of 1,000 people finds 50% yes. The margin is 1.96 × √(0.5 × 0.5 ÷ 1000) = 0.031, so about ±3.1 points. To get ±3% in the worst case you need n = (1.96 ÷ 0.06)² ≈ 1,068 people. To halve the margin you need four times as many people.

FAQs

Does the margin cover bad questions or people who do not answer? No. It only covers the chance variation from sampling.

Why do about 5 bars miss? A 95% rule is wrong 5 times in 100 by design.

Why use 1.96? It is the number of standard deviations that holds the middle 95% of a normal curve.

Where the numbers come from

  • The margin of error for a sample proportion, 1.96 × √(p̂(1 − p̂) ÷ n), and the worst-case sample size are standard statistics (Common Core HS-S-IC.4 to 6). Checked against hand-worked values in tests/sci.mjs. Polls are simulated with a normal approximation, so nothing real is shown.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-16.

Change log for Margin of error

  1. Learn: USA curriculum pages, guides, tests and share images for 8 new tools Details on GitHub
  2. Learn: USA grade 8-12 curriculum map and 8 new tools (Common Core, NGSS) Details on GitHub

Every change to fibub

Related tools

Hypothesis tests #T388 Answer three questions and the right test is picked for you, then run it on your pasted data: t tests (one-sample, Welch, Student, paired), ANOVA with Tukey HSD, chi-square, Fisher's exact, Mann-Whitney, Wilcoxon, Kruskal-Wallis and Shapiro-Wilk. Plain-English results, effect sizes and assumption checks. Matches scipy. Sample space builder #L82 See every outcome of two dice, a few coins or a deck of cards, shade an event and get its probability as a fraction. Then run the experiment thousands of times and watch the share of hits settle near it. Normal curve lab #L330 Set a mean and a standard deviation, slide a value along the bell curve and see its z-score, the share of values below it, and how much of the data lies within 1, 2 and 3 standard deviations. Quadratic explorer #L68 Slide a, b and c and watch the parabola move: vertex, roots and the discriminant update live, completing the square is drawn with tiles, and the middle term is split for you. With fresh practice questions. Pythagoras proof playground #L69 Drag a right triangle and watch the squares on its sides add up. Slide through four visual proofs (rearrangement, Bhaskara, similar triangles, Baudhayana) with your own side lengths, and list Pythagorean triples. Trig ratio explorer #L70 Drag the angle of a right triangle and see sin, cos and tan as ratios of its sides, with the exact values at 0°, 30°, 45°, 60° and 90°, the identities checked live, and the full unit circle for Class 11.