X-Wing Sudoku Strategy: Complete Guide with Examples
Master the X-Wing sudoku technique step by step: understand the two-row/two-column candidate pattern, learn a five-step method to spot it, walk through a full elimination example, and see how it compares to Swordfish, XY-Wing and Skyscraper.
What Is the X-Wing Technique in Sudoku?
The X-Wing is a classic advanced sudoku technique built on candidate patterns across exactly two rows and two columns. The four cells involved form the corners of a rectangle, and the elimination lines cross the grid like an X — which is where the name (borrowed from the Star Wars starfighter) comes from.
- It applies to one digit at a time: an X-Wing only ever concerns a single candidate number.
- It requires exactly four cells: two rows that each contain the candidate in exactly two cells, and those cells must share the same two columns.
- It is a pure elimination technique: an X-Wing never places a digit directly. It removes impossible candidates so that other techniques — hidden singles, naked pairs — can finish the puzzle.
How the X-Wing Pattern Works
The logic behind the X-Wing is simple and airtight. If candidate 5 appears in exactly two cells of row 2 (say columns 4 and 8), and 5 also appears in exactly two cells of row 7 in the same two columns, then the two 5s must sit on one diagonal of the rectangle or on the other.
Row-based X-Wing
Row-based X-Wing: when two rows each restrict a digit to the same two columns, that digit must occupy one of the four corner cells. Every other cell in those two columns can be cleared of the candidate.
Column-based X-Wing
Column-based X-Wing: the mirror image. Two columns each restrict a digit to the same two rows, and the candidate can be eliminated from every other cell in those two rows. Every row-based X-Wing also has a column-based reading, so scan whichever direction you find easier.
How to Find an X-Wing in 5 Steps
1. Pick one digit
Focus on a single candidate at a time. Digits with few remaining placements — two to four cells — are the most productive starting points.
2. Scan rows for a two-cell line
Find a row where the chosen digit is a candidate in exactly two cells. Note the two columns those cells sit in.
3. Look for a matching second row
Search for another row where the same digit is also a candidate in exactly two cells, and those cells must occupy the same two columns as the first row.
4. Check the rectangle
The four cells must form the corners of a rectangle. If the two rows share only one column, it is not an X-Wing.
5. Eliminate along the shared lines
Remove the candidate from every other cell in the two shared columns (row-based X-Wing) or the two shared rows (column-based X-Wing). If this leaves any cell with a single candidate, place it immediately.
A Worked X-Wing Example
Suppose digit 7 is a candidate only in columns 3 and 6 of row 1, and only in columns 3 and 6 of row 8 — nowhere else in either row. The four cells R1C3, R1C6, R8C3 and R8C6 form a rectangle of 7s.
Wherever the 7s finally land, column 3 must contain exactly one of them and column 6 must contain the other. That means no other cell in column 3 or column 6 can hold a 7.
Eliminate 7 from every other cell of columns 3 and 6. In a typical hard puzzle this clears several candidates at once and often exposes a hidden single — the breakthrough the puzzle was waiting for.
Related Elimination Techniques
Swordfish
The X-Wing's bigger sibling: the same idea stretched to three rows and three columns. If you can spot an X-Wing, a Swordfish is simply one more row and column of identical logic.
XY-Wing
A three-cell technique built on a pivot cell with two candidates and two pincer cells. It eliminates candidates from any cell that sees both pincers and shines when no rectangle pattern is available.
Skyscraper
Two parallel 'roofs' of the same candidate joined by a base line. It shares the X-Wing's diagonal logic but tolerates a missing corner, which makes it far more common in real puzzles.
Common X-Wing Mistakes
- Counting candidates too loosely — the digit must appear in exactly two cells per row or column, not two or fewer. A third candidate anywhere breaks the pattern's logic.
- Eliminating along the wrong lines. A row-based X-Wing eliminates down the two columns at the corners, not along the rows where you spotted it.
- Treating the X-Wing as an ending. It only removes candidates — keep applying singles and pairs afterwards to turn the eliminations into placements.
- Solving without full pencil marks. X-Wings are defined by where candidates are restricted to exactly two cells, and that is only visible with complete notes.
Practice the X-Wing on Real Puzzles
X-Wing patterns start appearing regularly in hard and expert puzzles. Play with notes enabled and scan one digit at a time — pattern recognition builds quickly with deliberate practice.
Related Sudoku Guides
X-Wing Sudoku FAQ
What is the X-Wing technique in sudoku?
The X-Wing is an elimination technique that uses four cells forming a rectangle: two rows and two columns where a single candidate appears in exactly two cells of each row. Once the pattern is found, that candidate can be removed from every other cell in the shared columns (or rows).
What difficulty of sudoku puzzles require the X-Wing?
Easy and medium puzzles can almost always be solved with singles and pairs. The X-Wing typically becomes necessary in hard, expert and extreme puzzles, and it is one of the first advanced techniques worth scanning for.
Does an X-Wing place any digits?
No. An X-Wing never places a digit by itself — it only eliminates impossible candidates. The eliminations usually create naked or hidden singles, which then place digits.
How is the X-Wing different from the Swordfish?
Both follow the same principle, but an X-Wing uses two rows and two columns while a Swordfish extends the logic to three rows and three columns. Swordfish patterns are rarer and harder to spot.
Why is it called an X-Wing if the cells form a rectangle?
The four corners form a rectangle, but the two possible placements of the digit trace diagonals across the grid in the shape of an X. The name also references the X-Wing starfighter from Star Wars, like many sudoku technique names.
Do I need pencil marks to use the X-Wing?
Yes, in practice. An X-Wing depends on a candidate being restricted to exactly two cells in a line, and that information is only reliable when full candidate notes are maintained.