Random team generator
Paste the names, choose how many teams or how many people in each, and get random teams whose sizes differ by at most one.
How the teams are made
The generator puts the names in a random order with a Fisher–Yates shuffle, the same one used by the list randomizer, and then deals them out like cards: the first name to Team 1, the second to Team 2, and round again until every name is placed. Because the order is random, so is every team.
Dealing in turn keeps the sizes as even as they can be. With N people and T teams, every team gets N ÷ T rounded down, and the remainder, if any, gives one extra person to each of the first teams. When you ask for a team size instead, the generator first works out the number of teams, N ÷ size rounded up, and then deals the same way, so no team is larger than the size you asked for and none is more than one smaller.
| People | You ask for | Teams made |
|---|---|---|
| 10 | 3 teams | 4, 3 and 3 |
| 10 | Teams of 3 | 4 teams: 3, 3, 2 and 2 |
| 10 | Teams of 4 | 3 teams: 4, 3 and 3 |
| 11 | 2 teams | 6 and 5 |
| 23 | Teams of 5 | 5 teams: 5, 5, 5, 4 and 4 |
| 30 | Teams of 7 | 5 teams of 6 |
How many ways a group can be split
The number of different splits comes from counting the orders of the names and removing the ones that give the same teams. With team sizes s1, s2 and so on, the number of splits into numbered teams is a multinomial coefficient. If the teams are interchangeable, as they usually are, divide again by the number of ways to reorder teams of the same size.
numbered= N! ÷ (s1! × s2! × … × sT!)12 in 3 of 4: 34,650
unnumbered= numbered ÷ (number of equal-sized teams)!34,650 ÷ 3! = 5,775
| People and teams | Sizes | Possible splits | Chance two people share a team |
|---|---|---|---|
| 8 into 2 | 4 and 4 | 35 | 42.9% |
| 10 into 2 | 5 and 5 | 126 | 44.4% |
| 10 into 3 | 4, 3 and 3 | 2,100 | 26.7% |
| 12 into 3 | 4, 4 and 4 | 5,775 | 27.3% |
| 12 into 4 | 3, 3, 3 and 3 | 15,400 | 18.2% |
| 20 into 2 | 10 and 10 | 92,378 | 47.4% |
| 20 into 4 | 5 each | 488,864,376 | 21.1% |
| 30 into 3 | 10 each | 925,166,131,890 | 31.0% |
The last column is the chance that two particular people, say two friends, end up together. Fix one of them; the other is equally likely to take any of the remaining N − 1 places, and the number of those places in the first person’s team is that team’s size minus one. Averaged over the teams, that gives Σ s(s − 1) ÷ (N(N − 1)), which for two equal teams is always a little under a half.
Fair teams and random teams
A random split is fair in the sense that nobody chooses who goes where, but it doesn’t make the teams equally strong. In small teams, chance alone can put several of the strongest players together, and nothing in the method prevents it. If balance matters more than chance, add some structure before the random part:
Seeded teams. Pick as many captains, or strongest players, as there are teams, split them into that many teams so each gets one, then split everyone else the same number of ways and join Team 1 to Team 1, Team 2 to Team 2 and so on.
Tiers. Divide the names into groups by level, split each group into the same number of teams, and combine the teams with the same number. Each team then gets a share of every level.
Fixed teams. Keep the same teams for a fixed time, such as a term or a tournament, rather than reshuffling until the teams look right, which turns a random split into a chosen one.
To decide which team starts or which side each team takes, a coin flip or the name picker with the team names as entries does the job.
Questions
How are the team sizes decided?
As evenly as possible. With 10 people in 3 teams, each team gets 3 and the one person left over goes to Team 1, giving 4, 3 and 3. With “People per team”, the generator uses as few teams as it can without any team going over the size you set, so 10 people in teams of 3 become four teams of 3, 3, 2 and 2 instead of three teams of 3 and one person on their own.
Is every split equally likely?
Yes. The names are shuffled with the Fisher–Yates method, which makes every order equally likely, and then dealt round the teams in turn. Each possible set of teams comes from the same number of orders, so every split has the same chance.
Can I balance the teams by skill?
Not with a random split alone, which ignores everything but the names. A common approach is to choose captains or rank the strongest players first, give one to each team, and split the rest at random. With this tool, split the captains into as many teams as you need, split everyone else the same way, and join Team 1 to Team 1 and so on.
Why is Team 1 sometimes bigger than the others?
When the names don’t divide evenly, the extra people go to the first teams, because the names are dealt starting from Team 1. Who ends up in Team 1 is random, so being in a larger team is down to the shuffle, not the position in your list.
Are the names sent anywhere?
No. The split happens in your browser and the names stay in the text box on your device. The address bar keeps only the settings, such as the number of teams, so a shared link opens with the example names.