How to Solve Sudoku: From the Rules to Advanced Techniques
Sudoku looks like a numbers game, but it is pure logic. Learn the rules, then build up a toolkit of techniques that will crack everything from a gentle warm-up to a fiendish expert grid.
The one rule of Sudoku
Sudoku has a single, elegant rule that drives everything else. The board is a 9×9 grid, divided into nine 3×3 boxes. Your job is to fill every empty cell so that each row, each column, and each 3×3 box contains the digits 1 through 9 exactly once. No digit may repeat within any row, column, or box. A proper puzzle starts with just enough given numbers — usually 22 to 30 — to guarantee exactly one solution. There is no arithmetic involved: the digits are simply nine distinct symbols, which is why the same puzzle works equally well with colors or letters. Sudoku is, at its heart, a constraint-satisfaction puzzle solved entirely by deduction.
That “exactly one solution” promise matters more than it sounds. It means you never have to gamble. Every cell on the board can, in principle, be deduced from the cells around it. If you ever feel forced to guess, you are missing a technique — not luck. The Sudoku game gives you fresh puzzles in three difficulties so you can practice each technique below until it becomes second nature.
Anatomy of the grid
Before diving into techniques it helps to nail down the vocabulary, because precision matters when you are working through a logical argument. The 9×9 grid contains 81 cells arranged in 9 rows (numbered top to bottom, 1–9), 9 columns (numbered left to right, 1–9), and 9 boxes (the thick-bordered 3×3 regions). A row, column, or box is collectively called a unit. Two cells that share a unit are said to see each other, which is the core idea behind every elimination: if digit D is already placed in a cell, no other cell that sees it can also hold D.
It is useful to think of the nine boxes arranged in a 3×3 meta-grid: three boxes across and three boxes down. Solvers often label them B1–B9 reading left-to-right, top-to-bottom, and label the three horizontal strips of three boxes each a band, while the three vertical strips are called stacks. This vocabulary unlocks pattern names like “X-Wing” and “Swordfish” that would be clumsy to describe otherwise. You do not need to memorize it before you start — just be aware of it as patterns grow more complex.
Where to start: scanning and cross-hatching
The fastest opening move is to scan, not to stare. Look across the whole board for the digit that already appears most often — say, there are already five or six 7s placed. For each box that is still missing a 7, use cross-hatching: mentally draw lines through every row and column that already contains a 7. Those lines eliminate cells, because a 7 cannot go where a 7 already exists in the same row or column. Often this narrows a box down to a single legal cell, and you can place the digit with certainty.
Work through the high-frequency digits first, because they give you the most eliminations for the least effort. Each number you place adds new constraints, which can unlock the next placement. This scanning phase alone will solve most of an easy puzzle and give you a strong foothold on a harder one.
A quick discipline that separates competent solvers from beginners: always check all nine digits for every unsolved box before deciding a box is stuck. Many beginners scan horizontally and vertically but forget to consider whether the box itself already contains a digit that eliminates cells. Horizontal, vertical, and box — all three, every time.
Naked singles (the sole candidate)
A naked single is a cell that has only one possible digit left. Pick an empty cell and ask which digits are already present in its row, its column, and its box. If eight of the nine digits are accounted for, the ninth must go in that cell. Naked singles are the bread and butter of solving — every puzzle is ultimately a chain of them — but on harder grids they only become visible after you have done some elimination work first.
The practical tip is to look for cells that already have many filled neighbors. A cell in the center of the grid is seen by 20 other cells (8 in its row, 8 in its column, 8 in its box, minus the 4 shared by both row/column and box). A corner cell is seen by only 20 as well — the grid is symmetric — but mid-band cells often accumulate constraints faster because multiple heavily-filled rows and columns converge on them. Pick the most constrained cell first.
Hidden singles
A hidden single is the same idea seen from the opposite direction. Instead of asking “what can go in this cell?”, ask “where can this digit go in this unit?” Take a box that is missing a 4. If, after cross-hatching, only one cell in that box can legally hold a 4 — even if that cell could also hold other digits — then it must be the 4, because every box needs one. Hidden singles are easy to miss because the cell looks like it has several options; the trick is to think per-digit and per-unit, not just per-cell.
Hidden singles occur in rows and columns too, not just boxes. If a row is missing a 6 and only one of its empty cells lies in a column that does not already have a 6 and a box that does not already have a 6, then that cell is the hidden single for the 6 in that row. Training yourself to sweep each unit for each digit — nine digits times nine units is 81 quick mental checks — will reveal more placements than any other single habit.
Pencil marks: your working memory
Once scanning stops yielding easy placements, switch to pencil marks (also called candidates). In every empty cell, note the small list of digits that are still legally possible there. This externalizes the bookkeeping your brain would otherwise have to hold, and it makes the more advanced patterns visible. Keep your marks accurate: every time you place a digit, erase that digit from the candidates of every cell in the same row, column, and box. Sloppy pencil marks lead to contradictions that are painful to unwind.
A useful filling discipline: work through all 81 cells in order, left-to-right, top-to-bottom, and write every candidate for each empty cell. Then do a second pass from scratch to check your marks against the filled cells. This double-pass catches transcription errors before they compound. Once your marks are trusted, the patterns below become visible almost immediately.
Naked pairs and triples
With candidates in place, look for a naked pair: two cells in the same unit (row, column, or box) that each contain exactly the same two candidates — for example, both hold only {3, 7}. You do not yet know which cell is the 3 and which is the 7, but you know those two cells will consume both the 3 and the 7 between them. Therefore you can safely remove 3 and 7 from the candidates of every other cell in that unit. The same logic extends to a naked triple — three cells sharing three candidates among them — which lets you eliminate those three digits elsewhere in the unit.
A naked triple does not require each of the three cells to hold all three candidates. If cell A holds {1, 2}, cell B holds {2, 3}, and cell C holds {1, 3}, the three together contain exactly {1, 2, 3} and nowhere else in the unit can 1, 2, or 3 appear. This variant is called a broken triple but the elimination is identical.
Pointing pairs and box-line reduction
These two techniques connect a box to its rows and columns. Pointing pairs: if the only candidates for a digit within a box all lie on a single row (or column), then that digit must end up in that row inside this box — so you can eliminate it from the same row in the other boxes. Box-line reduction is the reverse: if a digit’s only candidates in a row (or column) all fall inside one box, that digit must live in that box on that line, so you can remove it from the rest of the box. Together they keep boxes and lines in sync and often break open a stalled puzzle.
Worked example: solving a corner box step by step
Suppose the top-left box (B1) is missing digits 2, 5, and 8 with three empty cells remaining: R1C3, R2C1, and R3C2. Begin with cross-hatching. Row 1 already has an 8 elsewhere, so R1C3 cannot be 8. Column 1 already has a 2, so R2C1 cannot be 2. Column 2 already has a 5, so R3C2 cannot be 5. After these three eliminations the candidates are:
- R1C3: {2, 5}
- R2C1: {5, 8}
- R3C2: {2, 8}
Now look for a naked pair: R1C3 and R3C2 do not share the same two candidates, so no pair there. But notice that 8 appears only in R2C1 and R3C2 — those are the only two cells in B1 that can hold an 8. Both of those cells lie in column 1 or column 2 within the top-left band’s first row range. More importantly, check column 2: if column 2 already has an 8 placed somewhere outside B1, then R3C2 cannot be 8, and therefore R2C1 must be 8, which makes R1C3 hold 5 (the only remaining option), and R3C2 hold 2. A single external constraint cascades through all three cells. This domino effect is what makes Sudoku so satisfying: patience plus systematic elimination eventually leaves no ambiguity.
Hidden pairs and hidden triples
A hidden pair is a subtler cousin of the naked pair. Two digits appear as candidates in exactly the same two cells within a unit — nowhere else in that unit can those two digits go. Even if those cells hold other candidates as well, you can remove all the extra candidates from those two cells, because the two digits “own” those cells. Hidden pairs are easily missed because the cell candidate lists look messy; you find them by focusing on the digit rather than the cell.
A hidden triple follows the same logic with three digits in three cells. It is one of the harder patterns to spot manually because the three cells may each contain several other candidates. Computer solvers find them quickly, but humans usually stumble across them by noticing two of the three and then checking whether a third digit is similarly confined.
X-Wing and advanced row-column patterns
The X-Wing is the first technique that operates across two rows and two columns simultaneously. Here is how to recognize it: scan a single digit across all nine rows. Find two rows where that digit’s candidates appear in exactly the same two columns. Because the digit must appear once in each row, it will occupy one of the two columns in row A and the complementary column in row B — forming a rectangle whose four corners are the only cells that can hold that digit in those two rows. The critical consequence: every other candidate for that digit in those two columns can be eliminated, because the digit is guaranteed to appear in one of those two cells per column.
The X-Wing is most likely to appear in expert-level puzzles where scanning and pairs have already been exhausted. It can also work column-first: find two columns where a digit’s candidates appear in exactly the same two rows, then eliminate from those rows. Either orientation is valid.
A Swordfish extends X-Wing to three rows and three columns: a digit’s candidates in three rows each confined to the same three columns (though not necessarily both columns in each row). The elimination targets all other candidates in those three columns. Swordfish sightings are rare on standard grids but will occasionally be the only way to break through a fiendish puzzle without resorting to bifurcation.
How puzzles are generated and graded
Every publishable Sudoku starts with a fully solved grid. A solver then removes givens one at a time, checking after each removal whether the puzzle still has a unique solution. If removing a clue creates ambiguity — two or more valid completions — that clue is put back and a different cell is tried. The process ends when no further clue can be removed without breaking uniqueness.
Difficulty grading is usually done by running an automated solver and recording the hardest technique it needed. A puzzle that yields to naked singles alone is rated “Easy.” One that demands naked pairs is “Medium.” Pointing pairs and box-line reduction push into “Hard.” X-Wing and above qualify as “Expert” or “Fiendish.” The Sudoku game on sourcecodestack uses this graded generation approach so that the difficulty label you see reliably predicts the techniques you will need.
One implication of this process: the number of givens is a rough but imperfect guide to difficulty. Puzzle constructors can produce an easy puzzle with only 26 givens if the arrangement is favorable, and a medium puzzle with 32 givens if the clue positions happen to require pairs to resolve. Technique depth, not clue count, is the true measure.
Difficulty levels and the techniques they need
| Difficulty | Typical givens | Techniques required |
|---|---|---|
| Easy | 32–38 | Scanning, naked & hidden singles |
| Medium | 28–31 | Singles plus naked pairs and pointing pairs |
| Hard / Expert | 22–27 | All of the above plus triples, box-line reduction, and chains |
Fewer givens does not automatically mean harder — difficulty is really about which techniques a puzzle forces you to use. A grid with 26 givens that only needs hidden singles is easier than one with 30 givens that demands box-line reduction.
Sudoku as a mental workout: focus and mindfulness
Researchers studying cognition have observed that logic puzzles like Sudoku engage working memory, sustained attention, and executive function — the cluster of skills responsible for planning and inhibiting impulsive responses. When you hold a naked pair in mind while scanning a row, you are exercising the same cognitive circuitry that helps you concentrate at work or follow a complex conversation. The practice effect is real even if modest: regular puzzlers tend to report quicker pattern recognition and greater comfort with abstract reasoning over time.
Beyond raw cognition, Sudoku has a meditative quality. The task is precisely scoped — 81 cells, one rule — which means the mind can settle into focused attention without the ambient anxiety of open-ended work. Many solvers describe their daily puzzle as a deliberate pause: a few minutes of single-tasking in an era of interruptions. If you solve on paper, the physical act of writing candidates and crossing out errors adds a tactile dimension that screens alone cannot replicate. Either medium works; what matters is showing up regularly.
For beginners anxious about making mistakes: errors on a Sudoku are not failure, they are data. A contradiction — two of the same digit in a row — tells you precisely where your reasoning departed from the truth. Tracing the error back is itself a reasoning exercise. Many experienced solvers deliberately choose puzzles at the edge of their ability because the productive struggle is where the mental growth happens.
Building a solving routine
Expert solvers do not work randomly; they follow a hierarchy of techniques ordered from cheapest to most complex, and they only escalate when the simpler level yields nothing. A practical routine looks like this:
- Pass 1 — Scan. Cross-hatch each digit 1–9 against every unsolved box. Place any naked or hidden singles that emerge. Repeat until no more placements.
- Pass 2 — Mark candidates. Fill pencil marks in every empty cell. Recheck after each placement.
- Pass 3 — Pairs and pointing. Sweep every unit for naked pairs, then for pointing pairs and box-line reduction. Update marks after each elimination and restart the pass if you find anything.
- Pass 4 — Triples and hidden pairs. Look for naked and hidden triples, then hidden pairs. These are rarer but clear many candidates at once.
- Pass 5 — X-Wing and above. Scan for rectangle patterns across rows and columns. Use only when all previous passes are exhausted.
After any successful elimination or placement, always restart from the top of the hierarchy. A single pointing pair can create a naked single you would otherwise not see. The hierarchy ensures you never use a heavy technique when a light one would have worked.
Common mistakes to avoid
- Guessing too early. A single wrong guess can corrupt the whole grid and may not surface until many moves later, when it is hard to trace.
- Stale pencil marks. Forgetting to erase a candidate after a placement is the number-one cause of false contradictions. Update marks immediately.
- Tunnel vision on one box. If a box is stuck, move on — the constraint that unlocks it often comes from a row or column elsewhere.
- Thinking only per-cell. Hidden singles and pointing pairs only appear when you also think per-digit and per-unit.
- Skipping the restart. After any change to the grid, always restart your sweep from the simplest technique. Experienced solvers know that a newly placed digit often triggers a cascade of naked singles that would otherwise be invisible.
- Confusing box-line reduction with pointing pairs. Pointing pairs eliminate from outside the box; box-line reduction eliminates from inside the box. Mixing them up leads to false eliminations. Draw the rectangle mentally before erasing anything.
Tips to solve faster
Speed comes from recognizing patterns, not from rushing. Solve in passes: first place every easy single, then add pencil marks, then sweep for pairs and reductions, and only resort to harder chains when nothing simpler remains. Practice the same technique repeatedly until you spot it instantly — most fast solvers are simply pattern-matching shapes they have seen a thousand times. Start with easy grids in the Sudoku game, then step up the difficulty as each technique becomes automatic. Consistency beats speed; accuracy beats both.
A final tip: keep a log. After finishing a puzzle, note which technique finally broke it open. Over dozens of puzzles you will discover that your weak spot is almost always the same: maybe you rush past hidden pairs, or you never look for X-Wings. Targeted repetition of your weak technique, rather than general practice, produces the fastest improvement.