How to keep pupils apart in a seating plan, and why random seating works

What counts as sitting next to someone, how often two pupils land together by chance, why trying hundreds of random layouts works, and who sits at the front.

Open the Classroom seating plan Free, in your browser, nothing uploaded.

Every teacher knows the pairs who cannot sit together. A good seating plan keeps them apart, puts the pupils who need the board at the front, and still feels fair to the class. This article explains what “next to” means on a grid of desks, how often two pupils land together by pure chance, and why a computer that tries hundreds of random layouts almost always finds one that works. It is for teachers, tutors, exam invigilators and anyone running a room of desks. To split the same class into working teams, use the group maker; to time the activity once everyone is seated, run the countdown timer; and to mark the work afterwards, build a marking rubric.

What it is

The plan is a grid: rows of desks from the front of the room, with a number of desks in each row. A desk has up to eight neighbours: left, right, in front, behind and the four diagonals. A pupil in a corner has only three, at the edge five, in the middle eight. Two pupils “sit next to each other” if either is one of the other’s eight neighbours, because diagonal neighbours can talk and copy just as easily.

How likely is a pair to land together if you seat everyone at random? On a grid of 4 rows of 6 desks, the 24 desks have 5.67 neighbours on average. Seat one pupil anywhere; the other can be in any of the 23 remaining desks, and on average 5.67 of those are neighbours:

chance a pair sits together ≈ average neighbours ÷ (desks − 1) = 5.67 ÷ 23 ≈ 25%

So one pair is together in about one shuffle in four. With several pairs the chances multiply, so a single shuffle that keeps every pair apart gets rarer: roughly 0.75 × 0.75 × 0.75 ≈ 42% for three pairs.

That is why the tool does not trust one shuffle. Random tries up to 400 shuffles and keeps the first one with no pair together (or, if none exists, the one with the fewest). The front row names go into the front desks first, in random order, and the empty desks, if any, are spread around the room rather than all left at the back.

How to use it

  1. Paste your Class list, one name per line (commas also work). Repeated names get (2), (3).
  2. Set Rows of desks and Desks in each row.
  3. Under Keep apart, type one pair per line, such as “Asha - Ben”, “Asha & Ben” or “Asha and Ben”.
  4. Under Front row, list pupils who need to sit at the front.
  5. Press Random or A to Z. Pairs that end up together are outlined in red.
  6. Tap one desk, then another, to swap or move pupils (or drag on a computer). Then Print, Download CSV or Copy result.

A worked example

A class of 24 sits in 4 rows of 6 desks. The teacher adds three pairs, Ethan - Owen, Hugo & Sami and Bella and Rosa, and puts Isla and Wen in the front row.

  • A to Z seats Isla and Wen first, then fills the rest row by row: Aarav, Bella, Carlos, Dina, and so on. Here none of the three pairs happens to touch, so nothing is outlined.
  • Random shuffles. With three pairs, a single shuffle keeps all of them apart a bit under half the time, so the tool usually finds a good plan within the first few tries. In our run Isla and Wen sat in row 1, and Ethan and Owen, Hugo and Sami, and Bella and Rosa each ended at least two desks apart.
  • If 30 names were pasted into these 24 desks, six would be listed as not seated until a row is added.

Checked with the tools

scripts/blog-figures/classroom-seating-plan-guide.mjs runs the tool’s own functions (parseNames, parsePairs, arrange and conflicts in src/lib/classroom-seating-plan.ts) in Node with a fixed random seed, so the results can be repeated. It gave the worked example above. The chart then measures, for 0 to 12 keep-apart pairs on the same 4 × 6 grid, how often one random shuffle keeps every pair apart, and how often the tool’s Random button does. One shuffle succeeds less and less as pairs are added; the button, with its 400 tries, kept every pair apart in every run up to 12 pairs.

Keeping pairs apart on 4 rows of 6 desksKeeping pairs apart on 4 rows of 6 desks020406080100024681012Keep-apart pairsPlans with every pair apart (%)Random button (up to 400 tries)One random shufflefibub.com
For 0 to 12 keep-apart pairs chosen at random from 24 pupils on 4 rows of 6 desks: the share of single shuffles (2,000 each) and of Random button plans (200 each) with no pair in neighbouring desks, diagonals included. Worked out with the tool's own functions and a fixed seed.

Where it is used

  • Classrooms: a fresh plan each half term mixes friendships while keeping known problem pairs apart.
  • Exams and tests: invigilators keep friends or siblings off neighbouring desks, diagonals included.
  • Training rooms and workshops: mixing teams from different departments.
  • Supply teachers: a printed plan with names on desks makes learning a new class much faster.

Common mistakes

  • Only checking side by side. Pupils behind and diagonally can talk and copy too. The tool checks all eight neighbours.
  • Too many pairs for the room. In a full, small room some layouts cannot keep everyone apart. Add a row with spare desks, or move one pupil by hand.
  • Spelling a name differently in the pair list. “Sam - Ben” will not match “Samuel”. The tool lists any names it cannot find.
  • Putting every quiet pupil at the front. The front row is for pupils who need to see or hear the board, or to be near you.

Questions people ask

Is random seating fair? Pupils usually accept it more easily than a teacher’s choice, because nobody picked them. Keep-apart pairs and front-row names stay private to your screen.

How often should I change the plan? Many teachers change it every half term or after a test, which keeps pairs from settling in.

Can I keep the plan for next lesson? Tick “Remember my class on this device”. It stays in this browser only, and the Clear button removes it.

Sources

  • No outside data: the plan is worked out from the class list, rows, columns, keep-apart pairs and front-row names you type. Seating advice in this article is general classroom practice, not a published standard.

If you are an author or publisher and want a credit or a passage changed or removed, tell us and we will act quickly.

Tools in this article

Read next