Interactive explainer: one idea, with a slider the reader drags

A page that teaches one idea by letting the reader change a number and watch what happens.

Live example

The example: Margin of error in polls, for a newsroom's reporters

100 simulated polls that move as you drag

Margin of error in polls, for a newsroom's reporters

Open the example

The names and numbers are made up.

What to notice

  • It opens at 1,000 people and ±3.1 points, with the sum underneath: 1.96 × √(0.5 × 0.5 ÷ 1,000) = 0.0310.
  • Five buttons under the curve jump to 100, 250, 1,000, 4,000 and 10,000 people, and show the margin falling from ±9.8 to ±1.0.
  • The third figure keeps the sample at 1,000 and changes the city: ±3.02 in a town of 20,000, ±3.10 in a country of a billion.

The prompt that starts one like it

Make an interactive explainer as a single HTML page that teaches [idea] to [audience]. Open with one concrete scenario and a chart the reader controls with a slider, set so it shows a real answer on load. Show the formula with the current numbers in it. Add short sections, one point each, with another control where it helps: [the points to cover]. Finish with what the idea doesn't tell you, a three-sentence summary and a method note. It must work on a phone. Then publish it on sharable.link.

Some ideas don't land until you can push on them. The margin of error in a poll is one: "plus or minus 3 points" means little until you drag the sample from 100 people to 10,000 and watch a cloud of dots tighten. Here is that explainer to try, with the prompt that starts yours. Its newsroom is invented and its statistics are real.

Who it's for

Teachers, analysts, journalists and anyone who keeps explaining the same idea to new people: compound interest, how to read a drug trial, why a queue suddenly grows. Reach for it when a paragraph and a still chart have already failed.

It needs an idea with a number the reader can change. If nothing varies, write a plain page. The page can't tell you who opened it or whether they understood, so ask them.

What a good one contains

  • A concrete case before the abstraction. The example starts in a city where exactly 52% of adults want schools to start later, with 100 pollsters each phoning a random sample.
  • A control that changes the picture. One slider sets how many people each poll asks. The dots, the shaded band and the sentence under the chart all follow it.
  • A real answer on load. It opens at 1,000 people and ±3.1 points, a common size for a national poll, so a reader who touches nothing still learns something.
  • The formula with the current numbers in it. "1.96 × √(0.5 × 0.5 ÷ 1,000) = 0.0310" rewrites itself as the slider moves. Skeptics can check one line of arithmetic.
  • Randomness that holds still. The same 100 polls keep their luck while you drag, and change only when you press "Run 100 new polls". What moves is your doing.
  • What the idea leaves out. Three limits are named: people who never got asked, the gap between two candidates, and small groups inside the sample.
  • Something to repeat. Under "Say it back" a box holds three sentences for a colleague, and the last lines state every formula used.

Work two settings out by hand

Before anyone learns from it, pick two positions of the main control and do the sums on a calculator. For this one, 1.96 × √(0.25 ÷ 250) is 0.062, and the page says ±6.2. At 4,000 people it's just under 0.0155, and the page says ±1.5. When your calculator and the page disagree, the page is wrong.

Then drag every slider to both ends, because a nonsense value teaches the wrong lesson. Here the sample stops at 10,000 and the smallest town has 20,000 adults, so no poll asks more people than exist.

How to send it

As an open link. An explainer is for the next person with the same question, and you rarely know who that is. It holds nothing private, so leave the link open.

Every page you publish gets one link that opens in any browser. You choose who can open it: anyone with the link, anyone with the password, or only the people and company domains you name, who sign in with Google or Microsoft. Change the page later and the link stays the same.

Make yours in Claude

Add the connector once, then publish from any Claude conversation and get a link to send.

Add to Claude

Already have the file? Upload it here.

More in learning

  • Slide deck: A talk or a lesson as a web page that moves like slides, for people who weren't in the room.
  • Quiz: A short quiz taken from a link, with a reason after each answer and a result at the end.
  • Lesson plan: One class period written down: aims, materials, a timed sequence and how you'll check what stuck.
  • Study guide: One exam topic on a page: the ideas in order, terms, a diagram, common mistakes and practice.
  • Flashcards: A deck of cards on one subject that flips, shuffles and counts what you know, sent as a link.
  • Syllabus: A course on one page: when it meets, what's due each week, how the grade adds up and the rules.
  • All use cases

Keep reading