
Random Team Generator: Why the Shuffle Method Matters (Tested)
Two ways to mix names before splitting them into teams, checked 10,000 times each. One is fair; the popular sorting shortcut is not. How the Make Random Teams tool does it.
By Said · December 2026 · 5-minute read
A random team generator looks simple: mix the names, then deal them into teams. The mixing step is where things can go wrong. While testing the Random Name Picker, I found that its built-in team option used a popular shortcut that is not fair. This article explains the difference and checks the Make Random Teams tool against it.
The short version
- The Make Random Teams tool mixes names with a Fisher-Yates shuffle. In my check, with 10 names in 2 teams, every name landed in Team A between 49.0% and 51.0% of the time, close to the 50% a fair split gives.
- The shortcut of sorting a list with a random comparison is not fair. Run the same way, it put names in Team A anywhere from 33.9% to 56.1% of the time, depending on where they sat in the list.
- Team sizes never differ by more than one name. 7 names in 3 teams always gave 3, 2 and 2.
- The Name Picker’s team option used the shortcut until 27 November 2026. It now uses the same fair shuffle.
Two ways to mix a list
Fisher-Yates shuffle. Start at the last name, swap it with a randomly chosen name at or before it, then move one step back and repeat. Each of the possible orders of the list is equally likely, as long as each random choice is fair.
Sorting with a random comparison. Many code examples sort the list and tell the sort to answer “bigger” or “smaller” at random. It looks random, but a sorting algorithm compares some pairs more often than others and stops early when it thinks the list is in order. The result depends on the starting order, so names near the start or end of your list are treated differently.
How I checked it
- I copied the shuffle and the team-dealing code from the Make Random Teams page (script version 1.0.0) and ran them in Chrome on Windows, on 10 names split into 2 teams, 10,000 times.
- I ran the sorting shortcut the same way, with the same 10 names and the same dealing step, 10,000 times.
- I counted how often each name landed in Team A and how often the first two names in the list ended up together. For 10 names in 2 teams of 5, a fair split puts any two names together 4 times out of 9, or 44.4%.
Results
| Measure (10 names, 2 teams, 10,000 splits) | Fisher-Yates (Make Random Teams) | Sorting shortcut | Fair value |
|---|---|---|---|
| Lowest share of splits in Team A, any name | 49.0% | 33.9% | 50% |
| Highest share of splits in Team A, any name | 51.0% | 56.1% | 50% |
| First two names in the same team | 43.9% | 33.7% | 44.4% |
| Team sizes | 5 and 5 every time | 5 and 5 every time | 5 and 5 |
With the shortcut, the last name in the list was the one least likely to be in Team A. If you always type the same class list in the same order, the same students would keep ending up together more or less often than chance. With Fisher-Yates, the order you type the names in makes no measurable difference.
How the tool deals names into teams
- After shuffling, names are dealt one at a time: first name to Team 1, second to Team 2, and so on, then back to Team 1. That is why team sizes differ by one name at most.
- When the names do not divide evenly, the first teams get the extra name. With 7 names in 3 teams, Team 1 has 3 names and Teams 2 and 3 have 2. Since the order is shuffled first, who gets the extra place is still random.
- The Shuffle player order box is ticked by default. If you untick it, names are dealt in the order you typed them, which is useful only if you have already sorted them yourself, for example by skill level.
Limits
- This check covers the shuffle and dealing code, run outside the page with the same random function. It does not test the page layout or the copy button.
- The tool uses the browser’s Math.random, which is fine for classroom and game teams but is not designed for security. See pseudo-random vs true random.
- Random teams ignore skill, friendships and who should be kept apart. If balance matters, sort players into levels first and split each level separately.




