How GetWheelSpinner Random Selection Works
A spinning wheel is only the visible part of a random draw. The important part is how the result is chosen and how the page keeps the pointer, result text, history and removal actions tied to that same choice.
GetWheelSpinner is designed around a winner-first rule: choose the outcome first, then animate the wheel to that outcome. The animation shows the selected result; it does not decide the winner after the spin has finished.
The random source
GetWheelSpinner v9 uses the browser’s Web Crypto API (crypto.getRandomValues()) as the primary source of outcome randomness. The Web Cryptography specification describes getRandomValues() as providing cryptographically strong random values. For outcome selection, that is a stronger primary source than relying on Math.random() alone.
That statement needs an important boundary. “Web Crypto-first” does not mean a GWS draw is tamper-proof, externally certified, suitable for cryptographic key generation, or approved for regulated gambling. It describes the source used to obtain random values for the browser-side outcome path.
Browsers can use different pseudorandom generators and entropy sources internally, so GWS does not claim that every browser uses the same algorithm or that a browser draw is “true randomness” in a philosophical sense.
If Web Crypto is unavailable, throws an error, or cannot provide an accepted bounded value after the engine’s guarded attempts, GWS keeps the tool usable with a compatibility fallback based on Math.random(). That fallback is deliberately disclosed and is not described as equivalent to Web Crypto.
Turning a large random value into a choice
A 32-bit random integer comes from a fixed range. The number of options on a wheel usually does not divide that range exactly.
A simple randomNumber % numberOfOptions calculation can therefore give some output indexes one more possible source value than others. The difference may be tiny, but it is avoidable.
GWS uses rejection sampling on the Web Crypto path. Values from the uneven tail of the 32-bit range are discarded and redrawn. The accepted range divides evenly by the number of choices, so every returned index corresponds to the same number of accepted source values.
Users should not need to think about this when pressing Spin. It is documented because the word “random” should describe the selection method, not just the visual effect.
Winner first, animation second
For wheel-based tools, the authoritative winning occurrence is selected before the visible spin begins. The page then calculates the final rotation needed to bring that occurrence to the pointer.
This separation is important for result integrity. Decorative timing, easing, confetti or small landing-position variation may use ordinary presentation randomness after the outcome has already been chosen, but those visual values must not be allowed to replace or change the authoritative selected occurrence.
The same occurrence must control:
- the segment that lands at the pointer;
- the displayed result;
- winner history;
- any remove-winner action;
- the next state of the wheel.
A wheel that looks correct but shows a different result is not “close enough”. The visual landing and the recorded result have to agree.
Follow a draw through the GWS wheel
Imagine the eligible occurrences are Alex (first entry), Alex (second entry) and Bea. The wheel has three entries, even though there are only two distinct labels. When you press Spin, the browser-side engine maps its random value to one of the three occurrence indexes before the animation starts. Suppose it selects the second Alex occurrence. The wheel calculates a rotation to land on that occurrence. The result and history display the label Alex; they do not visibly distinguish the two identically named entries. The engine still retains the selected index, so Remove Winner removes only that selected occurrence, leaving the other Alex and Bea eligible. If a real-world identity must be clear, enter distinguishable labels before drawing.
This is a worked explanation of the implementation, not a recorded user draw or a claim that a real draw produced this outcome. It illustrates why choosing the winner before spinning matters. Try the Wheel Spinner or read Random Selection Without Repeats for the difference between a one-off draw and a full round.
Duplicate labels are separate entries
If a list contains the same label twice, those are two separate occurrences.
That matters when two people share a name, or when the same visible option appears more than once. GWS tracks occurrences separately where duplicates are supported so that removing one selected occurrence does not silently remove every matching label.
This is not a weighting feature. GWS does not provide percentage controls or weight sliders. If the same label is deliberately entered twice, the list literally contains two occurrences. If that was accidental, remove the duplicate.
A small probability example: if the eligible wheel entries are Alex, Alex and Bea, each occurrence has a one-in-three chance in an ordinary uniform draw. But the displayed label Alex has a two-in-three combined chance, because that label appears in two eligible positions. Two different people sharing the same visible name still need separate identifiers if the result must identify an individual.
Shuffling a whole list
Picking one result and putting an entire list into random order are different jobs.
For a full random order, GWS uses a Fisher–Yates shuffle with the same bounded-integer source described above. Fisher–Yates is the permutation algorithm; it is not the source of randomness.
A correct shuffle preserves every input occurrence exactly once while changing the order. That is the right model for tools such as Random Order, where the goal is a complete sequence rather than one winner.
With repeats and without repeats
A normal wheel can leave the selected occurrence in the list, allowing it to be selected again on a later spin.
A no-repeat workflow removes the selected occurrence from the current pool. The next draw is then made from the smaller remaining set. In probability terminology, this is selection without replacement.
This is useful when the goal is to give each eligible person or item one turn before resetting. It is not the right model for every random process. Coin flips, dice rolls and a normal Yes/No spin usually keep every outcome available for each new trial.
Constrained team generation
Team generation is more complicated than choosing one segment.
With no special rules, a group can be randomised and divided according to the requested team sizes. Once users add rules such as Keep Together or Keep Apart, the job becomes a search for an arrangement that satisfies those constraints.
The Team Generator treats those rules as hard constraints. If the requested combination cannot be satisfied, the tool should report that rather than silently break a rule.
“Spread marked people” is different. It is a soft preference that tries to distribute the marked entries across teams. It does not measure skill, ability, seniority or experience.
For constrained team generation, GWS does not claim that every possible valid arrangement is equally likely. The solver randomises its search and checks the returned arrangement, but exact search methods may be used to find a valid solution rather than sample uniformly from every legal solution.
Secret Santa is a matching problem
Secret Santa has its own constraints:
- nobody can be assigned themselves;
- everyone gives to exactly one person;
- everyone receives from exactly one person;
- optional exclusions can rule out additional giver-recipient pairs.
An assignment with no self-match is called a derangement. Exclusions make the problem more restrictive, and some exclusion sets have no valid complete assignment at all.
GWS first tries whole random assignments. If that is not enough for a constrained case, the solver can use an exact matching method to determine whether a valid assignment exists.
For the same reason as the Team Generator, GWS does not promise equal probability across every possible valid constrained assignment. The narrower promise is the one that matters: a returned assignment must satisfy the stated rules, and an impossible rule set must not be silently ignored.
What the animation does — and does not do
Animation is presentation. It helps make the draw readable and engaging, but it must not become the source of truth.
Spin duration, confetti, easing or other visual effects can change without changing the authoritative selected occurrence. The random-outcome path stays separate from decorative effects.
How to judge a random draw in practice
A useful check is whether the tool's rules match what actually happens: the eligible entries are clear, the chosen occurrence stays consistent with the visible result, and removing an entry changes the next eligible pool as expected. For a full shuffle, every submitted occurrence should appear once in the resulting order. For a constrained assignment, any unmet rules or unresolved search should be visible rather than hidden.
Those checks cannot prove that every future browser run is flawless or that a promotion has been administered lawfully. A short series of results is also not a certificate of perfect randomness. For an important draw, the organiser should prepare and retain their eligible entry list and any records required by the event's rules.
What GWS does not claim
GWS does not claim that its tools are suitable for:
- regulated lotteries or gambling;
- cryptographic key generation or security-critical selection;
- replacing professional judgement in medical, legal, financial or safety decisions;
- proving that a competition was lawfully or correctly administered;
- producing uniformly distributed solutions for every constrained team or Secret Santa problem.
GWS also does not claim that every browser provides identical random-number internals or that the Math.random() fallback has the same properties as Web Crypto.
For everyday choices, classrooms, games, groups and informal draws, the goal is more practical: make the selection method understandable, keep the recorded result consistent with what the user sees, and describe the limits honestly.
Privacy and random selection
The selection logic runs in the browser. GWS is designed so that private entries such as names, options, teams and Secret Santa assignments are not intentionally placed into ordinary page URLs, public tool-share links or analytics event values.
That statement is about tool-entered content. It is not a claim that the entire website makes no network requests. Standard analytics, advertising and consent services may operate separately according to the Privacy Policy and the visitor’s consent settings.
Choosing the right type of random tool
- One result with a visible reveal: use the Wheel Spinner or the Random Name Picker.
- One turn each before reset: use the Student Name Picker or an appropriate no-repeat workflow, checking for duplicate real-world identities first.
- One position for every list entry: use Random Order Generator.
- Teams with Together/Apart rules: use Team Generator and review any unresolved constraints.
- One-to-one gift assignments with exclusions: use Secret Santa Generator, which validates full assignments rather than picking recipients one by one.
Different random tasks need different algorithms. The common requirement is simple: the result shown to the user should be the result the system actually selected.
Sources and further reading
- W3C, Web Cryptography Level 2 — https://www.w3.org/TR/webcrypto/
- MDN, Crypto.getRandomValues() — https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues
- MDN, Math.random() — https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
These sources describe the browser APIs. Claims about the GWS implementation must be checked against the exact release that is deployed.
← Back to the wheel