When a candidate appears in exactly two positions in two rows, aligned in the same two columns, it can be eliminated from all other cells in those columns.
An X-Wing pattern forms when you focus on a single candidate number and find that it appears in exactly two cells in each of two different rows, and those cells line up in the same two columns. The four cells create a rectangle on the grid. The name "X-Wing" comes from the X shape formed by drawing lines between diagonal corners of this rectangle.
The logic behind the X-Wing is based on constraint satisfaction. In each of the two defining rows, the candidate must be placed in one of the two available cells. Because the cells are aligned in columns, the candidate will occupy one cell in each column. This means no other cell in those two columns can contain that candidate. You can safely eliminate it from all other cells in the two covering columns.
The X-Wing works symmetrically: you can also define it using two columns as the base, with the covering lines being two rows. The elimination logic is identical - just swap "row" and "column" throughout. Understanding this duality makes the pattern easier to spot. For foundational concepts, review our Sudoku glossary.
The X-Wing technique becomes relevant when intermediate strategies - Naked Pairs, Hidden Pairs, Pointing Pairs, and Box-Line Reduction - have been exhausted without solving the puzzle. It is a hallmark technique for hard Sudoku puzzles.
X-Wings are not needed in easy or most medium puzzles. They appear most frequently in hard and expert-level grids. If you are new to advanced solving, the X-Wing is the best starting point because it is the simplest of the "fish" family. Mastering it prepares you for Swordfish and Jellyfish. For a full overview, visit our strategy guide or learn how to play Sudoku.
The X-Wing is classified as an advanced-level technique. It sits at the boundary between intermediate and expert solving, making it a critical skill for progressing to harder puzzles.
Not needed - basic singles are sufficient
Very rarely needed - intermediate techniques usually suffice
Frequently needed - a key technique at this level
Part of the toolkit - used alongside other advanced methods
An X-Wing occurs when a candidate number appears in exactly two cells in each of two different rows, and those four cells are aligned in the same two columns (or vice versa - two columns aligned in the same two rows). The four cells form a rectangle. The candidate can then be eliminated from all other cells in the two columns (or rows) that the rectangle spans.
Focus on a single candidate number. Scan each row to find rows where that candidate appears in exactly two cells. If you find two such rows where the candidate positions share the same two columns, you have an X-Wing. Pencil marks are essential for spotting this pattern.
If the X-Wing is formed across two rows (the defining rows), you can eliminate the candidate from all other cells in the two columns that the X-Wing occupies. Conversely, if formed across two columns, you eliminate from the other cells in the two rows.
X-Wing is the simplest member of a family of techniques called 'fish' patterns. Swordfish extends the concept to three rows and three columns, and Jellyfish extends it to four. The elimination logic is the same - candidates are removed from the covering lines.
Look for X-Wings when intermediate techniques like Naked Pairs, Hidden Pairs, and Pointing Pairs have stalled your progress. X-Wings are typically needed in hard and expert-level puzzles where simpler eliminations are insufficient.
We're tracking where the digit 5 can go. Each marked cell shows 5 as a possible candidate.
Step 1 of 4 — full interactive demo available with JavaScript enabled
Ready to put your skills to the test?
Try Final Sudoku - an ad-free Sudoku experience with smart tools