X-Wing
Volodymyr Sakhan ·
X-Wing is one of the most well-known advanced sudoku techniques. It lets you eliminate candidates across two entire columns (or rows) in a single step — something that naked pairs and hidden pairs cannot do.
To use X-Wing you need pencil marks filled in. This technique appears in hard and expert puzzles, when simpler methods are exhausted and you need to look across multiple rows and columns at once.
What Is X-Wing?
An X-Wing is a pattern where a single digit appears as a candidate in exactly two cells of one row, and also in exactly two cells of another row — and both times those cells fall in the same two columns. The four cells form a rectangle.
Because the digit must occupy one corner of each of the two rows, it will always land in both of those columns — either on one diagonal of the rectangle or the other. Either way, no other cell in those two columns can hold that digit. The name comes from imagining the two diagonals of the rectangle crossing each other like an X. You can find more techniques in our full solving guide.
When to Use X-Wing
Look for X-Wing when simpler techniques are no longer making progress. Here are the conditions that must all be true:
- You have pencil marks filled in for every empty cell — X-Wing cannot be spotted without them.
- A digit appears as a candidate in exactly two cells of one row (no more, no fewer).
- The same digit also appears as a candidate in exactly two cells of a different row, and those two cells are in the same two columns as the first row.
- That digit appears elsewhere in one or both of those two columns — otherwise there is nothing to eliminate and the pattern is useless.
Step-by-Step Example
Below are two worked examples — one row-based and one column-based — so you can see both orientations of the technique.
Row-Based X-Wing: Digit 4, Rows 4 & 5
In this expert puzzle, after filling pencil marks, digit 4 appears as a candidate in only two cells of row 4 (F4 and H4) and only two cells of row 5 (F5 and H5). Both pairs land in columns F and H — a perfect X-Wing.
- Fill pencil marks for all empty cells.
- Scan each row for digit 4. In row 4, digit 4 is a candidate only in cells F4 and H4 — exactly 2 cells.
- Scan the remaining rows. In row 5, digit 4 is a candidate only in cells F5 and H5 — exactly 2 cells, and in the same columns F and H.
- X-Wing confirmed: F4, H4, F5, H5 form a rectangle. Digit 4 must occupy either the diagonal {F4, H5} or the diagonal {H4, F5}.
- In both cases, column F receives a 4 (at row 4 or row 5) and column H receives a 4 (at row 4 or row 5).
- Therefore digit 4 cannot appear anywhere else in column F or column H.
- Eliminate 4 from F8. Its candidates shrink from {2, 4, 5, 8} to {2, 5, 8} — one cell closer to being solved.
Once you confirm digit 4 is locked to exactly two cells in each of two rows — and always in the same two columns — you can safely remove it from the rest of those columns.
Column-Based X-Wing: Digit 2, Columns B & C
X-Wing works identically when scanned column by column. Here, digit 2 appears as a candidate in only two cells of column B (B5 and B8) and only two cells of column C (C5 and C8), both times in rows 5 and 8.
- Scan each column for digit 2. In column B, digit 2 is a candidate only in B5 and B8 — exactly 2 cells.
- In column C, digit 2 is a candidate only in C5 and C8 — exactly 2 cells, in the same rows 5 and 8.
- X-Wing confirmed: B5, B8, C5, C8 form a rectangle. Digit 2 occupies either {B5, C8} or {C5, B8}.
- Either way, row 5 receives a 2 in column B or C, and row 8 receives a 2 in column B or C.
- Therefore digit 2 cannot appear anywhere else in rows 5 or 8.
- Eliminate 2 from G5 — candidates shrink from {2, 6, 7, 8} to {6, 7, 8}.
- Also eliminate 2 from I5, H8, and I8 — four cells cleared in a single step.
Column-based X-Wing yields the same logic rotated 90°: two columns lock the digit into exactly two rows, eliminating all other occurrences in those rows at once.
Practice X-Wing Online
X-Wing requires patience and systematic scanning — go through each digit from 1 to 9, check every row (or column) for exactly two candidate cells, and note which columns (or rows) they fall in. When two rows match, you have your X-Wing.
Once you are comfortable with X-Wing, look for Swordfish — the same logic extended to three rows and three columns. For cases where the rectangle has an extra candidate cell outside the pattern, study Finned X-Wing next.
Frequently Asked Questions
Ready to try X-Wing? Play hard sudoku and scan for the rectangle pattern — or create a free account to track your progress.