A Sudoku X-Wing is a digit that has exactly two possible cells in each of two rows, with those four cells lined up in the same two columns. The digit has to sit in two opposite corners of that rectangle, so you can erase it from every other cell of those two columns. The same works with rows and columns swapped. Look for one when singles, pairs, pointing and claiming have all stopped working, and expect it to clear a few pencil marks rather than place a digit by itself.
Below are two X-Wings from real puzzles made by Poozee's Sudoku generator, one in rows and one in columns, a step list for finding them, and what we measured on 10,000 Expert puzzles: how often an X-Wing is there when you're stuck, and how often it actually gets you moving again. Every diagram and number on this page is checked by code against the game's engine. If pairs and pointing are new to you, start with our Sudoku strategies guide, which covers every technique before this one.
Why an X-Wing works
Say digit 2 has only two pencil marks left in row 3, in columns 3 and 9, and only two in row 6, also in columns 3 and 9.
- Row 3 needs a 2, so it goes in r3c3 or r3c9.
- Row 6 needs a 2, so it goes in r6c3 or r6c9.
- The two rows can't both put their 2 in the same column. So either row 3 takes column 3 and row 6 takes column 9, or the other way around: the two diagonals of the rectangle, which make the "X".
Either way, column 3 gets its 2 from row 3 or row 6, and so does column 9. No other cell in columns 3 or 9 can be a 2. You don't learn which diagonal is right, but you don't need to: both erase the same pencil marks.
The two rows you started from are the base, and the two columns you erase from are the cover. Swap the words "row" and "column" everywhere above and you have a column-based X-Wing, which erases from two rows.
How to read the diagrams
Rows are numbered 1 to 9 from the top and columns 1 to 9 from the left, so r3c9 is row 3, column 9. Black digits (white in dark mode) are clues and blue digits were placed earlier with singles, pairs, pointing and claiming. Each diagram is the exact spot where those techniques got stuck.
The small digits are pencil marks, shown for the X-Wing's two rows and two columns. They are the marks you'd have after pairs, pointing and claiming erased everything they could, so some cells show fewer marks than their raw candidates. The tinted lines are the base, the yellow cells are the four corners (the X-Wing's digit is ringed), and the red cells are where the X-Wing erases its digit (crossed out).
Example 1: a row X-Wing on 2
This Expert puzzle starts with 25 clues. Singles, pairs, pointing and claiming fill 19 cells and then nothing works. Here is the 2 in rows 3 and 6:
- Row 3 has only two empty cells left, r3c3 and r3c9, and both can be 2.
- Row 6 has four empty cells, but 2 is a pencil mark in only two of them: r6c3 and r6c9.
Same two columns, so it's an X-Wing. Columns 3 and 9 get their 2s from rows 3 and 6, so 2 comes out of r1c3, r5c3 and r9c9.
The payoff is immediate. r1c3 had only {2,3}, so it's now a 3, and r9c9 had only {2,6}, so it's a 6: two naked singles. The other 35 empty cells then fall to singles, pairs, pointing and claiming, with no other advanced step.
Example 2: a column X-Wing on 4
Another Expert puzzle, with 23 clues. The same techniques fill 21 cells and stall. This time look down the columns for 4:
- Column 6 has 4 as a pencil mark in only two cells: r6c6 and r9c6.
- Column 8 has it in only two cells too: r6c8 and r9c8.
Same two rows, so columns 6 and 8 are the base and rows 6 and 9 the cover. Rows 6 and 9 each get their 4 from column 6 or column 8, so 4 comes out of r6c4, r9c1 and r9c4.
r9c1 had only {1,4}, so it's now a 1, and once again the other 36 empty cells fall to singles, pairs, pointing and claiming alone.
Notice what made this one easy to miss. The corner r6c8 has five pencil marks, {1,2,4,5,8}, so it doesn't look like part of a tidy pattern. An X-Wing only cares about where one digit can go, not how crowded the cells are.
How to spot an X-Wing, step by step
- Get the pencil marks right first. An X-Wing is read from the marks, so fill in every empty cell and apply your pairs, pointing and claiming. A single missing mark can create a fake X-Wing, and a stale one can hide a real one.
- Pick one digit. Go through the rows and write down each row where that digit has exactly two pencil marks, with the two column numbers: "row 3: 3 and 9".
- Look for a repeat. Two rows with the same pair of columns are the four corners of an X-Wing. A row with three marks for the digit doesn't count.
- Check the two columns. If either column has the digit as a pencil mark anywhere outside the two rows, erase it. If not, the X-Wing is real but erases nothing, so move on.
- Turn it sideways. Do the same with columns: list the columns where the digit has exactly two marks, with the row numbers, and look for a repeated pair of rows.
- Repeat for each digit from 1 to 9, then go back to singles. Every erased mark can create a naked or hidden single.
The lists stay short. On the stuck Expert grids we measured, there were 35.4 rows and columns on average where some digit had exactly two pencil marks, which is only about 3.9 per digit. Each digit gives you only a handful of rows and columns to compare.
Pro tip: In Example 1, row 3 had only two empty cells left, so its two spots for 2 were plain to see. Rows and columns that are nearly full are the fastest place to find a digit with exactly two spots.
When to use an X-Wing: what we measured
We generated 10,000 Expert puzzles and 10,000 Hard puzzles with Poozee's generator (seeds 1 to 10,000), solved each with the same techniques the game uses to grade it (singles, then naked and hidden pairs, pointing and claiming), and looked at the exact spot where they got stuck.
On Hard, you never need an X-Wing. Those techniques finished 9,997 of the 10,000 Hard puzzles, as the level promises. The other 3 were harder puzzles the generator hands out when it can't hit the target grade, and none of them had an X-Wing either.
On Expert, the techniques got stuck on every puzzle, which is what makes them Expert. Here is how often an X-Wing helped at that point:
| At the stuck spot of 10,000 Expert puzzles | Puzzles | Share |
|---|---|---|
| An X-Wing that erases at least one pencil mark | 813 | 8.1% |
| An X-Wing that leads straight to a new digit | 161 | 1.6% |
| X-Wings are the only advanced step needed to finish | 43 | 0.4% |
So an X-Wing was there in about 1 in 12 stuck Expert grids, and most X-Wings don't place anything by themselves. Of the 1,049 X-Wings we found at those stuck spots (some grids had more than one), only 217 (20.7%) led to a new digit on their own. The rest erased marks that only help once other eliminations join them. Our two examples are among the lucky 43, picked because one X-Wing cracks the whole puzzle, which is far from typical.
Rows and columns turned out equally likely: 535 of the 1,049 X-Wings were row-based and 514 column-based. If you only ever check rows, you miss about half of them.
Most X-Wings erase two to four pencil marks, 3.1 on average:
| Pencil marks erased | X-Wings | Share |
|---|---|---|
| 1 | 130 | 12.4% |
| 2 | 249 | 23.7% |
| 3 | 303 | 28.9% |
| 4 | 223 | 21.3% |
| 5 | 106 | 10.1% |
| 6 or more | 38 | 3.6% |
What else to try when there's no X-Wing
We checked three other techniques at the same stuck spots, each on its own:
| Technique | Available | Leads straight to a new digit |
|---|---|---|
| X-Wing | 8.1% | 1.6% |
| Swordfish | 5.0% | 1.3% |
| Naked or hidden triple | 9.8% | 3.3% |
| XY-Wing | 21.3% | 14.9% |
A Swordfish is the three-row version of an X-Wing: a digit whose marks in three rows all fall in the same three columns (two or three marks per row), so it leaves the rest of those columns; our Swordfish guide works through two real ones and shows how often a Swordfish is really an X-Wing turned sideways. Triples are pairs with three cells and three digits. An XY-Wing uses three cells with two candidates each: a "pivot" {x,y} that shares a row, column or box with one cell {x,z} and another {y,z}. Whichever digit the pivot takes, one of those two cells becomes z, so z can be erased from every cell that sees both of them. Our XY-Wing guide works through two real ones, with a step list for finding them.
On Poozee's Expert puzzles, the XY-Wing got a stuck grid moving about nine times as often as the X-Wing. So when you're stuck on Expert, a good order is: hunt for X-Wings in the digits with the fewest marks (it's quick), then scan the two-candidate cells for an XY-Wing. Even with all four added to the basic techniques, only 12.6% of the Expert puzzles were finished; the rest need techniques beyond these.
Common X-Wing mistakes
- Three spots in a row. If the digit has three pencil marks in one of the rows, it isn't an X-Wing. It might be part of a Swordfish.
- Corners that don't line up. Row 3 in columns 3 and 9 and row 6 in columns 3 and 8 is not an X-Wing. All four corners must share the same two columns.
- Erasing from the wrong lines. A row-based X-Wing erases from the columns, never from the base rows. The base rows' other cells already can't hold the digit, or the rows wouldn't qualify.
- Expecting a placement. An X-Wing only removes pencil marks. Four times out of five, in our measurements, it doesn't give you a digit straight away, so keep the marks updated and look again.
Keep playing
Start an Expert Sudoku, switch on Notes (or press N) once singles run dry, and work through the step list above for each digit. If Expert stalls you before you even get to pencil marks, our guide on how to solve Sudoku for beginners covers the singles that come before any pencil marks. For a different kind of deduction, the patterns in our Minesweeper patterns guide reward the same habit of reading a few cells together.
Frequently asked questions
What is an X-Wing in Sudoku?
A pattern of four cells: a digit has exactly two possible cells in each of two rows, and those cells sit in the same two columns. The digit must fill two opposite corners, so it can be erased from every other cell of those two columns.
Does an X-Wing work with columns instead of rows?
Yes. Two columns where a digit has exactly two spots, in the same two rows, let you erase it from the rest of those rows. In our measurements, 514 of 1,049 X-Wings were column-based, so check both directions.
Why can't I find an X-Wing in my puzzle?
Usually because there isn't one. Only 8.1% of the stuck Expert puzzles we measured had an X-Wing that erased anything. Also check your pencil marks: one missing or stale mark can hide an X-Wing or show a fake one.
What is the difference between an X-Wing and a Swordfish?
A Swordfish is the same idea with three rows and three columns: a digit's spots in three rows all sit in the same three columns, so it leaves the rest of those columns. It is harder to see and, in our puzzles, slightly rarer than an X-Wing.