Updated on 22 November 2026
Sudoku: rules, method and solving techniques, explained step by step
A well-built sudoku can always be solved by logic, without ever guessing. This guide explains the vocabulary, a method that works, then each technique with a concrete example, from the naked single to the Swordfish, and how to track down a mistake.
The rules of sudoku
The grid has 81 cells, arranged in 9 rows, 9 columns and 9 boxes of 3×3. Fill it with the digits 1 to 9 so that every row, column and box contains each digit exactly once. That is all: no arithmetic, no sums to work out. The digits are only symbols, and could be swapped for nine letters or nine colours.
A starting grid already has some digits, called givens. A well-built puzzle has a single solution: that is what guarantees it can be solved by deduction, without ever having to gamble.
The vocabulary to know
To follow the techniques, a few words come up all the time. A cell is written r3c5: row 3 (counting from the top), column 5 (counting from the left). Boxes are numbered 1 to 9, left to right then top to bottom: box 1 is top left, box 5 is the centre, box 9 is bottom right.
| Term | Meaning |
|---|---|
| Cell | One of the 81 squares of the grid, for example r3c5. |
| Unit | A row, a column or a box: 27 units in all, each of which must contain 1 to 9. |
| Peers | The 20 cells sharing a row, column or box with a given cell. A cell is said to “see” its peers. |
| Candidate | A digit still possible in an empty cell, given what you already know. |
| Elimination | Removing a candidate from a cell because it is impossible there. |
| Placed digit | A final digit in a cell (a given or a deduced one). |
Why logic is always enough
Every placed digit removes that digit from the candidates of the 20 cells that see its cell. Solving is a chain of such consequences: you look for a cell or a digit where only one possibility remains, place it, and that unlocks more. When the chain stops, a finer technique is needed to eliminate candidates, and the chain restarts.
Guessing “just to see” is tempting but it is the worst habit: a mistake only shows up much later, when the grid jams, and you no longer know which of your guesses was wrong. If you hesitate between two digits, a deduction is missing, not a lucky guess. The techniques below exist precisely to find it.
A side note: there are about 6.67 × 10²¹ valid completed sudoku grids, and it was proved in 2012 that no puzzle with a unique solution can start with fewer than 17 givens.
A step-by-step method
- Scan digit by digit: take the 1 and look where it can still go in each box, taking into account the 1s already placed in rows and columns. Do the same for 2, 3… up to 9. Many easy puzzles end here.
- Scan almost-full units: spot rows, columns and boxes missing only two or three digits and complete them.
- When that is no longer enough, pencil in the candidates of every empty cell (see the next section).
- Look first for cells with a single candidate, then for digits with a single place in a unit.
- Each time you place a digit, update the notes: erase it from the candidates of its 20 peers.
- If nothing moves, go to the next technique in the order given in “In which order to look?”, then come back to the simple ones as soon as an elimination happens.
- Never guess: reread the notes instead, as a deduction almost always hides in a forgotten or stale note.
Pencil marks: why and how
Pencil marks, or candidates, are the central tool. Without them you only see the digits already placed; with them you see what is still possible, and every advanced pattern (pairs, triples, X-Wing) becomes a visible shape in the grid.
There are two ways to go about it. Full notes: write all the candidates of all the cells at once, then keep them up to date, which takes discipline but opens up every technique. Partial notes: only note the cells with two or three candidates left, which lightens the grid but misses some patterns. To improve, full notes are preferable, as long as you keep them current.
The number one trap is the stale note: a candidate that should have been erased hides the next deduction, or even makes you draw a false one. Get into the habit of cleaning notes right after every digit placed.
Easy: naked single and hidden single
The naked single: a cell has only one candidate left, because all the other digits are already in its row, column or box. Example: a cell whose row already holds 1, 2, 3, 5, 6 and 9, whose column holds 7 and 8, and whose box holds 1, 2, 3, 6 and 8 can only take the 4. Place it.
The hidden single: in a unit, a digit has only one cell left to go in, even if that cell has other candidates. Example: in box 5 (the central box), look where the 7 goes. A 7 already placed in row 4 rules out all of row 4 in the box, a 7 in row 6 rules out row 6, a 7 in column 4 rules out column 4: only r5c6 is left, so the 7 goes there, whatever the other candidates of that cell.
The two techniques complement each other: the naked single reasons cell by cell, the hidden single reasons digit by digit within a unit. The hidden single is harder to see because it forces you to look at the grid through digits instead of cells. Together they solve easy puzzles entirely.
Medium: locked candidates
When a digit, in one unit, can only go on cells lined up in another unit, it is “locked” and lets you eliminate that digit elsewhere. It works in two directions.
Pointing: in a box, if all the possible places of a digit are on one row (or one column), the digit of that box must be on that row. You can therefore eliminate it from the other cells of that row, outside the box. Example: in box 1, the 5 is only possible in r2c1 and r2c3, so on row 2: remove the 5 from r2c4 to r2c9.
Claiming (box-line reduction): the reverse reasoning. If, in a row (or column), all the possible places of a digit are in one box, that digit of the row falls in that box, and you eliminate it from the other cells of the box. Example: in row 1, the 5 is only possible in r1c1 and r1c2, so in box 1: remove the 5 from r2c1 to r3c3.
These eliminations do not place a digit directly, but they often make a single candidate or hidden single appear right after.
Medium: naked pairs
A naked pair: two cells of the same unit that both have only the same two candidates, for example {2, 7} and {2, 7}. These two cells necessarily share the 2 and the 7: one gets the 2, the other the 7. No other cell of the unit can hold a 2 or a 7, so you can remove those two candidates from all the other cells of the unit.
Example: in r1c1 and r1c5, only {2, 7} remains. In row 1, remove 2 and 7 from all the other cells. If the two cells are also in the same box, the elimination holds for the box too.
To spot them, look in a unit for cells with only two candidates: if two of them have exactly the same ones, that is a naked pair.
Hard: hidden pairs, triples and quads
A hidden pair is the mirror of the naked pair: in a unit, two digits have only two possible cells left, the same two for both. Those two cells must contain those two digits, so you can erase all their other candidates. Example: in column 3, the 4 and 9 only appear as candidates in r2c3 and r7c3; those two cells become {4, 9} and lose their other notes, even if they had five or six.
The naked triple generalises the pair to three cells: three cells of a unit whose candidates, taken together, are limited to three digits, for example {1, 5}, {5, 8} and {1, 8}. Each cell need not have all three digits. The three digits are then reserved for those cells, and you remove them from the other cells of the unit. The hidden triple works like the hidden pair, with three digits and three cells.
The quad exists too but is rare and hard to spot; a tip: naked triples and quads show up best when you think “these cells use only these digits”, and hidden ones when you think “these digits have only these cells”.
Hard: the X-Wing
The X-Wing is the first technique that works on two rows at once. Condition: a digit has only two possible places in one row, and exactly the same two columns as its only possible places in a second row. The four cells form a rectangle.
Why it works: in each of the two rows, the digit must be in one of the two columns. There are only two ways to fill the rectangle: one diagonal or the other. Either way, each of the two columns receives its digit in one of the two rows. So you can remove that digit from all the other cells of those two columns.
Example: the 6 is only possible in columns 3 and 7 for row 2, and only in columns 3 and 7 for row 8. The 6 of row 2 is in r2c3 or r2c7, that of row 8 is in r8c7 or r8c3. Columns 3 and 7 will therefore have their 6 in rows 2 and 8: remove it from the other cells of those two columns. The pattern also works the other way round, with columns as the base and rows for the elimination.
Expert: the XY-Wing
The XY-Wing uses three cells with two candidates each. A pivot has the candidates {X, Y}. A first wing, which sees the pivot, has {X, Z}. A second wing, which also sees the pivot, has {Y, Z}. The two wings do not see each other.
Why it works: if the pivot is X, the first wing cannot be X and is Z. If the pivot is Y, the second wing is Z. Either way, one of the two wings is Z. Any cell that sees both wings therefore cannot hold Z: eliminate it.
Example: pivot r5c5 = {1, 2}, wing r5c1 = {1, 3} (same row as the pivot), wing r1c5 = {2, 3} (same column). If the pivot is 1, r5c1 is 3. If it is 2, r1c5 is 3. The cell r1c1 sees both r5c1 (column 1) and r1c5 (row 1): it cannot be 3, so remove that candidate.
Expert: the Swordfish
The Swordfish is the X-Wing extended to three rows and three columns. Condition: a digit has possible places, in three distinct rows, only within the same three columns (each row can hold two or three of them). The three rows must therefore place their digit in those three columns, one per column. You can eliminate that digit from all the other cells of those three columns.
The pattern flips like the X-Wing: three columns whose places for a digit fit within the same three rows let you clean those rows. It is harder to see because the cells form an irregular pattern, hence the value of keeping notes tidy.
Beyond that there are chain techniques (Skyscraper, W-Wing, alternating chains…), which push the same cause-and-effect idea over more cells. They only matter for fiendish puzzles.
Which technique for which level?
A puzzle's level is not measured by the number of empty cells but by the most advanced technique needed to finish it. A puzzle with few givens can still be easy, and a well-filled one can be formidable.
| Level | Techniques added to the previous ones | Keep in mind |
|---|---|---|
| Easy | Naked single, hidden single | Almost no notes needed. |
| Medium | Locked candidates (pointing, claiming), naked pairs | Notes become useful. |
| Hard | Hidden pairs, naked and hidden triples, X-Wing | Full notes are essential. |
| Expert | XY-Wing, Swordfish, sometimes chains | Rigour and patience. |
In which order to look?
- Hidden singles by box, then by row and column.
- Naked singles (cells with a single candidate).
- Locked candidates: pointing and claiming.
- Naked pairs, then naked triples.
- Hidden pairs, then hidden triples.
- X-Wing, then Swordfish.
- XY-Wing and other wing patterns.
- As soon as an elimination happens, go back to the top of the list: the simple techniques may have unlocked something.
Classic mistakes
- Guessing a digit “just to see”: the error spreads and shows up much later.
- Leaving a stale note: a candidate that should have been erased hides the next deduction.
- Fixating on one area: switch digit or unit as soon as you go round in circles.
- Jumping to an advanced technique before the simple ones are exhausted: you wear yourself out on an X-Wing while a hidden single was waiting.
- Misreading a pattern: a naked pair must lie in one unit, an X-Wing must form a perfect rectangle.
- Forgetting that boxes count as much as rows and columns.
Tracking down a mistake
A mistake always gives itself away through a contradiction: a cell with no candidate left, a digit with no place left in a unit, or the same digit twice in a unit. When that happens, do not carry on: go back.
The safest method: first reread your latest deductions, starting with the most advanced one (pair, X-Wing), as it is the most fragile. Check that each erased candidate was erased for a reason. If you find nothing, rewrite the notes from the last safe state of the grid.
A good reflex: after an advanced technique, test the elimination by asking “if this digit were true here, what would happen?”, without writing anything.
How to improve
- Play easy puzzles without notes to sharpen your eye for digits.
- Move to full notes on medium puzzles and get used to cleaning them.
- Learn one technique at a time, play puzzles of that level until you spot it effortlessly, then move to the next.
- When you are stuck, resist the urge to guess: go through the list of techniques in order.
- Reread your finished puzzles: which technique unlocked what? That is how you learn to recognise patterns.
Frequently asked questions
Do you have to guess to finish a sudoku?
No. A well-built puzzle has a single solution and is always solved by logic. If you hesitate, a deduction is missing, not a lucky guess.
Where do you start a sudoku puzzle?
With a digit scan: where can the 1 go, then the 2, and so on, starting with the digits that appear most. Then complete the almost-full rows, columns and boxes, and pencil in the candidates.
What is a candidate?
A digit still possible in an empty cell. Writing them down lets you see the pairs, triples and other patterns that lead to eliminations.
What is the difference between a naked single and a hidden single?
A naked single is a cell that accepts only one digit. A hidden single is a digit that has only one possible cell in a row, column or box, even if that cell has other candidates.
What is a naked pair?
Two cells of the same unit that both have only the same two candidates. Those two digits are reserved for them: remove them from the other cells of the unit.
What is an X-Wing?
A pattern where a digit has only two possible places in two rows, lying in the same two columns. The four cells form a rectangle, and the digit can be eliminated from the rest of those two columns.
What is an XY-Wing for?
To eliminate a candidate from a cell that sees two “wings” linked by a pivot cell with two candidates: whatever the pivot's value, one of the wings takes the shared digit, which therefore cannot be in that cell.
How do you know a puzzle is hard?
By the most advanced technique needed to finish it, more than by the number of empty cells. A puzzle with few givens can stay simple, and a well-filled one can need a Swordfish.
What should you do when you are stuck?
Update your notes, then go through the techniques in order: hidden singles, naked singles, locked candidates, pairs, triples, X-Wing, XY-Wing. A forgotten note is the most frequent cause of getting stuck.
What is the minimum number of givens in a puzzle?
17. It was proved in 2012 that no 9×9 sudoku with a unique solution can start with fewer than 17 digits.
Can you play sudoku offline?
Yes, for example with Papergrain Sudoku, which works with no connection and no account.
