How to solve Sudoku
To solve a Sudoku without guessing, run one loop: look for the cheapest deduction, apply it, and return to the cheapest again. Start with naked and hidden singles. When they run out, write pencil marks and look for pointing pairs and box/line reduction, then pairs, then triples and X-Wing, then XY-Wing, simple coloring and Swordfish, and last unique rectangles.
Every step either places a digit or removes a candidate, and the order follows the one this site’s own solver uses, so its hints and difficulty levels line up with what you learn here.
What does a solving method look like?
A good method is a loop and not a trick. You scan the grid for the simplest deduction available. You apply it by placing a digit or crossing out a candidate. Then you go back to the simplest kind of deduction, because the change you just made may have created a new easy move. You move to a harder technique only when every cheaper one has found nothing.
That is exactly how the site’s technique solver works, and it is also how the levels are defined: Easy puzzles need only the first rung, and each higher level needs a rung further up. Following the same ladder has a practical benefit. When a hint names a technique, you know where it sits and what you should have tried first. The grading guide describes the solver in more detail.
This guide climbs the ladder in the order the solver tries the techniques, which is not quite the order of the techniques hub. The hub arranges lessons for learning, with sets of cells taught before the overlap between boxes and lines. The solver’s order is the order of cost, so pointing pairs come before pairs. Either order works for learning, and for solving the cost order is the efficient one.
The ladder at a glance
| Rung | Technique | First needed at | The idea in one line |
|---|---|---|---|
| 1 | Naked singles | Easy | A cell with only one candidate |
| 1 | Hidden singles | Easy | A digit with only one cell left in a house |
| 2 | Pointing pairs | Medium | A digit in a box confined to one line clears that line |
| 2 | Box/line reduction | Medium | A digit in a line confined to one box clears that box |
| 3 | Naked pairs | Medium | Two cells, same two candidates |
| 3 | Hidden pairs | Medium | Two digits confined to the same two cells |
| 4 | Naked triples | Hard | Three cells that together hold three digits |
| 4 | X-Wing | Hard | A digit confined to the same two columns in two rows |
| 5 | Swordfish | Expert | The X-Wing idea on three rows and three columns |
| 5 | XY-Wing | Expert | Three two-candidate cells that force a shared digit |
| 5 | Simple coloring | Expert | A chain of either-or links for one digit |
| 6 | Unique rectangles | Evil | A rectangle that would allow two solutions cannot exist |
The “first needed at” column is this site’s own grading and not a universal standard. The frequency guide shows how often each technique turned up in the site’s stored puzzles.
What should you know before you start?
A few words recur in every lesson. A house is a row, a column or a box, and each must contain every digit once. Two cells are peers if they share a house, and a digit placed in one cannot appear in the other. A candidate is a digit that could still go in an empty cell. A given is a digit the puzzle starts with. The glossary defines these and the rest of the vocabulary, and the rules page is the reference for what the puzzle requires.
Cells are written as r4c5, meaning row 4, column 5, counting rows from the top and columns from the left. Boxes are numbered 1 to 9 across and then down, so box 5 is the center box.
Rung 1: how do you use singles?
Singles come in two forms, and between them they finish every Easy puzzle.
A naked single is found by looking at a cell. Gather the digits in its row, column and box. If eight different digits appear, the ninth is the answer. A hidden single is found by looking at a digit. Choose a row, column or box and ask where one particular digit can still go. If only one cell is possible, the digit goes there, even if that cell has other candidates too.
In practice you alternate. Scan by digit across the nine boxes, which finds hidden singles quickly. Then scan crowded rows, columns and boxes for cells with a single candidate. After each placement look first at the cells that share a house with it, as these are the cells whose options just shrank. The guided first puzzle walks through seven such moves on a real board, and it shows that one placement can turn a two-candidate cell into a single.
A scanning routine for singles
- Pick a digit that already appears several times on the board, since it has the fewest places left to go.
- For each box that does not yet contain that digit, rule out the cells whose row or column already holds it.
- If one cell survives in a box, place the digit. If none of the boxes yields a move, pick the next digit.
- Repeat for rows and columns, asking where the digit can go within each.
- Switch to cells. Pick a row, column or box with only a few empties and count the digits it lacks against what each empty cell can hold.
Run through all nine digits once, and then run through them again, because placements made along the way create new possibilities. Many Easy puzzles fall in two or three passes.
When should you start writing pencil marks?
Singles can be found by scanning, with no marks. Start writing candidates when the scan comes up empty twice in a row. Every technique above singles is about relationships among candidates, so it needs them to be visible. Write them once, and then keep them in step with the board. The pencil marks guide covers full marking against selective marking, what the Auto-notes button does, and why pressing it after you have made eliminations restores the candidates you removed.
Rung 2: how do boxes and lines interact?
This is the first rung that goes beyond singles, and it is the one most players meet first. It uses the fact that a box and a line overlap in three cells.
Pointing pairs work from the box outwards. If, inside a box, a digit can only go in cells that lie on one row, then the box’s copy of that digit is somewhere in that row. So the digit cannot be anywhere else in the row, outside the box. The same holds for a column, and the technique works with two or three cells.
Box/line reduction works from the line inwards. If, in a row, a digit can only go in cells that lie inside one box, then the row’s copy of that digit is in that box, so the digit cannot go in the box’s other cells. It is the mirror image of the pointing pair, and the same cells are involved.
A real example
The grid below is a position from the site’s Medium pool, after 29 singles have been placed. At this point the solver finds no more singles. Look at box 5, the center box.
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 4 | 2 | 8 | 3 | 1 | ||||
| 2 | 3 | 8 | 1 | 4 | 2 | ||||
| 3 | 1 | 5 | 4 | 2 | 8 | 3 | |||
| 4 | 2 | 5 | 9 | 7 | 3 | 4 | |||
| 5 | 3 | 4 | 6 | 2 | 5 | ||||
| 6 | 4 | 3 | 2 | 5 | 9 | 8 | 1 | ||
| 7 | 3 | 6 | 9 | 4 | 2 | 1 | 8 | ||
| 8 | 8 | 2 | 7 | 1 | 3 | 5 | 4 | ||
| 9 | 4 | 1 | 2 | 5 | 8 | 3 | 7 |
Box 5 is missing the digits 1, 6, 7 and 8. Where can the 6 go? Row 5 already has a 6 at r5c7, which rules out r5c5 and r5c6, so within the box the 6 fits only in r4c5 or r4c6. Both cells are in row 4. The box’s 6 must therefore be in row 4, and row 4’s 6 must be one of those two cells. That means the 6 can be crossed out of every other cell of row 4. The only other empty cell in that row with a 6 candidate is r4c2, which held 1, 6 and 8 and now holds just 1 and 8.
The solver’s own explanation for this step reads: in box 5, 6 can only go in r4c5, r4c6, all in row 4, so 6 can be removed from the rest of row 4. In this puzzle a second pointing pair follows at once, this time for the 7 in row 5, and then naked singles carry the solve to the end. The whole puzzle takes 57 steps: 20 hidden singles, 35 naked singles and those 2 pointing pairs. That mix is typical of Medium, where most steps are singles and a small number of deductions do the unlocking.
Rung 3: how do pairs work?
Pairs apply to two cells and two digits, and they come in two forms that mirror each other.
A naked pair is visible on the cells. Two cells in the same house carry exactly the same two candidates, say 6 and 7. Between them they must hold 6 and 7, in one order or the other, so those digits can be removed from every other cell of the house. The two marks must match exactly. A cell with 6 and 7 next to a cell with 6 and 8 is not a naked pair.
A hidden pair is visible on the digits. In a house, two digits each fit in only the same two cells. Those cells must hold those two digits, so every other candidate can be removed from them. The pair is hidden because the cells usually show extra marks that disguise it.
Both rest on counting: two cells cannot hold more than two digits, and two digits need two cells. In the frequency data a pair technique was used in a minority of Medium puzzles, with naked pairs more common than hidden pairs, so learn naked pairs first. The lessons on naked pairs and hidden pairs show real diagrams.
Rung 4: what do triples and X-Wing add?
Naked triples extend the idea of the naked pair to three cells. Three cells in a house whose candidates, taken together, are only three different digits must hold exactly those three digits. The cells do not each need all three. A cell with 2 and 5, one with 5 and 8, and one with 2 and 8 form a triple, and so does a mixture of two- and three-candidate cells. Remove the three digits from the rest of the house. The usual trap is to require identical lists in each cell, which misses most real triples.
X-Wing tracks a single digit across two rows. If a digit has exactly two possible cells in each of two rows, and the cells are in the same two columns, the digit fills one diagonal of that rectangle or the other. Either way, both columns get their copy from inside the rectangle, so the digit can be removed from the other cells of those two columns. The same works with rows and columns swapped. It is easiest to look for X-Wings on digits that are already placed many times.
Both appear first at Hard on this site, and the naked triples and X-Wing lessons give the details.
Rung 5: what are XY-Wing, simple coloring and Swordfish?
These techniques use forced either-or reasoning. They are harder to see, but each rests on a short argument.
An XY-Wing uses three cells that each have exactly two candidates. The pivot holds X and Y. One wing, which sees the pivot, holds X and Z. The other wing, which also sees the pivot, holds Y and Z. If the pivot is X, the first wing cannot be X, so it is Z. If the pivot is Y, the second wing is Z. Either way one wing is Z, so Z can be removed from any cell that sees both wings.
Simple coloring follows one digit through a chain. Wherever the digit has exactly two possible cells in a house, those two cells are linked: one of them is true. Color the cells of a chain alternately. Exactly one colour is true. If two cells of the same colour see each other, that colour is false and the other is true. If a cell sees cells of both colours, it cannot hold the digit. Because a placed digit or an elimination can break a link, rebuild the chain after any change.
Swordfish stretches the X-Wing to three rows and three columns. If a digit’s possible cells in three rows all lie within the same three columns, the digit can be removed from the other cells of those columns. The rows do not need identical column sets, because it is the union that counts.
In the Expert sample, XY-Wing and simple coloring were used in most puzzles, and Swordfish in only a few, so learn the XY-Wing and simple coloring lessons before the Swordfish lesson.
Rung 6: what is a unique rectangle?
A unique rectangle is different from every other technique here, because it relies on a promise: the puzzle has exactly one solution. Suppose four cells form a rectangle across exactly two boxes, three of the corners hold only the same two candidates, say 4 and 6, and the fourth corner holds those and more. If the fourth corner took 4 or 6, the four cells could trade those digits and give a second solution, which a valid puzzle cannot have. So 4 and 6 are removed from the fourth corner.
Use it only on puzzles you know to be unique, and only when you have no pure-logic technique available. Every puzzle on this site is checked to have exactly one solution before it is stored, as the generation guide explains, but a puzzle from elsewhere may not be. The unique rectangles lesson covers the cases in which the shortcut is safe.
What should you look for, given what you see?
When you have marks on the board and need a next move, let the shape of the marks point to a technique.
| What you see in the marks | Try |
|---|---|
| A cell with one mark | Naked single |
| A digit marked in only one cell of a house | Hidden single |
| A digit in a box, all on one line | Pointing pair |
| A digit in a line, all inside one box | Box/line reduction |
| Two cells in a house with identical pairs of marks | Naked pair |
| Two digits that appear only in the same two cells of a house | Hidden pair |
| Three cells in a house that use only three digits between them | Naked triple |
| A digit with two spots in each of two rows, lining up in two columns | X-Wing |
| Several two-mark cells that see each other, sharing digits | XY-Wing |
| A digit with many two-spot houses linked end to end | Simple coloring |
| Three corners of a rectangle with the same two marks | Unique rectangle |
Why does the order matter?
There are two reasons to climb the ladder in order instead of hunting for the most impressive pattern. The first is effort: singles take seconds to check, while chains take minutes, so the cheap check should always come first. The second is accuracy. The higher a technique sits, the more marks it depends on, and one stale mark can produce a false pattern. Placing a few singles first often removes the need for a heavy technique altogether, since each placement clears candidates across a row, a column and a box.
The solver’s order also shapes the statistics. Pointing pairs come before box/line reduction in the solver’s list, so when both apply the solver takes the pointing pair. In the Medium sample, pointing pairs were used by 952 of 1,000 puzzles and box/line reduction by 301, a gap that partly reflects that ordering.
What if nothing seems to work?
Work through this list before assuming a puzzle needs something exotic.
- Refresh your marks. Compare a few cells to the board. A mark left behind for a digit already in the row, column or box can hide a single or invent a pair.
- Return to the top. Every time you make a change, look for singles again.
- Check both orientations. Many techniques exist in a row version and a column version.
- Check every house. Boxes are the house that gets skipped most often.
- Ask for the second hint level. It names the technique without giving the move. Find the move yourself, then read the lesson.
- Take a break. A fresh look often finds the move in seconds.
The game also has a learn mode, in which each step names the technique and explains why it works, and nothing in it is saved or counted. Do not guess. Every puzzle here has exactly one solution and, at the levels the site offers, can be solved by deduction. The common mistakes guide covers the errors that make a puzzle appear stuck when it is not.
How does the method carry over to the variants?
The ladder stays the same, and only the houses change.
- The 4×4 and 6×6 boards use smaller houses, so singles and the simpler techniques do nearly all the work.
- The diagonal, hyper and anti-knight boards add extra houses or restrictions, which give you more places where a digit is forced or ruled out. Check the extra rule whenever you count what a cell can hold.
- The irregular board replaces the boxes with jigsaw regions. Rows and columns are unchanged, so techniques such as X-Wing still work, but you must read each region from its outline.
- The killer board adds cages with target sums, which bring extra deductions about which digits a cage can hold.
- The 16×16 board uses the symbols 1 to 9 and A to G with 4×4 boxes. The techniques are the same, but there is far more to scan, so marking carefully matters even more.
The unique-rectangle shortcut is used only on boards with nothing beyond ordinary rows, columns and regions.
How should you practice?
Pick the level where you can finish a puzzle with only a hint or two, then use the climb: master the rung you are on, read the lesson for the next one, and look for it in your next puzzle. The strategy guide for each difficulty sets out what to learn at each level, and the mobile tips help if you play on a phone. When you are ready, choose a level on the home page, or try the daily Sudoku for a short, shared challenge. For the other tutorials and the data behind them, see the guides hub.