Sudoku strategies: from pairs to X-wings and Y-wings

10 min readUpdated

Once singles stop working, harder sudoku asks you to cross numbers out before you can fill one in. This guide walks through the techniques in the order our puzzles need them, from pointing and pairs to X-wings, Y-wings and swordfish, each with a worked example.

On this page
  1. Before you start: honest pencil marks
  2. The order our puzzles use
  3. Pointing and box-line: where a box meets a line
  4. Pairs and triples, naked and hidden
  5. X-wing and swordfish
  6. Y-wing: the hinge
  7. When the list runs out
  8. Common mistakes
  9. Practising here

Before you start: honest pencil marks

Every technique in this guide works on pencil marks: the small numbers you write in a square to show what it could still be. On a Gentle or Easy puzzle you can manage without them. From Medium upwards, the steps are about crossing marks out, and you can only cross out what you've written down.

So on a harder puzzle, it pays to mark every empty square once, carefully. For each square, look along its row, down its column and around its box, and write every number that isn't already there. It takes a few minutes, but it pays off.

Two habits keep the marks honest:

  • Remove as you place. When you put a 6 in a square, take 6 out of the marks in the same row, column and box straight away. One stale mark can send you down the wrong road for a long time.
  • Only cross out with a reason. Every mark you remove should come from a rule or a technique you could explain. If you can't say why, leave it.

If the rules or the basic steps (hidden and naked singles) are new to you, start with our beginner's guide to sudoku and come back here when Medium puzzles feel comfortable.

The order our puzzles use

Every puzzle on Play Free Puzzles is graded by a solver that only uses techniques a person can use, trying the easiest first. The level a puzzle gets depends on the hardest technique it needs. That means the list below is also a map of the levels: learn the next row and the next level opens up.

TechniqueWhat it doesFirst needed at
Naked singleA square with only one number leftGentle
Hidden singleA number with only one place left in a row, column or boxEasy
Pointing and box-lineA number trapped where a box and a line crossMedium
Naked pairTwo squares that share the same two numbersMedium
Hidden pairTwo numbers that share the same two squaresMedium
Naked and hidden triplesThe same ideas with three squares and three numbersHard
X-wingOne number in two rows, lined up in two columnsHard
Y-wingThree squares of two marks each, linked like a hingeHard
SwordfishAn X-wing stretched over three rows and three columnsHard

Expert puzzles are the ones this list can't finish. They still have exactly one answer, but they need longer chains of reasoning than any single pattern here.

Pointing and box-line: where a box meets a line

These two are mirror images, and our grader treats them as one step.

Pointing. Look inside one box at a single number, say 4. If every square in that box that could hold a 4 sits in the same row, then the box's 4 must be in that row. You don't yet know which square, but you know the row's 4 is taken care of inside this box. So you can cross 4 off every other square of that row, in the two boxes beside it.

Box-line. Now turn it round. Look along a row (or a column) at one number, say 8. If every square in that row that could hold an 8 falls inside the same box, the row's 8 is inside that box. So the box's 8 is in that row too, and you can cross 8 off the box's other two rows.

A worked example: in row 5, the only squares marked with an 8 are in columns 4 and 6. Both are in the middle box. So the middle box's 8 sits in row 5, and any 8 marked in rows 4 and 6 of that box can go. Often that leaves a hidden single elsewhere in the box.

Pairs and triples, naked and hidden

Naked pair. Two squares in the same row, column or box both have exactly the same two marks, say 2 and 6. One of them is the 2 and the other is the 6. You don't know which way round, but between them they use up both numbers. So 2 and 6 can be crossed off every other square in that row, column or box.

Hidden pair. Here the numbers are the clue, not the squares. In row 4, suppose the 3 and the 9 can each only go in the same two squares, in columns 2 and 7. Those two squares must hold the 3 and the 9, so any other marks in them can go. If the square in column 2 was marked 1, 3, 5, 9, it becomes just 3, 9. Hidden pairs are harder to see because the squares look crowded until you clear them.

Naked triple. Three squares in one unit whose marks, put together, use only three numbers. They don't each need all three. For example, squares marked {1, 4}, {4, 9} and {1, 9} in the same column can only be 1, 4 and 9 between them, so those three numbers can be crossed off the rest of the column.

Hidden triple. Three numbers that, within one unit, can only go in the same three squares. Those squares must hold those three numbers, so their other marks go.

In our grading, pairs belong to Medium and triples to Hard. A Medium puzzle never needs a triple.

X-wing and swordfish

These two look at one number across several rows at once.

X-wing. Take the number 6. In row 2, the 6 can only go in columns 3 and 8. In row 7, the 6 can also only go in columns 3 and 8. Row 2's 6 is in column 3 or column 8, and so is row 7's. They can't both be in the same column, so one of them is in column 3 and the other in column 8. That means columns 3 and 8 each have their 6 in row 2 or row 7, and no other square in those two columns can be a 6. Cross 6 off everywhere else in columns 3 and 8.

The four squares form the corners of a rectangle, which is where the name comes from. The same works with columns and rows swapped: one number in two columns, lined up in the same two rows, clears those rows.

Swordfish. The same idea over three rows and three columns. If, in each of three rows, a number can only go in some of the same three columns (two or three squares per row), then those three rows use up that number in all three columns. Cross it off the rest of those columns. Swordfish is the last technique our grader tries, and in a sample of our Hard puzzles it was needed only now and then.

Y-wing: the hinge

If you only learn one Hard technique, make it this one. In a sample of our Hard puzzles, most needed a Y-wing at least once.

You need three squares, each with exactly two marks. The middle one, the hinge, has two numbers, say 3 and 7. It shares a row, column or box with each of the other two, the wings. One wing has 3 and 5, the other has 7 and 5. The 5 is the number they share.

Now follow both paths. If the hinge is 3, the first wing can't be 3, so it's 5. If the hinge is 7, the second wing can't be 7, so it's 5. Either way, one of the wings is a 5. So any square that shares a unit with both wings can't be a 5. Cross it off.

3 7 3 5 5 7 not 5
The butter square is the hinge (3 or 7). The mint squares are the wings. Whichever number the hinge takes, one wing becomes a 5, so the pink square, which sees both wings, can't be a 5.

The pink square in the picture sees the first wing down its column and the second wing along its row. Squares can also see a wing through a shared box, so check all three kinds of unit.

When the list runs out

Expert puzzles are made so that our step-by-step solver gets stuck partway through, yet a full search still finds exactly one answer. That doesn't mean you have to guess. Seasoned solvers use longer chains: following what a run of two-mark squares would force, or spotting larger patterns than the ones above. You can enjoy Expert puzzles without knowing their names.

A few habits help on any hard grid:

  • Sweep the cheap steps first. After every elimination, look again for singles. A big technique usually unlocks only a small change, and the singles do the rest.
  • Count the marks. Squares with only two marks are the raw material for pairs and Y-wings. Scan for them.
  • One number at a time. For X-wings and swordfish, pick one number and look only at its marks across the whole grid.

Common mistakes

  • Missing marks. If you forgot to write a 4 in a square that could be a 4, every technique built on those marks can mislead you. When something feels wrong, recheck a few squares from scratch.
  • Mixing up naked and hidden. A naked pair clears the other squares of the unit. A hidden pair clears the other marks in its own two squares.
  • Half an X-wing. Both rows must have the number in exactly the same two columns, and only there. A third mark in either row breaks the pattern.
  • The wrong target in a Y-wing. The square you clear must see both wings, not just one, and you can only remove the shared number.
  • Guessing to get moving. A guess on a hard puzzle can hide for a long time before it shows. If you're stuck, a hint is quicker than unpicking a wrong guess.

Practising here

Our sudoku has five levels, Gentle, Easy, Medium, Hard and Expert, with 500 numbered puzzles each, every one with exactly one answer. The hard sudoku page opens straight onto the Hard and Expert levels, and the daily sudoku is a Medium puzzle, the same for everyone each day, which makes it a good place to practise pointing and pairs.

  • Notes. Tap Notes to write pencil marks. A switch in the start options clears the marks in the same row, column and box when you place a number.
  • Hint. A hint fills in one square and the host says why, mentioning the pattern it took on harder puzzles, such as "With an X-wing pattern" or "Thanks to a pair of squares nearby". If a number you've placed is wrong, the hint puts that right first. When logic alone is stuck on an Expert puzzle, the hint fills the square with the fewest options left.
  • Check and mistakes. Tap Check to show any numbers that don't match the answer, or switch on "Show mistakes" before you start. If you place a number that's already in the row, column or box, the host tells you which.
  • Undo. Unlimited, and it covers pencil marks too.
  • Score. Each level has base points (100 for Gentle up to 600 for Expert), and each hint takes off a tenth of the base, never more than half. Time and mistakes never cost points, and there's no timer unless you switch one on.

Stuck on a puzzle from a book or newspaper? Type it into our sudoku solver. It shows the next step with the reason, and can grade the puzzle using the same list of techniques. If you prefer paper, printable sudoku has every level, with an answers page.

Was this guide helpful?

More guides

All 36 guides