If a digit has only two places in one row, only two places in a second row, and those places are in the same two columns, then every other candidate of that digit in those two columns can be eliminated. The same works with two columns: then every other candidate of that digit in the two rows can be eliminated.
What Is It?
An X-Wing is four cells at the corners of a rectangle, all holding the same candidate. In each of two rows the digit has only two places, and those places are in the same two columns. A row where the digit has three or more places cannot be part of one.
Take the 2s in the first example below. Row 1 can put its 2 only in column 2 or column 7, and so can row 4. If row 1 takes column 2, row 4 is left with column 7. If row 1 takes column 7, row 4 gets column 2. Either way the two 2s sit on opposite corners, one in each column, so every other 2 in columns 2 and 7 can be eliminated.
X-Wing is the smallest of the "fish" patterns. Swordfish does the same with three rows, and Jellyfish with four.
How It Works
- Find a digit that has only two places in a row (or in a column).
- Find a second row (or column) where that digit also has only two places, lined up with the first two. The four cells form a rectangle: that is the X-Wing.
- Found it in two rows? Eliminate the digit from every other cell in those two columns. Found it in two columns? Eliminate it from every other cell in those two rows.
Worked Examples
Example 1: X-Wing in Rows
X-Wing on digit 2 in rows 1 and 4, columns 2 and 7.
Step 1: Look at the 2s. Row 1 has only two cells that can be 2, R1C2 and R1C7. Row 4 also has only two, R4C2 and R4C7, in the same columns.
Step 2: Whichever of its two cells row 1 uses for the 2, row 4 has to use the other column. So columns 2 and 7 each get their 2 from row 1 or row 4.
Green: digit 2 locked in the X-Wing pattern. Red: candidates that can be eliminated.
Step 3: Eliminate the other 2s in columns 2 and 7: R6C2 and R5C7.
Eliminated 2 from R6C2, R5C7. The remaining 2s in rows 1, 4 are locked to columns 2, 7.
Example 2: X-Wing in Columns
X-Wing on digit 9 in columns 3 and 4, rows 5 and 8.
Step 1: Now the 9s, this time by column. Column 3 can put its 9 only in R5C3 or R8C3, and column 4 only in R5C4 or R8C4, in the same two rows.
Step 2: Whichever row column 3 uses for the 9, column 4 has to use the other. So rows 5 and 8 each get their 9 from column 3 or column 4.
Green: digit 9 locked in the X-Wing pattern. Red: candidates that can be eliminated.
Step 3: Eliminate the other 9s in rows 5 and 8: R5C1, R5C2 and R8C1.
Eliminated 9 from R5C1, R5C2, R8C1. The remaining 9s in columns 3, 4 are locked to rows 5, 8.
X-Wing in a Real Puzzle
A puzzle from our Extreme pool, at the moment it needs an X-Wing. Next Step, the game’s hint, tries every easier technique first, and none of them works here.
Without an X-Wing, no technique up to Extreme finishes this puzzle. After it, singles finish the puzzle. Step through it below: the board lights what each step talks about.
X-Wing on 3, in rows
This is the board after 15 digits have been placed. Next Step tries every easier technique first, and none of them works here.
So 3 has only two places in each of two rows, both in columns 2 and 6, and every other 3 in those columns is eliminated: 8 cells in one step. Play it from the start and spot it yourself.
Looks Like an X-Wing, but Isn’t
The rectangle is easy to see and easy to get wrong. This position, from another Extreme puzzle in our pool, has the shape but is not an X-Wing. Step through it to see why.
Looks like an X-Wing
Look at the 6s in columns 2 and 6. Column 2 has only two cells that can be 6, R1C2 and R3C2. Column 6 has R1C6 and R3C6, in the same rows. It looks like an X-Wing.
The rule to remember: each of the two columns must have the digit in exactly two cells, and nowhere else.
Practice on 3 Real Puzzles
Extreme puzzles from our pool, easiest first. On the way through each one, Next Step comes to one X-Wing, and every other step is easier. Find it yourself, and open the hint only if you are stuck.
Frequently Asked Questions
How do I spot an X-Wing?
Pick one digit and count its candidate cells row by row. You want two rows where the digit has exactly two possible cells, and where those cells sit in the same two columns. The four cells form a rectangle. Repeat the scan down the columns to catch column-based X-Wings.
Why does an X-Wing found in rows eliminate from the columns?
Because the two rows fill both columns between them. Each row must place the digit in one of the two shared columns, and they cannot use the same column, so one instance lands in each. So every other cell in those two columns is ruled out. Inside the two rows there is nothing left to eliminate.
What is the difference between an X-Wing, a Swordfish and a Jellyfish?
They are the same fish logic at different sizes: an X-Wing uses two rows and two columns, a Swordfish three, and a Jellyfish four. Larger fish also relax the counting — a Swordfish row may hold two or three candidate cells, a Jellyfish row two to four, provided the columns used stay within the limit.
Does the digit have to be a candidate in all four corners of an X-Wing?
Yes. The digit must be a candidate in all four corner cells, otherwise there is no rectangle to lock. If one of the two cells in a row loses the digit, that row has only one place left for it, which is a hidden single — a simpler deduction that places the digit outright.
Is an X-Wing the same thing as a Naked Pair?
No. A Naked Pair is two cells in one row, column or box whose only candidates are the same two digits, and it clears those digits from the rest of that row, column or box. An X-Wing tracks a single digit across two separate rows (or columns) and clears it from the two crossing lines instead. Different pattern, different elimination zone.
Key Points to Remember
- An X-Wing needs exactly two candidate cells per row (or column) in exactly two rows (or columns), sharing the same two columns (or rows).
- Row-based X-Wings eliminate from columns. Column-based X-Wings eliminate from rows.
- The digit must appear as a candidate in all four corner cells of the rectangle.
- X-Wing is the simplest fish pattern. Once you understand it, Swordfish and Jellyfish use the same logic with more rows and columns.
X-Wing in Sudoku Variants
The same idea, taught on real puzzles of each variant, where the variant's own rule can be what makes the move.
In Our 160,000+ Puzzles
Our solver graded every puzzle on this site. This is how many puzzles at each level it used X-Wing in.
First used at Extreme, in 15% of Extreme puzzles.
In a Diabolical puzzle that uses it, it comes up about 1.1 times.
The best way to master X-Wing is to practice spotting it in real puzzles.