Learn

How to solve a hard Sudoku when you are stuck

When basic scanning stalls, first complete your pencil marks and re-scan for singles. If still nothing is forced, look for naked pairs, then pointing pairs, then X-wings. Each technique removes candidates, and removing one candidate often exposes a new single. You never need to guess.

Each example below is taken from a real puzzle at the point where every single has already been filled in. If you are not yet comfortable with singles and pencil marks, start with the beginner strategies guide.

Naked pairs

If two cells in one row, column or box hold exactly the same two candidates, those two digits must fill those two cells, so neither can go anywhere else in the unit. Here is row 5 of the puzzle 004801000000002107000030050006000004000020600000700098030040905090000000510300070 (read row by row, 0 is empty).

CellCandidates
r5c11 3 7 8 9 - remove 1 and 3
r5c24 5 7 8
r5c31 3 5 7 8 9 - remove 1 and 3
r5c41 4 5 9 - remove 1
r5c52 (placed)
r5c63 4 5 8 9 - remove 3
r5c76 (placed)
r5c81 3
r5c91 3

Row 5, after every single has been filled. The blue cells r5c8 and r5c9 both hold only 1 and 3. The grey cells lose any 1 or 3 they had: r5c1, r5c3, r5c4 and r5c6.

The cells r5c8 and r5c9 both hold only 1 and 3. One is 1 and the other is 3, so no other cell in row 5 can be 1 or 3. That removes 1 from r5c1, r5c3 and r5c4, and 3 from r5c1, r5c3 and r5c6. Four cells just got smaller, and often one of them is now a single.

Pointing pairs

Sometimes a digit, inside one box, can only go in cells that all lie on one row or column. Then the digit has to be on that line, so it can be removed from the rest of the line outside the box. Look at the top-middle box of the puzzle 000200001002008650000760400000600180900050003700009000000800300007002000005090040, and the digit 4.

CellCandidates
r1c42 (placed)
r1c53 4
r1c63 4 5
r2c49 (placed)
r2c51 (placed)
r2c68 (placed)
r3c47 (placed)
r3c56 (placed)
r3c63 5

The top-middle box, in reading order. The digit 4 is a candidate only in r1c5 and r1c6 (blue): r1c4 is a 2, and the other cells are placed or have no 4.

Both cells are in row 1, so the box's 4 is somewhere in r1c5 or r1c6. That means no other cell of row 1 can be a 4.

CellCandidates
r1c13 4 5 6 8 - remove 4
r1c27 (placed)
r1c33 4 6 8 9 - remove 4
r1c42 (placed)
r1c53 4
r1c63 4 5
r1c78 9
r1c83 9
r1c91 (placed)

Row 1. The 4 in r1c1 and r1c3 (grey) can be removed, because the row's 4 is already spoken for by the box.

The result: r1c1 loses its 4 and r1c3 loses its 4. As with pairs, the gain is small but it keeps the solve moving.

X-wing

An X-wing looks for a digit that has exactly two places in a row, and the same two columns in another row. Take the digit 8 in the puzzle 000700000091008503008060002000370010082001000000000000000006005003940200500000089, once every single is filled.

788
9142853
862
372818
826915
884828
88635
839452
53789

Only the possible places for an 8 are marked; placed digits are grey. In row 1 an 8 can only go in c7 or c9, and in row 4 the same two columns. The outlined cells are the X-wing. The shaded cells r6c7 and r6c9 lose their 8.

In row 1 the 8 must go in c7 or c9. In row 4 it must go in c7 or c9 too. If row 1 takes c7, row 4 has to take c9, and the other way round: the 8s end up on one diagonal of the rectangle. Either way columns 7 and 9 each get their 8 from rows 1 and 4, so no other cell in those columns can hold an 8. That removes the 8 from r6c7 and r6c9.

When none of these fire

  • Check your marks. A missed or extra candidate is the usual reason a technique does not show up.
  • Try each digit separately. X-wings and pointing pairs are easier to see when you scan the grid for a single digit.
  • Take a break. A fresh look often finds a single you skipped.

Questions

What should I do when I am stuck on a Sudoku?

Fill in every pencil mark, then re-scan for singles. If nothing is forced, look for naked pairs, then pointing pairs, then X-wings. Each one removes candidates, and a removed candidate often creates a new single.

What is an X-wing in Sudoku?

An X-wing is a digit that can go in only two cells in each of two rows, with both rows using the same two columns. The digit must occupy one diagonal of that rectangle, so it can be removed from the rest of those two columns.

What is a pointing pair?

A pointing pair is a digit that, inside one box, can only go in cells that all lie on a single row or column. The digit must be on that line, so remove it from the rest of the line outside the box.

Do hard Sudokus need guessing?

Not in these examples: every elimination here follows from logic. Techniques like these are enough for many hard puzzles, and the hardest ones use further patterns, but a forced guess is a sign that you missed a deduction.

Practise it

Practise these free in your browser. Our Sudoku has Hard and Expert puzzles, and a Notes mode to keep your pencil marks on the grid.

Related guides