Calculates on this device. File exports run online.
Latin Square Generator
Choose the size and press Make for random Latin squares: every symbol once in each row and each column. You can also make a Graeco-Latin pair, puzzles with exactly one answer, or check a square you type.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Make.
Your result
How it was worked out
How to use it
- Choose Latin squares, the size and the form: any, with the first row in order, or reduced (first row and first column in order).
- Choose numbers, letters or your own symbols (such as colours or treatments of an experiment).
- Press Make. The seed is shown: type it again under More options to make the same squares.
- Print the squares, save them as pictures, or download a document in the boxes below.
Graeco-Latin squares
Two Latin squares are orthogonal when, laid over each other, every ordered pair of symbols appears exactly once. Such pairs exist for every order above 1 except 2 and 6; for order 6 none exists, as Tarry showed in 1901 by trying every case (Wikipedia, "Graeco-Latin square", read 2026-10-29). The page builds pairs for odd orders, for 4, 8 and 12, and finds one for order 10 by a search; every pair is checked before it is shown.
Puzzles and checking
- A Latin square puzzle has blanks to fill so that each row and column holds every symbol once. The page keeps a blank only while the answer stays the only one: a search counts the ways to complete it and stops at 2.
- Check a square tells you if a square is a Latin square and which form it has, or, with blanks, whether it has no, exactly one or more than one completion.
Good to know
The random squares are the first ones a search finds when it tries the symbols in an order shuffled by the seed: every Latin square can come out, but not all equally often. For an experiment design, check that this kind of randomness is what you need.