How to Solve Sudoku: A Step-by-Step Routine for Any Grid
How to solve Sudoku step by step: scan for the easy digits, add pencil marks the right way, repeat a simple loop, and use a checklist whenever you get stuck.
Updated
To solve a Sudoku, repeat one loop: scan for digits that have only one possible cell, place them, and rescan the row, column and box you just changed. When scanning stops working, write pencil marks, use them to remove candidates, and return to scanning. You never need to guess.
This page is a routine to follow. The rules are in how to play Sudoku, and each named technique is explained in the Sudoku strategy guide.
Step 1: scan digit by digit
Take the digit 1. Look at every 3x3 box that does not contain a 1 yet. For each of those boxes, rule out the rows and columns that already hold a 1 elsewhere in the grid. If only one empty cell in the box survives, place the 1 there.
Then do the same for 2, then 3, up to 9. This is called cross-hatching.
Worked example. Box 2, the top middle box, has no 6. There is a 6 in row 1 over in box 1, and a 6 in row 3 over in box 3. That leaves row 2 of the box: r2c4, r2c5 and r2c6. Column 4 has a 6 lower down, and r2c5 already holds a given. The 6 goes in r2c6.
Two habits make this step faster:
- Start with the digits that appear most often. A digit already placed six or seven times has very few cells left.
- When a box narrows a digit down to two cells in the same row or column, remember it. That alone can rule the digit out of the neighboring boxes along that line.
Step 2: finish the crowded units
Now look at units instead of digits. Find any row, column or box with only one, two or three empty cells.
- One empty cell: it takes the only missing digit.
- Two empty cells: note the two missing digits, then check whether one of them is blocked from one of the cells by its other units. If so, both cells are solved.
- Three empty cells: the same check usually places at least one digit.
Worked example. Row 5 is missing 2 and 8, at r5c1 and r5c9. Column 1 already contains an 8. So r5c1 is 2 and r5c9 is 8.
Step 3: loop until nothing moves
Every digit you place changes three units. Go back to step 1 for that digit and to step 2 for those three units. On an easy grid, this loop finishes the puzzle with no notes at all. Keep cycling until a full pass through digits 1 to 9 places nothing.
Step 4: add pencil marks
When the loop stalls, stop relying on memory. There are two ways to mark up the grid, and it pays to use them in order.
Light marking first. In each box, for each missing digit, if the digit can go in exactly two cells, write it small in both. Skip digits with three or more options. This approach is often called Snyder notation. It keeps the grid readable and makes pairs obvious: two cells in a box that carry the same two small digits must hold those two digits.
Full marking when needed. If light marks do not break the puzzle open, fill in every candidate for every empty cell. For each cell, start from 1 to 9 and cross off whatever appears in its row, column and box. It is slow, but from here the grid tells you everything.
Accuracy matters more than speed in this step. One missing candidate will lead to a wrong digit many moves later.
Step 5: use the marks
With candidates written in, check for these in order, and return to step 1 the moment you place a digit.
- A cell with a single candidate. That is the answer for the cell.
- A digit that appears as a candidate in only one cell of a row, column or box. Place it, whatever else that cell lists.
- Two cells in a unit with the same two candidates and nothing else. Remove those two digits from the other cells of the unit.
- A digit whose candidates within a box all lie in one row or column. Remove that digit from the rest of that row or column outside the box.
Worked example of item 3. In column 8, two cells read 3 and 7 only. A third cell in the column reads 3, 5 and 7. Since the 3 and 7 are claimed by the pair, the third cell is 5.
After every placement, erase that digit from the notes of all cells in the same row, column and box. Out-of-date notes are the most common reason a solve goes wrong.
The stuck checklist
When you have stared at the grid for a few minutes and nothing gives, run this list from the top.
- Are the notes correct? Pick a few cells and recompute their candidates from scratch. Fix any that include a digit already present in the row, column or box.
- Hidden singles by unit. Go through all nine rows, then all nine columns, then all nine boxes, asking for each missing digit: how many cells can take it? If the answer is one, place it.
- Pairs. Look at every cell with exactly two candidates and check its units for a twin.
- Lines within boxes. For each digit, check whether its candidates in any box sit on a single line, then remove it from the rest of that line.
- The reverse. For each digit, check whether its candidates in any row or column sit inside a single box, then remove it from the rest of that box.
- Harder patterns. Hidden pairs, triples and X-Wing are described in the strategy guide.
- Step away. A two-minute break finds more missed singles than another ten minutes of staring.
Guessing is not on the list. A guess that turns out wrong is rarely discovered at once, and unwinding it costs more than the search would have.
Following the routine in our game
In Sudoku on GameParticles, press N or use the notes button to switch between placing digits and writing pencil marks. When you place a digit, matching notes in the same row, column and box are removed automatically, which takes care of the clean-up in step 5.
A wrong digit turns red immediately and counts as one of three mistakes, so you will know at once if a deduction was off. Undo with U to take it back. Each game also has three hints: select the cell you are stuck on and press H to reveal it. Used sparingly, a hint on the right cell restarts the loop. Easy puzzles begin with about 43 digits filled and Expert with about 25, so move up a level once steps 1 to 3 feel automatic.
Try it
Open a Medium puzzle in Sudoku and work the steps in order: digits, crowded units, loop, light notes, full notes. Keep the checklist nearby for the first few solves. After that it becomes habit.