What this tool does
The Random Team Generator splits a roster of people into a chosen number of teams as evenly as possible. After a random shuffle of names, the list is partitioned into groups: some groups hold the larger size and the rest hold the smaller size, so no team is ever more than one person bigger than another.
How to use it
Paste the names, one per line. Choose Number of teams or People per team and the number; the line under the result shows the plan before you start, for example how many teams and the smallest and largest team size. Press Make teams or the Space bar: the teams appear at once, each one listed with its people, and their sizes never differ by more than one.
To keep strong players apart, add " *1" after the strongest, " *2" after the next group and so on, then tick Balance by tier: every team gets the same number of each tier, give or take one, and the order inside each tier is random. Copy result copies the teams as text, Full screen shows them to the room, and Copy link shares the list and the options. Press the button again for a new split.
How fair is the draw?
Every result comes from crypto.getRandomValues, the cryptographic random generator built into your browser. The tool turns those numbers into an outcome with rejection sampling, so no outcome gets an extra chance from a leftover remainder, and the animation only replays a result that was decided before it started. Nothing is sent to our server.
Random does not mean even in the short run: in ten coin flips, seven heads or more happens about one time in six. Over many draws the counts settle near the stated chances. The tool cannot prove to someone else that you did not draw again, so for a prize draw, draw in front of the people taking part.
The formula explained
For n people and g groups, the smallest group size is \(\left\lfloor n/g \right\rfloor\) and the largest is \(\left\lceil n/g \right\rceil\). The remainder \(r = n \bmod g\) tells you how many groups receive one extra person. Those \(r\) groups are the larger ones; the remaining \(g - r\) groups are smaller. When n divides g evenly, the remainder is 0 and every group is the same size.
$$\begin{gathered} \text{Min Size} = \left\lfloor \frac{\text{People}}{\text{Groups}} \right\rfloor, \quad \text{Max Size} = \left\lceil \frac{\text{People}}{\text{Groups}} \right\rceil \\[1.5em] \text{where}\quad \left\{ \begin{aligned} \text{Larger Groups} &= \text{People} \bmod \text{Groups} \\ \text{Smaller Groups} &= \text{Groups} - \left(\text{People} \bmod \text{Groups}\right) \end{aligned} \right. \end{gathered}$$
Worked example
Split 23 people into 4 groups. \(\left\lfloor 23/4 \right\rfloor = 5\) and \(\left\lceil 23/4 \right\rceil = 6\), so groups hold 5 or 6 people. The remainder is \(23 \bmod 4 = 3\), so 3 groups have 6 people and 1 group has 5 people. Check:
$$3\times6 + 1\times5 = 18 + 5 = 23 \checkmark$$
Team Size Scenarios for Common Group Splits
Each row applies the same rules: minimum size = floor(People ÷ Groups), maximum size = ceiling(People ÷ Groups), larger groups = People mod Groups, and smaller groups = Groups − (People mod Groups). When the split is even, every team has the same size, so the "larger" count is 0 and all teams are counted as the smaller (equal) size.
| People | Groups | Min size | Max size | Larger groups (count) | Smaller groups (count) |
|---|---|---|---|---|---|
| 20 | 4 | 5 | 5 | 0 | 4 |
| 23 | 4 | 5 | 6 | 3 | 1 |
| 30 | 7 | 4 | 5 | 2 | 5 |
| 25 | 6 | 4 | 5 | 1 | 5 |
| 10 | 3 | 3 | 4 | 1 | 2 |
| 12 | 5 | 2 | 3 | 2 | 3 |
Check any row: larger count × max size + smaller count × min size = People. For 30 into 7: 2 × 5 + 5 × 4 = 30.
How to Split Teams by Hand
Example: split 23 people into 4 teams.
- Divide people by groups: \(23 \div 4 = 5.75\).
- Take the floor as the minimum size: \(\lfloor 23/4 \rfloor = 5\). The maximum size is the ceiling, 6.
- Compute the remainder with mod: \(23 \bmod 4 = 3\).
- Give one extra member to that many groups: 3 groups get 6 people (larger groups: 3), and the remaining \(4 - 3 = 1\) group keeps 5 people.
- Verify the total: \(3 \times 6 + 1 \times 5 = 18 + 5 = 23\). ✔
- Shuffle and deal: Randomize the order of names (draw from a hat, or give each person a random number and sort by it). Then deal people out in order, filling the larger teams first or dealing one at a time in rotation, until everyone is placed.
Practical Tips for Forming Teams
- Prefer an even split when possible. If you can choose the number of groups, pick one that divides the headcount evenly (for example 24 people into 3, 4, 6 or 8 teams).
- Avoid lone members. If one person is left over, let one team be one person larger instead of creating a single-person team. The formula does this automatically.
- Plan for absences. If people may not show up, leave a spare slot or re-run the split on the day with the actual attendance count.
- Re-shuffle for a fresh split. For repeated activities, draw new random assignments each time so people work with different teammates. Team sizes stay the same; only the membership changes.
- Start from a desired team size. Number of groups ≈ People ÷ desired size, rounded to the nearest whole number. For 23 people and teams of about 5: \(23 \div 5 = 4.6\), which rounds to 5 groups, giving 3 teams of 5 and 2 teams of 4 (3 × 5 + 2 × 4 = 23).
- Keep sizes within one person. Balanced teams differ by at most one member, which keeps the activity fair. Larger gaps usually mean the group count should change.
FAQ
Are the teams always equal? Only when people divides evenly by groups. Otherwise sizes differ by at most one person.
What if I ask for more groups than people? The number of groups is capped at the number of people, so each group has at least one member.
Is the assignment random? The model shuffles names first, then partitions sequentially, so membership is randomized while sizes stay balanced.