What is an XY-Wing in sudoku?
A pivot with two candidates and two pincers, why the elimination holds whichever way the pivot falls, and the search that finds one in a minute instead of an hour.
An XY-Wing is the technique where sudoku starts to feel like a proof rather than a search. Nothing about the pattern is visual — there is no rectangle, no line, no shape to notice. It is three cells related by what they can see, and you find it by asking questions rather than by looking.
Despite the name it has nothing to do with an X-Wing. The letters here are literally the candidate digits.
The three cells
Every cell in an XY-Wing has exactly two candidates. Not one, not three. That restriction is what makes the argument airtight, and it is also why the technique only becomes available fairly late in a grid, once cells have been whittled down.
Call the three digits involved X, Y and Z. Then:
- One cell — the pivot — has candidates X and Y.
- A second cell — a pincer — has candidates X and Z, and it can see the pivot.
- A third cell — the other pincer — has candidates Y and Z, and it can also see the pivot.
Two cells see each other when they share a row, a column or a box. The pivot must see both pincers. The two pincers do not need to see each other, and usually they do not.
A concrete set: the pivot holds 3 or 7, one pincer holds 3 or 9, the other holds 7 or 9. Here X is 3, Y is 7, Z is 9 — Z being the digit the two pincers share.
Why the elimination is forced
The pivot is either X or Y. There is no third option. Follow both branches.
Suppose the pivot is X. Then the pincer that sees it cannot also be X, so that pincer must be Z.
Suppose instead the pivot is Y. Then the other pincer cannot be Y, so that pincer must be Z.
Either way, one of the two pincers is Z. You do not know which — and that does not matter, because the conclusion is the same in both branches: a Z exists somewhere among the pincers.
So any cell that can see both pincers is looking at a Z no matter how the puzzle resolves. Z can be eliminated from every such cell. That is the entire technique.
This is worth savouring, because it is the first time most players make a deduction that is true in both branches of a case split without resolving the split. That habit is what carries you through the hardest grids.
Where the eliminations land
Find the cells that both pincers can see. If the two pincers share a row, that is the rest of the row. If they share a box, that is the rest of the box. Very commonly they share nothing directly, and the shared vision is a single cell sitting at the intersection — one pincer’s row crossing the other pincer’s column.
That intersection cell is the classic XY-Wing payoff. One cell, one candidate removed, and the grid opens up. It looks like a tiny reward for a lot of thinking, and it usually is not — that removal is normally the thing the whole puzzle was waiting on.
Note that the pivot itself is never eliminated from, and no digit gets placed by the technique directly.
A search order that works
Hunting for XY-Wings by scanning the grid is hopeless. Do it structurally instead.
- List every cell with exactly two candidates. On a stuck grid there are usually somewhere between five and fifteen. Everything else is irrelevant.
- Take one of them as a candidate pivot, with digits X and Y.
- Among the other two-candidate cells, find those the pivot can see. Only those matter.
- Within that short list, look for one containing X plus some third digit Z, and another containing Y plus the same Z.
- If you find the pair, work out which cells both pincers see, and remove Z from them.
- If the pivot yields nothing, move to the next two-candidate cell and repeat.
Framed as a list of two-candidate cells, this is minutes of work at most. Framed as staring at an 81-cell grid, it is impossible. The technique has a reputation for difficulty that belongs almost entirely to the search, not to the logic.
Where it sits
XY-Wing is Expert-band material in Sudoku - Calm Number Puzzle, alongside X-Wing and Swordfish. Because difficulty here is the hardest technique the solver genuinely needed, a puzzle graded below Expert never requires one — if you feel forced into an XY-Wing on a Hard grid, there is a cheaper deduction available that you have not spotted yet.
Frequently asked questions
Do all three cells need exactly two candidates?
Yes, all three. If any of them has a third candidate the case split collapses — the pivot might be that third digit, and then neither pincer is forced to be Z. This is the most common way people apply the technique incorrectly.
Do the two pincers have to see each other?
No, and usually they do not. Only the pivot needs to see both. What matters afterwards is finding the cells that both pincers see, which is often a single cell at a row-column intersection.
What is the difference between an XY-Wing and an XYZ-Wing?
In an XYZ-Wing the pivot has three candidates — X, Y and Z — rather than two. Then the pivot could itself be the Z, so the eliminations only apply to cells that see all three of the pivot and both pincers, which is a much smaller set. Same idea, weaker conclusion.
Is an XY-Wing related to an X-Wing?
Only by name. An X-Wing concerns one digit across four cells forming a rectangle. An XY-Wing concerns three digits across three two-candidate cells linked by visibility. You look for entirely different things.
Try it on a real puzzle
Sudoku - Calm Number Puzzle grades every puzzle by the hardest technique it actually needs, verifies a single solution before you ever see the grid, and its hints name the technique instead of just filling in a digit. Free, offline, no ads and no account.