Random team generator
Paste a list, say how many teams you need, and get an even split with nobody left picking last. The groups come out within one person of each other in size, whatever the numbers divide into.
Why the sizes come out even
The list is shuffled once and then dealt round-robin, like a pack of cards: first person to team one, second to team two, and back to the start. Dealing is what makes the sizes differ by at most one. The obvious alternative — shuffle, then cut the list into equal chunks — piles the whole remainder onto the last group, so twenty-two people in five teams comes out 4/4/4/4/6 instead of 5/5/4/4/4.
The shuffle itself is a Fisher-Yates shuffle, which visits each position once and is provably unbiased. The version most tools ship is sort(() => Math.random() - 0.5), which is not a shuffle at all: its output depends on the sorting algorithm underneath and is measurably skewed towards leaving items near where they started. On a list of eight names you can see it happen.
Teams of a size, versus a number of teams
These are different questions and people mix them up constantly. "Four teams" from a class of twenty-six gives you groups of seven, seven, six and six. "Teams of four" from the same class gives you six groups of four and one of two, which is usually not what anybody wanted either.
This tool asks for the number of teams, because that is the number a room usually has a real constraint on — four tables, three laptops, two goals. If you need a specific team size, divide first: twenty-six people in groups of about four is seven teams, and asking for seven teams gets you sizes of four and three rather than a stranded pair.
The captain problem
Splitting randomly solves the wrong half of team selection for a lot of groups. It is genuinely fair, and fairness is not always the goal — a mixed-ability group, a deliberate split of people who never work together, or keeping two children apart are all reasonable overrides that no shuffle will produce on purpose.
The workable pattern is to generate the split, then move one or two people by hand and say out loud that you did. That keeps the useful property of random assignment — nobody was chosen last in front of the room — while letting you fix the two placements you actually cared about.
For the opposite case, where the split needs to be defensible rather than convenient, generate it in front of the group and do not regenerate. A second roll after seeing the first is the single fastest way to lose a room's belief that any of it was random.
A worked split, and some awkward numbers
These 16 names dealt into three teams, produced by running the real splitter against a fixed seed so the example on the page is genuine output rather than something typed to look right.
Team 1 — 6 people
- Maya
- Noor
- Iris
- Dev
- Hugo
- Grace
Team 2 — 5 people
- Priya
- Kaya
- Elif
- Chloe
- Ben
Team 3 — 5 people
- Liam
- Omar
- Amara
- Jonah
- Finn
The sizes below are what dealing round-robin gives you for the class sizes that do not divide neatly. Nothing is ever more than one person larger than anything else.
| People | Teams | Sizes |
|---|---|---|
| 22 | 5 | 5 / 5 / 4 / 4 / 4 |
| 26 | 4 | 7 / 7 / 6 / 6 |
| 30 | 6 | 5 / 5 / 5 / 5 / 5 / 5 |
| 31 | 4 | 8 / 8 / 8 / 7 |
Common questions
How do I split a class into random groups?
Paste the names one per line, set the number of teams, and press Make teams. The list is shuffled and dealt out round-robin, so the groups come out within one person of each other in size.
Are the teams the same size?
As close as the arithmetic allows. Sixteen people in three teams gives six, five and five — the sizes never differ by more than one, because the names are dealt out one at a time rather than sliced into blocks.
Can I generate teams again if I do not like the split?
Yes, pressing the button again produces a fresh split. Worth knowing that re-rolling until a group looks right is no longer a random assignment, and a room watching will notice — if the split needs to be defensible, run it once in front of them.