Behind the groups

How to make balanced groups

A balanced group is balanced against a particular measure. Equal headcounts, similar experience totals and a spread of roles are different goals. Start by deciding what matters for the activity rather than assuming that one arrangement is best for every class.

1. Start with the people who are actually taking part

Use the random group generator to paste one name per line. Confirm the detected list before you generate. Blank lines are ignored and exact duplicate names are removed. If two people share a name, add an initial or another identifier to both. Names are identifiers, not a source of ability or demographic information.

Choose a number of groups, or a maximum number of people per group. With ten people and three groups, the sizes are four, three and three. With ten people and a maximum of four, the result also uses three groups. All people are assigned exactly once, and group sizes differ by at most one.

2. Add a consistent ability scale, only if it helps

Open the optional rules and edit each person’s level in the table. The interface accepts levels one through five. These are your ratings for the current activity, not test scores, diagnoses or permanent labels. Every person starts at three; leaving all values unchanged gives the solver no ability differences to work with.

For an activity with six people rated 1, 2, 2, 3, 4 and 4, three groups of two can each total 5 or 6: 4 + 1, 4 + 2, and 3 + 2. The total is sixteen, so equal integer totals across three groups are impossible. A range of one is already the smallest possible here. The tool reports the totals, allowing you to judge the result instead of hiding the mismatch.

Ability balance minimizes the range between the largest and smallest group total. It does not minimize average ability. When groups have different headcounts, this distinction matters.

3. Use tags to spread a role or category

Each person can have one optional tag, such as facilitator or reader. Tags are exact, case-sensitive text: Reader and reader are different categories. An empty tag is ignored in the tag metric. The target is for each tag’s count to differ by no more than one between groups, but restrictions can prevent that.

The tool sums the count ranges across all tags when comparing arrangements. If you enable both balancing options, ability range takes priority. Tag distribution can improve when it does not worsen that ability range. This priority avoids cycling between improvements that undo each other, but may leave a less even tag distribution than a tag-only run would produce.

4. Separate requirements from preferences

A keep-apart pair is a requirement. Enter two exact names with / between them, one pair per line. Every successful arrangement must respect all entered pairs as well as the group-size rule. Ability and tag balance never override those requirements.

Some combinations cannot work. If Alex, Bailey and Casey must all stay separate, two groups are not enough. Other cases fail because of size: with six people and two groups of three, someone who conflicts with all five others cannot be placed alone in a group.

What the algorithm actually does

Without balancing or exclusions, the tool uses Fisher–Yates to shuffle the roster. Random values come from the browser’s crypto.getRandomValues; the resulting order is distributed into groups. It does not record previous draws, so repeated groups are possible.

For ability balance, it sorts by descending level and deals back and forth: first group to last, then last to first. This snake arrangement is a starting point. Pair swaps between groups are accepted when they improve the selected metrics without breaking a hard rule. The process stops when a complete pass finds no improving swap, or the time budget runs out. A local optimum is not necessarily the global optimum; the tool does not promise one.

With keep-apart pairs, a backtracking search first finds a valid arrangement. It chooses people with the fewest remaining group options, breaks ties using conflict counts, and skips equivalent empty groups of the same capacity. Balance swaps then improve that valid result. Constrained arrangements are not uniformly random across all possible solutions.

The search and improvement stage has a 300 millisecond budget and runs in a browser Worker to keep the interface responsive. There are three search outcomes: a valid arrangement, a fully explored search that proves no arrangement exists, or a timeout before a solution is found. A timeout never means “impossible.” If a valid arrangement was already found before improvement ran out of time, it is shown with a time-limit note.

Check the result in context

Read the actual totals and tag counts, then consider the activity and the people involved. The tool cannot evaluate friendships, participation, accessibility or learning outcomes. No classroom research claim or outcome guarantee is attached to these arrangements.

For a two-person activity, the pairing generator makes one trio when the count is odd. For practice or a game, the team generator can assign random captains. The seating chart uses a separate rectangular-grid shuffle and does not apply group balance rules.

Your names and attributes are processed on this device. Saving a class is optional and uses browser local storage; see privacy for deletion and shared-device details.