Puzzle Maker Online

Sudoku Rules: The Complete Guide to a Legal Grid

Sudoku Rules: The Complete Guide to a Legal Grid

The sudoku rules fit in one sentence: fill the 9×9 grid so that every row, every column, and every 3×3 box contains each of the digits 1 through 9 exactly once. That's it. Everything else you have ever read about sudoku — crosshatching, pencil marks, X-Wings, difficulty ratings — is technique built on top of that one constraint, not part of it.

This page is the reference version. It covers the rule itself, the anatomy of the grid it applies to, what makes a puzzle legal as opposed to merely filled in, and the half-dozen things people believe are rules but aren't. If you want the solving side instead, that lives in our guide to sudoku strategy, and the absolute-beginner walkthrough is how to play sudoku.

The one rule, stated properly

Every group of nine cells that the puzzle defines as a unit must contain the digits 1–9, each exactly once.

There are 27 such units on a standard board: 9 rows, 9 columns, and 9 boxes. That's the whole rulebook, phrased three times:

  1. Rows. Each of the 9 horizontal lines holds 1–9, once each.
  2. Columns. Each of the 9 vertical lines holds 1–9, once each.
  3. Boxes. Each of the 9 heavily outlined 3×3 blocks holds 1–9, once each.

Notice what the rule never mentions: addition, subtraction, order, adjacency, or the diagonals. The digits are labels. You could play the identical puzzle with nine colors, nine letters, or nine animal stickers and nothing about the logic would change. A "5" is not bigger than a "3" as far as the rules are concerned — it is simply a different symbol.

Because each unit must hold nine different digits in nine cells, a second phrasing is equivalent and sometimes more useful when you're solving: no digit may repeat inside a row, a column, or a box. Every deduction in sudoku is ultimately an application of that sentence.

The anatomy of the grid

Before the rules can be applied precisely, the vocabulary has to be precise too.

Term What it is How many Constraint
Cell One square 81 Holds exactly one digit when finished
Row A horizontal line of 9 cells 9 Digits 1–9, once each
Column A vertical line of 9 cells 9 Digits 1–9, once each
Box A 3×3 block with a bold border 9 Digits 1–9, once each
Unit Any row, column, or box 27 The rule applies to every one
Given (clue) A digit printed at the start Usually 22–35 Never changes
Peer A cell sharing a unit with another 20 per cell Cannot hold the same digit
Candidate A digit still legal in an empty cell Varies A note, not a rule

That "20 peers" figure is worth internalizing. Any cell shares its row with 8 others, its column with 8 others, and its box with 8 others — but four of the box cells are already counted in the row and column, so the true count is 8 + 8 + 4 = 20. When you place a digit, you have just constrained twenty other cells.

Reading grid positions

Throughout this site, RxCy means row x, column y. Rows are numbered 1–9 from the top; columns 1–9 from the left. R5C4 is the fourth cell along row five. Boxes are numbered 1–9 left to right, top to bottom, so box 1 is the top-left block and box 9 is the bottom-right. The notation isn't part of the sudoku rules — it's just how solvers point at a square without waving at a screen.

What the sudoku rules do not say

More confusion comes from imagined rules than from the real one. Here is the honest list.

What makes a sudoku puzzle valid

A grid can obey all three constraints and still be a bad puzzle. Validity has two separate requirements, and only the first is about the sudoku rules themselves.

Requirement one: the completed grid is legal. Every row, column, and box holds 1–9 exactly once. A legal completed grid is sometimes called a sudoku solution grid, and it's what a generator builds first.

Requirement two: the puzzle has exactly one solution. This is the part that separates a real puzzle from a pile of digits. If two different legal completions exist, the puzzle is broken — not hard, broken — because at some point you would be forced to pick between them arbitrarily.

A worked example of a broken puzzle

Uniqueness fails in a specific, checkable way. Take this completed, entirely legal grid:

2 4 9 | 3 6 8 | 7 1 5 3 5 6 | 9 7 1 | 8 2 4 7 8 1 | 5 4 2 | 6 3 9 ------+-------+------ 5 1 2 | 7 8 3 | 4 9 6 8 7 4 | 6 2 9 | 1 5 3 6 9 3 | 1 5 4 | 2 7 8 ------+-------+------ 9 6 7 | 4 1 5 | 3 8 2 4 2 5 | 8 3 7 | 9 6 1 1 3 8 | 2 9 6 | 5 4 7

Look at four cells: R1C2 = 4, R1C9 = 5, R2C2 = 5, R2C9 = 4. They form a rectangle across rows 1 and 2, in columns 2 and 9. Those four cells sit in exactly two boxes — box 1 and box 3.

Now swap them diagonally: R1C2 = 5, R1C9 = 4, R2C2 = 4, R2C9 = 5. Check the constraints. Row 1 still has one 4 and one 5. Row 2 still has one of each. Column 2 still has one 4 and one 5, and so does column 9. Box 1 and box 3 each still hold one of each. The swapped grid is also completely legal.

The consequence: if a puzzle leaves all four of those cells empty, it has at least two solutions and is invalid. Solvers call that shape a deadly pattern or an unavoidable set, and it is the reason a generator must test uniqueness rather than just remove clues until the grid looks hard. Our free puzzle maker builds a complete legal grid first and then removes clues only while a uniqueness check still passes, which is what lets it promise that every puzzle can be finished by logic alone.

How few clues are legal?

Seventeen. In 2012, Gary McGuire, Bastian Tugemann and Gilles Civario completed an exhaustive computer search proving that no valid 9×9 sudoku with a unique solution can have only 16 givens. Sixteen-clue puzzles always have multiple solutions. Seventeen-clue puzzles exist in large numbers, and thousands have been catalogued.

The reverse question has no interesting answer — you can leave 77 cells filled and still have an ambiguous puzzle if the four empty ones form a deadly rectangle. Clue count and difficulty are only loosely related, which is a point we come back to in the guide to extreme sudoku.

Facts that fall out of the rules

Because the rule is so tight, some large numbers follow from it exactly.

Quantity Value Source
Legal completed 9×9 grids 6,670,903,752,021,072,936,960 Felgenhauer & Jarvis, 2005
Essentially different grids (after symmetries) 5,472,730,538 Russell & Jarvis, 2006
Minimum clues for a unique solution 17 McGuire, Tugemann & Civario, 2012
Peers of any single cell 20 Direct from the rules
Units on the board 27 9 rows + 9 columns + 9 boxes

The first number looks enormous, and it is, but the second one is the honest measure: many grids are just relabelings, rotations, or reflections of each other. Under those symmetries, roughly 5.5 billion genuinely distinct grids remain.

One more consequence worth knowing: a sudoku solution grid is a Latin square — an n×n array where each symbol appears once per row and column — with one extra constraint bolted on. Every sudoku grid is a Latin square. Very few Latin squares are sudoku grids.

Rule misunderstandings that cost people time

"If I'm stuck, I'm allowed to guess." You're allowed, but a correctly made puzzle never requires it. Being stuck means a deduction is available that you haven't spotted — most often a hidden single, because people scan cells rather than digits. Guessing on a unique puzzle can still land you on the right answer, but you'll have no way to catch a wrong branch until the grid contradicts itself twenty moves later.

"My pencil marks are part of the puzzle." They aren't. Candidates are your notes about what the rules currently permit. If your marks and the grid disagree, the grid wins. Most mid-solve disasters are bookkeeping failures: a digit placed, and the candidate never erased from its peers.

"The puzzle got harder, so I must have gone wrong." Not necessarily. Difficulty is unevenly distributed inside a single grid; a puzzle can open easily and then require a genuinely advanced step. The tell for an actual error is different — a unit with two of the same digit, or a cell with no candidates left at all.

"Every sudoku has the same rules." Every classic sudoku does. Variants change the units, not the underlying idea. Jigsaw sudoku replaces the nine 3×3 boxes with nine irregular shapes, and every deduction that relied on a box being a tidy square has to be relearned. Killer sudoku keeps the boxes and adds cages with target sums. Sudoku X adds the two diagonals as units. In each case, the "1–9 once per unit" rule survives untouched — only the list of units changes.

"A 25-clue puzzle is easier than a 23-clue puzzle." Only on average, and weakly. Which cells are left empty matters far more than how many.

Where the rules end and skill begins

The sudoku rules tell you which grids are legal. They do not tell you how to find the legal one. That is the job of solving technique, and it climbs in a fairly predictable order:

That ladder, and the question of when to climb which rung, is the subject of our sudoku strategy guide. If you are already comfortable with the middle of it, sudoku evil covers the expert tier and extreme sudoku covers what sits above that.

How the Name Is Pronounced, and What It Means

Sudoku is pronounced soo-DOH-koo — three syllables, stress on the middle one, with the first syllable rhyming with "true" rather than "sud." English speakers frequently say "suh-DOH-koo" or add a hard "k" sound at the front, and neither will confuse anyone, but the standard pronunciation follows the Japanese vowels directly: su-do-ku, each syllable given roughly equal length.

The name itself is a shortening. The full Japanese phrase used by the publisher Nikoli translates roughly as "the digits must remain single" or "the numbers are limited to one occurrence" — which is, quite literally, the rule of the puzzle stated as a title. Encyclopedia entries and reference sources generally describe sudoku the same way: a logic-based number-placement puzzle in which a partially filled grid must be completed so that each row, column, and region contains every digit exactly once.

One thing worth knowing about Japanese-published sudoku specifically: Nikoli's puzzles are traditionally constructed by hand rather than generated by software, with symmetrical clue patterns and a deliberately designed solving path. That tradition is why "Japanese sudoku" is sometimes used to mean a hand-crafted puzzle with an elegant logical route rather than a computer-generated grid of a given difficulty rating.

The Highest Number in Sudoku, and Why It Stops There

In standard sudoku, the highest digit is 9, and it stops there for a structural reason rather than an arbitrary one: the grid is 9x9, so each row, column, and box holds exactly nine cells and therefore needs exactly nine distinct symbols. There is no 10, no 0, and no repeated double-digit entry anywhere in a correctly made puzzle.

This is easier to understand once you accept that the digits are not quantities at all — they are simply nine distinguishable labels. Nothing in the rule depends on 9 being larger than 4. You could replace the numbers with nine colors, nine letters, or nine animal stickers and the puzzle would behave identically, which is exactly what happens in letter sudoku and in symbol-based puzzles made for young children.

The symbol count always matches the grid size. A 4x4 grid uses 1 through 4. A 6x6 grid uses 1 through 6. A 16x16 grid needs sixteen distinct symbols, which is why it usually borrows the hexadecimal set — 0 through 9 plus A through F — and is where you will find the only common sudoku format containing a 0. If a puzzle claims to be 9x9 and contains a 0 or a 10, it is either a variant with rules of its own or simply a misprint.

Sudoku Is Not a Magic Square

People often assume sudoku is arithmetic in disguise, usually by confusing it with a magic square. They are genuinely different puzzles. In a magic square, every row, column, and diagonal must add up to the same total, and the challenge is arranging numbers so those sums balance. In sudoku, nothing has to add up to anything — the only requirement is that no symbol repeats within a row, column, or box.

The reason the confusion persists is that a completed sudoku does have a consistent sum by accident: every row, column, and box contains 1 through 9, so each totals 45 every time. That is a side effect of the placement rule, not a rule in its own right, though it is a genuinely useful checking trick — add any completed line, and a total other than 45 proves an error exists.

The nearest real mathematical relative of sudoku is the Latin square, which requires no repeats in any row or column; sudoku simply adds the box constraint on top. If you actively want arithmetic in your grid, the variant you want is killer sudoku, where cages carry target sums and addition genuinely becomes part of the deduction.

Frequently asked questions

What are the rules of sudoku in one sentence?

Fill the 9×9 grid so each row, each column, and each 3×3 box contains the digits 1 through 9 exactly once. There is no arithmetic and no diagonal constraint in classic sudoku, and no digit may repeat within any of those 27 units.

Do the sudoku rules allow the same digit twice in a diagonal?

Yes. The two long diagonals are not units in classic sudoku, so a digit can appear on a diagonal as often as the row, column, and box constraints permit. Only the Sudoku X variant treats the diagonals as units, and it says so explicitly.

Can a sudoku have more than one solution?

A well-made one cannot. Multiple solutions mean the puzzle is invalid, not difficult. The usual cause is a deadly pattern like the four-cell rectangle shown above, where two digits can be swapped diagonally without breaking any constraint. Reputable generators test for uniqueness before publishing a grid.

What is the smallest number of clues a sudoku can have?

Seventeen. A 2012 exhaustive computer search proved that no 16-clue puzzle has a unique solution. Seventeen-clue puzzles do exist and tend to be difficult, though clue count alone is a poor predictor of how hard a grid plays.

Is guessing against the sudoku rules?

Nothing forbids it, but a valid puzzle never needs it. Every step in a properly made sudoku can be justified by the rule that no digit repeats in a unit. If you feel forced to guess, either a deduction has been missed or a candidate was erased in error earlier.

Do the rules change for 6×6 or 16×16 sudoku?

The principle doesn't. For an n×n board, each row, column, and region holds each of the n symbols exactly once. A 6×6 uses 2×3 rectangular regions and digits 1–6; a 16×16 uses 4×4 regions and sixteen symbols, usually 0–9 plus A–F. Only the size of the alphabet and the shape of the regions differ.

How is sudoku pronounced?

Soo-DOH-koo, with the emphasis on the middle syllable and the first syllable rhyming with "true."

What is the highest number used in a sudoku puzzle?

Nine, in a standard 9x9 grid, because each region holds nine cells and needs nine distinct symbols. Larger grids use more symbols — a 16x16 puzzle typically runs 0-9 plus A-F.