Sudoku Solver Pro

Sudoku solver step by step

Most people who get stuck on a sudoku are not missing a technique. They are working in the wrong order: hunting for clever deductions before the easy digits are on the board, or writing candidates in every cell before they have scanned for a single number. This page is the order to work in, from the moment you open the grid to the moment you decide you would rather have the answer. It is shorter than it looks — the whole routine takes about twenty minutes on a medium newspaper puzzle.

The four techniques themselves, with examples of how they work, are on the how to solve sudoku page. This page assumes you know what they are and tells you when to use each one.

Step 0 — Look before you write (2 minutes)

Do not start placing digits yet. First:

That is the whole warm-up. The point is not to solve anything; it is to know what you are working with.

Step 1 — Scan digit by digit (5 to 10 minutes)

Take one digit at a time, in order, and ask where it can go in each 3×3 box that does not already contain it. Do not switch digits halfway. Finish all nine before you decide the scan is done.

This is the single most productive part of solving a sudoku, and it is also the part people rush. Two habits make it go faster:

When this step is finished: you have passed over all nine digits and placed nothing new. Some puzzles crack here and hand you half the grid. Most hand you three to six digits.

Real sudoku board for scanning 7 in the top-left box; row 3, column 1 is the only allowed cell
Scanning example: in the top-left box, row 1 already has a 7 and column 2 has a 7 farther down. The only remaining place for 7 in that box is row 3, column 1. After placing it, scan again.

Step 2 — Look for cells with one answer left (5 minutes)

A cell is a naked single when eight different digits already point at it — its row, its column and its box between them rule out everything except one number. You do not need candidates written in pencil to find these: pick an empty cell, name the digits already visible in its row, its column and its box, and count.

The best place to look is the row, column or box that already has the most numbers filled in. Fewer unknown digits means fewer numbers to count.

When this step is finished: you have walked the empty cells once and everything you could see by counting is filled in. Go back to Step 1 for any digit that got a new copy placed — one placement often opens up a scan you already gave up on.

Steps 1 and 2 alternate. Scan, place, count, place, scan again. On easy puzzles this loop alone finishes the grid.

Step 3 — Hidden singles (the step that breaks medium puzzles)

Now the cell has several candidates, but only one cell in a whole row, column or box can take a particular digit. The approaches are opposite to Step 2: instead of asking what can go in this cell, ask where in this unit can this digit go.

Pick one unit (a row, a column, or a box). Pick one missing digit. Check every empty cell in that unit: if exactly one of them can hold it, write it in, even if that cell has three other candidates pencilled in. The digit is hidden among the candidates, not the cell.

When this step is finished: you have swept all 27 units — 9 rows, 9 columns, 9 boxes — once. Sweep them in a fixed order so you can tell you have not skipped one.

Step 4 — Only now, write candidates

Pencil marks slow you down if you write them too early, because half of them will be crossed out by the scan before you use them. Write them when counting in your head stops being reliable — usually somewhere around the halfway point of a medium puzzle.

The useful version of this step:

When this step is finished: every empty cell in the box you chose has its full candidate list, and you have not yet found a placement from it. Move to the next box.

Step 5 — Box-line reduction, once

Look at a box where a digit can only go in cells that all sit in the same row, or all sit in the same column. That digit must be inside that row or column within that box, so it cannot go anywhere else in that row or column outside the box. Cross those candidates out.

This is the first technique that needs candidates on the board to be worth doing, which is why it comes after Step 4 and not before. Do this only after Steps 1 to 3 have stalled.

When this step is finished: you have removed something, or you have checked every box and found nothing to remove. If nothing came out of it, you are in Step 6.

Step 6 — The stuck checklist

When nothing moves, work through this list in order. In practice one of the first three catches it most of the time.

  1. Re-read your own digits. A digit written one cell to the left, or a 5 that should be a 6, poisons every deduction after it. This is the most common reason a grid looks impossible.
  2. Re-check the last three placements. The mistake is usually recent, not early.
  3. Sweep a unit you have not checked. If you have been working in the top three rows, the answer is often in a column you have not looked at for ten minutes.
  4. Look for a hidden single you dismissed. A cell with four candidates that you decided was "too messy" often holds a digit that has only one home in that unit.
  5. Take a break. Five minutes away genuinely works. Nothing about the grid changes, but your eye stops skipping the same cells.

What is not on the list: guessing. If you guess, you have to remember the guess and be able to undo it, and a unique answer does not guarantee that these four techniques will be enough. If they stall, consider more advanced deductions or use the solver.

Step 7 — When to stop and let the solver do it

Being honest about this saves time. There are three situations where a solver is not cheating, just faster:

Once your grid is on the board, everything from Step 1 to Step 6 still works on it. Press Clear after a Solve and the digits the solver added come off, leaving your own numbers as a normal puzzle, with Hint and Check working on it.

The orders that do not work

Worth naming, because they are the usual reasons a solve goes badly:

Where to go next