Solving guides

How to solve Sudoku

Every Sudoku in our books can be solved by logic alone, with no guessing. This guide takes you from the first easy placements to the patterns that crack hard and extreme puzzles. The same row and column techniques also help with Calcudoku, Futoshiki and Killer Sudoku.

In the examples, rows are numbered 1 to 9 from the top and columns 1 to 9 from the left, so "r5c3" means row 5, column 3. Small numbers in a square are candidates: the values that square could still hold.

The rules

Fill the grid so that every row, every column and every 3×3 box contains each of the numbers 1 to 9 exactly once. The numbers already printed are the clues and never change.

Sudoku builds on the much older Latin Square, a grid in which every row and column holds each number once. Standard Sudoku adds the nine 3×3 boxes as a third rule, and those three overlapping rules are what make the logic work.

A tip before you start: once the easy placements run out, pencil in the candidates for each empty square. Most of the techniques below work by removing candidates until only one is left.

Sole candidate

Pick an empty square and check its row, its column and its box. Cross off every number you can see in any of them. If only one number is left, that is the answer for the square.

In the example, the green square's row already holds 2, 4, 5 and 7, its column holds 1, 8 and 9, and its box holds 2 and 6. That rules out everything except 3.

Sudoku grid with one green square whose row, column and box together rule out every number except 3
The green square sees every number except 3, so it must be 3.

Unique candidate

This works the other way round. Pick a number and a box, and ask: where in this box can that number go? Every row and column that already contains the number blocks the squares it passes through. If only one square in the box is left, the number goes there, even if that square still has other candidates.

In the example we are placing an 8 in the middle-left box. The 8 in row 6 blocks the bottom row of the box, the 8s in columns 2 and 3 block those columns, and the top-left square is already filled with a 7. The only square left for 8 is the green one.

Sudoku grid where three 8s block all but one square of the middle-left box
The 8s elsewhere leave only the green square for an 8 in this box.

Block and row or column interaction

Sometimes you can't yet say exactly where a number goes in a box, but you can say it must be in one particular row or column of that box. When that happens, the number can't appear anywhere else in that row or column outside the box.

In the example, the 2 in column 2 rules out the middle column of the middle-left box, and the other squares are filled. So the box's 2 must be in one of the two green squares, both in row 5. Whichever it is, row 5 gets its 2 from this box, so 2 can be crossed off every other square in row 5.

Two green squares in row 5 of a box, with 2 crossed out along the rest of row 5
The box's 2 must be in row 5 (green), so 2 is removed from the rest of row 5 (crossed out).

Block and block interaction

Look at three boxes side by side (or stacked). If, in two of them, a number is confined to the same two rows, then those two boxes take both of those rows for that number. The third box must place it in the remaining row.

In the example, the 6s in columns 3 and 6 and the filled squares in row 2 mean that in each of the top-left and top-middle boxes, 6 can only go in rows 1 or 3 (green). Between them they use up rows 1 and 3, so the top-right box's 6 must be in row 2, and 6 is crossed off rows 1 and 3 of that box.

Two boxes with 6 confined to rows 1 and 3, and 6 crossed out in rows 1 and 3 of the third box
Two boxes claim rows 1 and 3 for their 6s, so the third box's 6 must go in row 2.

Naked subsets (pairs, triples and quads)

If two squares in the same row, column or box have exactly the same two candidates and nothing else, those two numbers must go in those two squares. You don't know which way round yet, but you can remove both numbers from every other square in that row, column or box.

In the example, two squares in column 6 can only be 4 or 7 (green). So 4 and 7 are taken, and they can be removed from the other squares in the column (red). The same idea works with three squares that share three candidates (a naked triple), or four with four (a naked quad).

Column 6 with two squares that can only be 4 or 7 in green, and 4 and 7 marked red in the other squares
The green pair can only be 4 and 7, so 4 and 7 are removed from the rest of the column (red).

Hidden subsets

A hidden subset is the mirror image of a naked one. If two numbers can only go in the same two squares of a row, column or box, then those two squares must hold those two numbers. Any other candidates in those squares can be removed.

In the example (part of a column), 6 and 7 appear only in the two green squares. So those squares are 6 and 7, and their other candidates (2, 3 and 5) go. That leaves just one square in the column that can hold a 5 (red), which solves it.

Part of a column where 6 and 7 appear only in two green squares, and a red 5 lower down
6 and 7 are hidden in the green squares. Clearing their other candidates leaves only one place for 5 (red).

X-Wing

An X-Wing uses two rows and two columns. Choose a number. If in two rows that number can only go in the same two columns, the four squares form a rectangle. The number must sit in opposite corners of it, either top-left and bottom-right or top-right and bottom-left.

Either way, each of the two columns gets its copy of the number from one of those rows. So the number can be removed from every other square in those two columns.

In the example, 4 can only go in the green squares in rows 2 and 8 (the rest of each row, red, can't hold a 4). The green squares line up in columns 2 and 8, so 4 can be removed from the rest of columns 2 and 8.

Rows 2 and 8 highlighted, with 4 possible only in columns 2 and 8
In rows 2 and 8, the 4 can only be in columns 2 and 8, so 4 is removed from the rest of those columns.

Swordfish and larger fish

A Swordfish is an X-Wing stretched over more rows. The idea is the same: if a number is confined to the same set of columns across the same number of rows, those rows use up all of those columns between them. You can then remove the number from the rest of those columns.

Our example uses four rows and four columns (the four-row version is sometimes called a Jellyfish). Follow it in four steps:

Step 1: the candidate 4s in rows 2, 4, 6 and 8, two in each row
Step 1. Mark every square where 4 can still go in rows 2, 4, 6 and 8. Each row has only two.
Step 2: rows 2, 4, 6 and 8 highlighted with the possible 4s in green
Step 2. In each of these rows the 4 must be in one of its two green squares.
Step 3: the possible 4s coloured alternately green and blue
Step 3. Colour them alternately. If a green square is 4, its row partner (blue) isn't, and so on. Either all the greens or all the blues are the 4s.
Step 4: the possible 4s joined in a closed loop across columns 2, 4, 7 and 9
Step 4. The squares form a closed loop over columns 2, 4, 7 and 9. Each of those columns gets its 4 from these rows, so 4 is removed from the rest of those columns.

Forcing chains

When nothing else works, follow a chain of squares that each have just two candidates. Assume one value, follow the consequences from square to square, and see what happens. If the chain leads to a contradiction, the assumption was wrong, so the other value must be right.

In the example, the bottom-middle box can only take its 5 in one of two squares: r7c6 or r8c5 (the arrow). Suppose r8c5 were 3 rather than 5. Then:

  1. r8c2 (1 or 3) can't be 3 because of row 8, so it's 1.
  2. r4c2 (1 or 7) can't be 1 because of column 2, so it's 7.
  3. r4c6 (5 or 7) can't be 7 because of row 4, so it's 5.
  4. r7c6 (5 or 7) can't be 5 because of column 6, so it's 7.

Now the box has nowhere left for its 5, which is impossible. So r8c5 can't be 3, and must be 5.

A chain of five green squares with two candidates each, and an arrow pointing to r8c5
Assuming 3 at the arrow leads round the chain to a box with no room for 5, so the arrowed square must be 5.