Balanced random grouping
The tool shuffles the list and deals members round-robin, so groups stay within ±1 member of each other — no 7-person group next to a 2-person group. With number of groups mode, sizes are as even as the list allows; with members per group, the last group may be smaller.
Exclusions
Each line declares a pair that must not share a group (Alice, Bob). The algorithm retries up to 50 times to place everyone legally; if no valid arrangement exists, it reports the conflict pairs it couldn't avoid. Exclusions only enforce separation; there is no dedicated "keep together" mode. For pairing people, just use groups of 2.
Teacher tips
- Mix strong and weak students: shuffle once, then eyeball — or re-shuffle until the spread looks fair.
- Lab partners: groups of 2 with exclusions for chatty pairs works well.
- Repeatable randomness: screenshot the result or note the order — re-shuffling gives a new arrangement.
- Pairs with the Seating Chart Maker for the full classroom-organisation kit.
How the calculation works
shuffle() implements Fisher–Yates: starting from the end, each element swaps with a randomly chosen earlier position, which gives every permutation equal probability. That matters because the naive "sort by random comparator" approach produces a biased distribution. randInt() picks the indices, and after shuffling the list is sliced in order into the number of groups or the group size you asked for.
Where the formula stops applying
The randomness comes from Math.random(), which is fine for splitting a class or picking teams but is not cryptographically secure — for a prize draw with money attached, use a CSPRNG. Results are not reproducible, since there is no seed. Group sizes cannot always be equal: 23 people into four groups gives three groups of six and one of five. Balanced assignment by gender, ability or friendship constraints is a different algorithm.
Privacy: your figures stay in the browser
Names are shuffled in memory on your device; nothing is uploaded and the result disappears when the tab closes.
Frequently asked questions
Can I reproduce the same groups?
No. There is no seed, so each shuffle differs. Export the result if you need a record.
Why are the group sizes uneven?
Because the count does not divide evenly. The remainder is distributed as an extra member in the first groups.
Can it balance groups by gender or skill?
No. This is pure randomisation; constrained assignment needs a different method.