The X-Wing is an advanced sudoku technique that removes candidates with a rectangle of four cells. It works like this: when a digit can go in exactly two cells in each of two rows, and those cells are in the same two columns, the digit can be removed from every other cell of those two columns.
The name comes from the X you get when you connect the four cells diagonally. It is usually the first advanced technique that players learn after naked pairs and pointing pairs, and hard puzzles often need it. This guide explains the rule, then shows it on a real puzzle, cell by cell.
The X-Wing rule
An X-Wing needs three things:
- Choose one digit, for example 4.
- Find a row where that digit has exactly two possible cells.
- Find a second row where the digit also has exactly two possible cells, in the same two columns.
The four cells are the corners of a rectangle. Each row must contain the digit once, so the digit goes in one corner of the first row and one corner of the second row. The two digits cannot share a column, so they must sit on a diagonal of the rectangle. There are only two diagonals, so there are only two ways to place them.
Both ways put the digit once in each of the two columns. That means the two columns already have their digit, inside the rectangle. No other cell of those two columns can hold it, so you remove the digit from all of them.
The rule in one sentence
Two rows, one digit, the same two columns: remove the digit from the rest of those two columns.
A real example, step by step
This position comes from a real puzzle. The easy moves are finished: there is no single left to place, and pointing pairs and naked pairs do not help. Every empty cell shows its candidates, the digits that are still possible there.
- 5 clue
- 5 already solved
- 5 new digit
- 5 pattern candidate
- 5 candidate to remove
Find the pattern
Look only at the digit 4. In row 3, a 4 is possible in two cells: R3C2 and R3C9. In row 7, a 4 is also possible in two cells: R7C2 and R7C9. Both rows use the same two columns, column 2 and column 9. This is an X-Wing on 4.
Check both possibilities
- Option A: the 4 of row 3 is in R3C2. Then the 4 of row 7 cannot be in column 2, so it is in R7C9.
- Option B: the 4 of row 3 is in R3C9. Then the 4 of row 7 is in R7C2.
In both options, column 2 gets its 4 and column 9 gets its 4, and both 4s are in corners of the rectangle. So no other cell of these columns can be a 4. Remove 4 from R2C2, R8C2 and R9C2 in column 2, and from R6C9, R8C9 and R9C9 in column 9. That is six candidates removed with one pattern.
Use the result
An X-Wing places no digit by itself, but its eliminations usually open the next move. Look at row 6. Before the X-Wing, a 4 was possible in R6C8 and in R6C9. Now R6C9 has lost its 4, so R6C8 is the only cell of row 6 that can hold a 4. That is a hidden single: place 4 in R6C8.
Try Sudoku Royale
The classic sudoku you know, without the ads, the pop-ups, or the clutter. A fresh Daily Challenge, unlimited practice with no timer, and technique drills. When you want a rush, race 2 to 18 players on one shared grid.
Download Sudoku Royale: Free on iOSThe column-based X-Wing
The X-Wing also works when you exchange rows and columns. If a digit has exactly two possible cells in each of two columns, and those cells are in the same two rows, you remove the digit from every other cell of those two rows.
The logic is the same, turned by 90 degrees. Remember one rule for both forms: the lines where you find the pattern keep their candidates, and the crossing lines lose theirs. Always check both directions, because a puzzle may contain only one of them.
How to search for an X-Wing
It is very hard to find an X-Wing without pencil marks. The pattern depends on knowing every cell where a digit is still possible. Then search in this order:
- Write all candidates. With missing notes you will see patterns that do not exist, or miss the ones that do.
- Take one digit at a time. Go through the nine rows and note each row where the digit has exactly two possible cells. Remember the columns of those two cells.
- Compare the rows. If two of these rows use the same two columns, you have an X-Wing. If no two rows match, repeat the search with the nine columns.
- Remove the candidates. Remove the digit from the other cells of the two crossing lines. Never remove it from the four corners.
- Go back to the easy moves. Look for hidden singles and naked singles again. As in the example, an X-Wing often gives you a digit immediately.
Common mistakes
- Three cells in one row. If the digit has three possible cells in one of the two rows, the pattern is not an X-Wing and the X-Wing rule removes nothing. With three rows and three columns it may be a Swordfish.
- Removing in the wrong direction. A pattern found in rows removes candidates in columns. Players often remove candidates from the two rows instead, which is wrong.
- Mixing it up with a naked pair. A naked pair is two cells in one row, column or box that contain the same two candidates. An X-Wing is one digit in four cells across two rows and two columns.
- Incomplete pencil marks. One missing candidate can make a row look as if it has two cells for the digit when it really has three.
Why X-Wings are hard to see
Many players know the rule and still do not find the pattern. The four cells can be far apart: in the example they are in rows 3 and 7 and in columns 2 and 9. The corners also contain other candidates. R3C2 holds 1, 2 and 4, so the 4 does not stand out. The solution is to look at one digit only and ask the same question for each row: how many cells can hold this digit?
Drill X-Wing in the Dojo
Sudoku Royale's Dojo has a short lesson and a drill for this pattern: board after board where it is the next move. Your record is your fastest run of correct answers in a row, and you can see how it compares with other players. Open the X-Wing drill on your iPhone, or read how the Dojo works.
Get Sudoku Royale: Free on iOSWhen to look for an X-Wing, and what comes next
Easy and medium puzzles almost never need an X-Wing. Look for one only when you are stuck in a hard puzzle: all pencil marks are written, and singles, pointing pairs and naked pairs give nothing more. Simple techniques are faster and solve most cells, so always try them first.
The X-Wing is the smallest pattern of a family called fish. The Swordfish uses the same idea with three rows and three columns. After that, learn the XY-Wing, which connects three cells that have two candidates each, and simple coloring, which follows one digit through a chain of cells. To see where each technique belongs, read the full list of sudoku techniques and the guide to difficulty levels.
Frequently Asked Questions
What is an X-Wing in sudoku?
An X-Wing is a pattern of four cells. A digit has exactly two possible cells in each of two rows, and those cells are in the same two columns. The digit can then be removed from all other cells of those two columns. The same rule works with rows and columns exchanged.
How do I find an X-Wing pattern?
Write all pencil marks, then check one digit at a time. Note every row where the digit has exactly two possible cells. If two of these rows use the same two columns, you have found an X-Wing. If you find nothing in the rows, repeat the search in the columns.
Which candidates does an X-Wing remove?
It removes the digit from the two crossing lines, outside the four corners. If you found the pattern in two rows, remove the digit from the other cells of the two columns. If you found it in two columns, remove it from the other cells of the two rows.
At what difficulty level do I need the X-Wing?
Easy and medium puzzles almost never need it. The X-Wing starts to appear in hard puzzles and is more common in expert puzzles. Use it only after singles, pointing pairs and naked pairs give no more progress.
What is the difference between an X-Wing and a Swordfish?
An X-Wing uses two rows and two columns. A Swordfish uses three rows and three columns. The logic is the same: in the rows where you find the pattern, the digit is possible only inside the pattern, so it can be removed from the other cells of the crossing columns.