The short answer
Number of groups = class size ÷ group size, rounded down; the leftover students join existing groups. 26 students in groups of 4 gives 6 groups: four of 4 and two of 5. If you’d rather keep groups small, choose “put extras in a smaller group” and you get six groups of 4 plus one pair. The order is shuffled with an unbiased Fisher–Yates shuffle, so every arrangement is equally likely — and the names you type stay on your device.Choosing groups by hand takes time and invites the question every teacher knows: “Why am I always with them?” A random generator answers it for you — the computer picked, and it picked fairly. This one also handles the awkward parts: uneven numbers, students who shouldn’t work together, and getting everyone to look at the same screen.
How the groups are made
The tool shuffles the whole list, then cuts it into groups of the sizes you asked for. There are two ways to set the size:
- Students per group. Number of groups = class size ÷ group size, rounded down. With 26 students in groups of 4, that’s 6 groups.
- Number of groups. The class is split as evenly as possible: each group gets class size ÷ groups (rounded down), and the remainder adds one extra student to the first few groups. 26 students in 5 groups gives 6, 5, 5, 5, 5 — sizes never differ by more than one.
The shuffle is the Fisher–Yates algorithm driven by your browser’s cryptographic random generator, with a correction that removes the small bias a naive “random number modulo n” would add. In plain terms: every possible order of your class is equally likely, so no seat on the list is lucky or unlucky.
When the numbers don’t divide evenly
Here is what each leftover setting does with groups of 4:
| Class size | Balance (extras join groups) | Smaller group for extras |
|---|---|---|
| 22 | 3 groups of 4 + 2 groups of 5 | 5 groups of 4 + 1 of 2 |
| 23 | 2 groups of 4 + 3 groups of 5 | 5 groups of 4 + 1 of 3 |
| 25 | 5 groups of 4 + 1 group of 5 | 6 groups of 4 + 1 of 1 |
| 26 | 4 groups of 4 + 2 groups of 5 | 6 groups of 4 + 1 of 2 |
| 27 | 3 groups of 4 + 3 groups of 5 | 6 groups of 4 + 1 of 3 |
| 30 | 5 groups of 4 + 2 groups of 5 | 7 groups of 4 + 1 of 2 |
Balance is usually the better default: a group of one isn’t a group. “Smaller group” makes sense when the task needs a fixed size — four roles, four stations — and you plan to join the leftover pair to another group yourself or work with them directly.
How many groups will a class of 20 to 32 make?
Most teachers think in group sizes (“groups of 3”), so the quickest way to plan is to know what the classroom group maker will return before you press Shuffle. The table uses Students per group with the default Balance setting: number of groups = class size ÷ group size, rounded down, then leftover students are spread one at a time across groups.
Balanced splits by class size and chosen group size (Students per group mode)
| Class size | Groups of 2 | Groups of 3 | Groups of 4 | Groups of 5 |
|---|---|---|---|---|
| 20 | 10 of 2 | 4 of 3 + 2 of 4 | 5 of 4 | 4 of 5 |
| 24 | 12 of 2 | 8 of 3 | 6 of 4 | 4 of 6 |
| 25 | 11 of 2 + 1 of 3 | 7 of 3 + 1 of 4 | 5 of 4 + 1 of 5 | 5 of 5 |
| 28 | 14 of 2 | 8 of 3 + 1 of 4 | 7 of 4 | 2 of 5 + 3 of 6 |
| 30 | 15 of 2 | 10 of 3 | 5 of 4 + 2 of 5 | 6 of 5 |
| 32 | 16 of 2 | 8 of 3 + 2 of 4 | 8 of 4 | 4 of 5 + 2 of 6 |
Notice the groups-of-5 column: 24 students ÷ 5 rounds down to 4 groups, and the 4 leftover students turn every group into a 6. When that happens, switch to Number of groups and type 5 instead. You get 5, 5, 5, 5, 4, which is closer to what you meant.
After the groups are set, a few routines help: pick a student at random to report for each group, place the groups with the seating chart maker, and browse the other classroom management tools for timers and grading.
Keep-apart pairs without losing fairness
Some pairs simply don’t work: best friends who chat, two students in a conflict, or two strong readers you want spread across groups. Type each pair on a line, like Ava, Ben.
The tool doesn’t swap names around afterward, because that would quietly make some outcomes more likely than others. Instead it reshuffles until no pair shares a group and keeps the first arrangement that passes. Every valid arrangement is still equally likely.
How often does a pair land together by chance? With 24 students in 6 groups of 4, once Ava is placed, 3 of the remaining 23 spots are in her group, so the chance Ben joins her is 3 ÷ 23 ≈ 13%. A rule for a few pairs rarely needs more than a handful of reshuffles. If your rules can’t all be met (too many pairs for too few groups), the result line says how many pairs are still together.
Roles that keep groups working
Tick Assign roles and each group gets roles in the order you list them — by default Leader, Recorder, Timekeeper and Reporter. Because each group’s members are already in random order, the roles land randomly too. Groups larger than the role list get plain members; smaller groups skip the last roles, so put the most important role first.
A short role card on the board helps:
- Leader — keeps everyone on the task and makes sure each person speaks.
- Recorder — writes down the group’s answers or notes.
- Timekeeper — watches the clock; pair this with the classroom timer on the board.
- Reporter — shares the group’s answer with the class.
Rotating roles each time you regroup gives quieter students a turn at Leader and Reporter without you having to assign it publicly.
Showing groups to the class
Press Full screen and the group cards expand for the projector, each with its own colored top bar so students can find “the green group” quickly. Re-shuffle works in full screen as well.
When you need a record, Copy groups puts plain text on the clipboard (one line per group, ready to paste into your LMS or an email to a co-teacher), Download CSV gives a spreadsheet with group, name and role, and Print groups prints just the cards. Nothing about the groups is added to the page address, so a shared link only carries settings like the group size — never names.
Classroom tips for random groups
- Say why it’s random. “The computer picks so it’s fair for everyone” ends most complaints before they start.
- Regroup on a rhythm. New groups for each unit, or every couple of weeks, gives students a chance to work with most of the class.
- Mix random with purpose. Use keep-apart pairs to spread support, then let chance do the rest. If you need fully hand-built groups, random groups are still a useful first draft to adjust.
- Save each period. Save your lists as “Period 1”, “Period 2” and so on. The same lists appear in the random name picker for cold-calling and the seating chart maker for desks.
- Pair group work with clear scoring. A simple rubric tells groups what a strong result looks like before they begin.
Frequently asked questions
Is the random group generator really random?
How do I keep two students out of the same group?
What happens when the class doesn't divide evenly?
Are my students' names saved or uploaded?
Can I show the groups on the projector?
Can I make groups without typing names?
How do I make groups of 3 from 28 students?
Can I generate balanced groups?
Can I save groups for later?
Sources & method
- Shuffle: Fisher–Yates (Durstenfeld) algorithm — R. Durstenfeld, “Algorithm 235: Random permutation”, Communications of the ACM, 1964; also described by D. Knuth, The Art of Computer Programming, Vol. 2.
- Randomness: MDN — Crypto.getRandomValues() (“cryptographically strong random values”).
- Group sizes and probabilities on this page are computed directly; no survey data is used.
Formulas checked October 2026. Spotted an error? Tell us via the about page.
