Sudoku Solver, Step by Step

Rules
Killer cages

Type the puzzle into the grid, tick any extra rules, then press Explain the next move.

A sudoku solver that shows its working

Type the numbers you have into the grid, using the arrow keys to move around. Explain the next move finds the next square that can be filled with certainty, highlights the row, column or box that proves it, and says why in plain words. Keep pressing to walk through the whole puzzle, or step back to look again. When a move removes possibilities rather than filling a square, the small pencil marks show which digits go.

Show the answer fills the grid at once and says whether the answer is the only one. A fair sudoku has exactly one, so if it reports several, a number is missing from what you typed.

The techniques, in plain words

Only one digit fits. Every other digit is already in the square's row, column or box, so only one is left. Only one place for a digit. A row, column or box still needs a digit and only one of its squares can take it. These two solve most puzzles in a newspaper.

Pointing and claiming: when a box's last few places for a digit all lie in one row or column, that digit is spoken for and can be crossed off the rest of that line, and the other way round. A pair: two squares in a line that can only be the same two digits take both of them between them, so no other square there can be either. A hidden pair is the reverse, two digits with only two places to go. X-wing: if a digit has only two places in each of two rows, and they line up in the same two columns, it must take one place in each column, and can be crossed off everywhere else in them.

For killer sudoku there are two more. Cage combinations: a cage's digits never repeat and must add up to its sum, so a cage of 17 in two squares can only be 8 and 9, and anything else is crossed off. The 45 rule: every row, column and box holds 1 to 9, which add up to 45. Subtract the cages lying wholly inside it, and whatever is left over has a known total; when only one square is left over, that square is solved outright.

Some puzzles need more than these. When the explanation runs out of certain moves it says so rather than guessing, and Show the answer finishes it.

Variant sudoku: X, windoku, anti-knight and miracle

Tick a rule and the solver uses it, both for the answer and in its explanations. Each one has a new puzzle every day on its own page: X sudoku, with both diagonals, windoku, with four shaded windows, disjoint groups, centre dot, anti-knight, anti-king, anti-knight-king, non-consecutive, and miracle sudoku, which uses three of these rules at once and can start from as few as five givens. The rest of the daily puzzle games include jigsaw, thermo, arrow and fourteen more.

Killer sudoku solver and cage calculator

Press Draw cages, then tap or drag across the squares of a cage, type its sum and press Make cage. Repeat for each cage; tap one to select it again if you need to change it. The page keeps a running total: when the cages cover the whole grid their sums must come to exactly 405, so a typo shows up straight away. Type any given digits into the grid as usual, then explain or solve it like any other sudoku. The daily killer sudoku has a new one every day.

The cage calculator below is the killer cheat sheet: give it a number of squares and a sum and it lists every set of different digits that makes it. Leave out digits a cage cannot use, or require one it must, and the list narrows.

How it was checked

Before this page went up, the solver was run on 135 puzzles from nine of the site's daily variant pages. It found each page's own stored answer every time, and found it to be the only one, which also proves each variant's rule is set up right. Every step the explanation took was checked against those answers: it never placed a wrong digit and never crossed off a right one. 131 of the 135 were solved start to finish by explained moves alone.

Killer sudoku was checked the same way against all 200 puzzles from the daily killer page: every stored answer found, every one the only answer, every explained step true, and all 200 explained from start to finish.

More puzzles like this

If you like a puzzle that yields to patience rather than luck, that is exactly what a good interlocking puzzle asks of you. See the 6 Piece Cross, or the rest of the brain teasers. There are more solvers on the puzzle tools page.

For KenKen, where cages have products, differences and quotients as well as sums, there is a KenKen solver that explains its steps the same way.

Frequently Asked Questions

How do you solve a sudoku step by step?

Look for a square where only one digit fits, or a digit that has only one place left in a row, column or box, and fill it. Repeat. Harder puzzles need pointing, pairs or an X-wing to cross off possibilities first. This solver finds the next forced move and says why.

What is the minimum number of clues for a sudoku?

Seventeen. A classic sudoku with fewer than 17 givens can never have just one answer, which was proved by computer search in 2012.

How do you solve a killer sudoku?

Use the cage sums. A cage's digits never repeat, so a cage of 17 in two squares can only be 8 and 9. Then use the 45 rule: every row, column and box adds up to 45, so whatever the cages wholly inside it leave over has a known total. Draw the cages into this solver and it explains each move that way.

What is an X sudoku?

A sudoku where both long diagonals must also contain 1 to 9, as well as every row, column and box. Tick Diagonals too and the solver uses that rule.

What is a miracle sudoku?

A sudoku with three extra rules: no equal digits a knight's move apart, none touching diagonally, and no consecutive digits side by side. They are so restrictive that a puzzle can start from as few as five givens.

What does it mean if a sudoku has more than one solution?

That a number is missing from it. A fair sudoku has exactly one answer, so if the solver reports several, check the grid against the original.