Spin the wheel and pick a winner • Free and fair
Turn any list of names into a wheel of colored segments and let chance pick the winner. Teachers use it for cold-calling and presentation order, hosts for giveaways and raffles, team leads for task assignments.
The script takes a winning index from the current list with Math.floor(Math.random() * names.length) before the animation starts. It then works out the rotation that parks the middle of that segment under the pointer at the top, and adds six to nine complete turns on the way there. That turn count is a second random draw, so it changes how the wheel looks and never who wins. The animation runs for 2.5 seconds on an ease-out curve. One caution: the name printed at the end is read from whatever the list looks like when the wheel stops, so do not add or remove entries while it is turning.
The circle is divided into equal slices of 360 degrees divided by the number of names, so a long name gets no more wheel than a short one. Since the winning index is drawn from the whole range, each name has a probability of 1/n, where n is how many names are on the wheel right now. Colors repeat after ten entries and carry no weight in the draw.
Math.random() is a pseudo-random generator: an algorithm stepping through an internal state the browser seeds for you. Its output is evenly spread, which is all a classroom pick needs. It is not built for unpredictability, and this page does not call the browser's cryptographically secure generator, crypto.getRandomValues(). For a prize worth money or goods, the real weakness is that nobody independent can check a number that existed for a moment inside your own tab, with no log, timestamp or signature.
If the decision is between two options only, a coin flip settles it faster. To divide the same list into teams rather than single winners, use the group generator, and to give each picked person the same speaking time, run the classroom timer beside the wheel. The full set of utilities is on the tools index.
Yes. Each spin stands on its own, and a name that has already won is still in the running for the next one. For a draw with no repeats, take each winner off the list before the next spin; the names left behind then share a shorter list.
Yes. The rotation is worked out from a segment that was already chosen, so the slice that ends under the pointer is the one that was picked. Nothing is redrawn while the wheel turns, and the name reaches the result line when the animation finishes.
No. The list lives only as a variable in the open tab. Typing a name sends it nowhere, and reloading the page starts the list over. Google Analytics records that the name picker was used, not the entries or the winner.
No. The odds are only half of a fair draw; procedure is the other half. One entry per eligible person, the list agreed before the first spin, somebody outside the running doing the clicking, and a written record of each winner. This page supplies the draw, not the record.