XY-Wing in Sudoku
An XY-wing uses three cells that each hold exactly two candidates: a pivot with the digits X and Y, and two pincers that see the pivot and hold X with Z and Y with Z. One pincer must be Z, so Z can be removed from every cell that sees both pincers.
When to use it
- You have full notes and many cells with exactly two candidates.
- Singles, pairs and fish patterns have stopped working.
- A bivalue cell sees two other bivalue cells that each share one digit with it.
- You want an elimination that works across different units instead of inside one row, column or box.
How to spot it
- List the cells that have exactly two candidates, called bivalue cells.
- Choose one as the pivot, with candidates X and Y.
- Find one cell that sees the pivot and holds X and Z, and another that sees the pivot and holds Y and Z, with the same Z.
- Find cells that see both pincers and have Z as a candidate.
- Remove Z from those cells. If none exist, try another pivot.
Worked example on a real board
This is a real position from puzzle expert-0090 of our library. 62 of the 81 cells are filled in and 19 are still empty.
R7C4 holds 4 or 9. If it is 4, then R8C6 must be 2. If it is 9, then R7C8 must be 2. Either way one of them is 2, so 2 can be removed from every cell that sees both: R7C5, R8C8, and R8C9.
Candidates in the cells that matter:
- R7C4: 4 and 9
- R7C5: 2, 7, and 9
- R7C8: 2 and 9
- R8C6: 2 and 4
- R8C8: 2, 5, and 9
- R8C9: 2 and 5
Result: these candidates are removed: R7C5 (loses 2), R8C8 (loses 2), and R8C9 (loses 2).
Why it works
The pivot is either X or Y. If it is X, the pincer holding X and Z cannot be X, so it becomes Z. If it is Y, the other pincer cannot be Y, so it becomes Z.
One of the pincers is Z in both cases. A cell that sees both pincers would see that Z whichever way the pivot goes, so it cannot be Z.
The XY-wing is a chain of reasoning with three links: the pivot is one digit or the other, and either choice forces the same digit into one of the pincers. It is the simplest pattern where you have to think in terms of what must be true on every branch.
In our library, the XY-wing is the technique that most separates expert puzzles from hard ones. Learning to find bivalue cells quickly pays off well beyond this single pattern.
XY-wing compared with X-wing
An X-wing is built from one digit repeated across a rectangle. An XY-wing is built from three different digits across three cells, and the cells do not have to form a rectangle or share a unit. It needs only bivalue cells, which makes it easier to find with full notes than a fish pattern.
| Feature | XY-wing | X-wing |
|---|---|---|
| Cells involved | 3 cells: a pivot and 2 pincers | 4 cells in 2 rows and 2 columns |
| Difficulty level | Expert technique | Hard technique |
| Our puzzles that use it | 1,985 / 8,000 (25%) | 480 / 8,000 (6%) |
| What it does | Removes 1 digit from cells seeing both pincers | Removes 1 digit from the rest of 2 lines |
How often our puzzles need it
Of the 8,000 puzzles in our library, 1,985 (25%) use XY-wing at least once on the way to the solution. In 1,939 of them it is the hardest technique the puzzle needs.
| Level | Puzzles | Use it | Share | Need it as the hardest |
|---|---|---|---|---|
| Easy | 2,000 | 0 | 0% | 0 |
| Medium | 2,000 | 0 | 0% | 0 |
| Hard | 2,000 | 0 | 0% | 0 |
| Expert | 2,000 | 1,985 | 99% | 1,939 |
A technique is counted when our solver, which always takes the simplest available step first, applies it at least once. A pattern that is on the board but not needed is not counted. These numbers are recalculated from the puzzle files whenever the site is built.
Common mistakes
- Choosing pincers that do not see the pivot. Each pincer must share a row, column or box with the pivot.
- Using pincers with different Z digits. Both pincers must share the same third digit.
- Removing Z from cells that see only one pincer. A cell must see both pincers to lose Z.
- Using a cell with three candidates as the pivot or a pincer. All three cells must be bivalue.
Tips for finding it faster
- Mark every cell with exactly two candidates. If you use auto-notes, these are the cells showing two small digits.
- For each such cell, look at the two-candidate cells it sees. A good pivot sees two partners that each share one digit with it and carry the same third digit.
- Check the cells that see both pincers. Only those lose the shared digit.
Frequently asked questions
What is an XY-wing in Sudoku?
It is a three-cell pattern with a bivalue pivot and two bivalue pincers. The pivot holds X and Y, one pincer holds X and Z, and the other holds Y and Z. One of the pincers must be Z, so Z is removed from cells that see both.
What is an XYZ-wing?
An XYZ-wing is a variation where the pivot holds three candidates, X, Y and Z, and the pincers hold X with Z and Y with Z. Z is removed from cells that see the pivot and both pincers. Our hints and puzzle ratings use the XY-wing only, and every puzzle here can be solved without an XYZ-wing.
Does the XY-wing have to form a rectangle?
No. The three cells only need to see each other in the pivot-to-pincer pattern. They can be in different rows, columns and boxes.
Why is the XY-wing an expert technique?
It requires you to track three different digits across three cells in different units. It does not follow a single row or column, so it is harder to notice. Our expert puzzles are the ones that need it.
Keep learning
Try it yourself on real positions:
Practice XY-wing drillsTake the XY-wing lesson
Two related techniques
- X-wingA rectangle of one digit across two rows and two columns.
- Naked pairTwo cells in a unit that share the same two candidates.
All sudoku strategiesOpen the step-by-step solverPlay Expert