Extreme

X-Wing

A digit confined to two cells in each of two rows (or columns), forming a rectangle that locks the digit.

In short

Pick a digit and look for two rows where it has exactly two possible cells, with both rows using the same pair of columns. The four cells form a rectangle that locks the digit into those columns, so you can eliminate it from every other cell in them. The same pattern works with rows and columns swapped.

What Is It?

An X-Wing is a pattern where a single digit is confined to exactly two cells in each of two rows, and those cells share the same two columns (or vice versa, two columns sharing two rows). The four cells form a rectangle.

The logic is elegant: in each of the two rows, the digit must occupy one of the two candidate cells. Since both rows use the same two columns, each column must contain exactly one instance of the digit. Therefore, the digit can be eliminated from all other cells in those two columns.

X-Wing is the simplest "fish" pattern, a family that includes Swordfish (3 rows x 3 columns) and Jellyfish (4 x 4). Mastering X-Wing gives you the foundation for all fish techniques.

How It Works

Pick a digit and scan the rows (or columns). For each row, count how many cells have that digit as a candidate. You need exactly two rows where the digit appears in exactly two cells. In each of the two rows, the digit must appear in exactly two columns, and those columns must be identical for both rows.

Once you find the rectangle, apply the elimination. Since each row must contain the digit once, and both rows restrict the digit to the same two columns, those two columns must each contain exactly one instance of the digit. Therefore, the digit can be eliminated from all other cells in those two columns.

The X-Wing works in both orientations. A "row-based" X-Wing has the defining pairs in rows and eliminates from columns. A "column-based" X-Wing has the defining pairs in columns and eliminates from rows.

Worked Examples

Example 1: X-Wing in Rows

798465368375934521968757194369367565379672438519854961372931752468121212242828124281282412412828

X-Wing on digit 2 in rows 1 and 4, columns 2 and 7.

Step 1: Scanning digit 2 across the grid, we find that in row 1 and row 4, digit 2 appears as a candidate in exactly two cells each, and they line up in the same columns: columns 2 and 7.

Step 2: The four cells R1C2, R1C7, R4C2, and R4C7 form an X-Wing rectangle. Since each row must contain the digit once, and both rows restrict digit 2 to the same two columns, columns 2 and 7 must each contain exactly one instance of digit 2. Therefore, digit 2 can be eliminated from all other cells in those two columns.

798465368375934521968757194369367565379672438519854961372931752468121212242828124281282412412828

Green: digit 2 locked in the X-Wing pattern. Red: candidates that can be eliminated.

Step 3: Eliminate digit 2 from all other cells in columns 2 and 7. Here, 2 is removed from R6C2 and R5C7.

7984653683759345219687571943693675653796724385198549613729317524681212122428281242818241241828

Eliminated 2 from R6C2, R5C7. The remaining 2s in rows 1, 4 are locked to columns 2, 7.

Example 2: X-Wing in Columns

863421597176548354738962145681237941581852461428765758146851749322929237923929693793939392392969

X-Wing on digit 9 in columns 3 and 4, rows 5 and 8.

Step 1: Now consider digit 9 in columns 3 and 4. Each column has exactly two cells with digit 9 as a candidate, and they share the same rows: rows 5 and 8.

Step 2: The four cells R5C3, R5C4, R8C3, and R8C4 form an X-Wing. Since each column must contain the digit once, and both columns restrict digit 9 to the same two rows, rows 5 and 8 must each contain exactly one instance of digit 9. Therefore, digit 9 can be eliminated from all other cells in those two rows.

863421597176548354738962145681237941581852461428765758146851749322929237923929693793939392392969

Green: digit 9 locked in the X-Wing pattern. Red: candidates that can be eliminated.

Step 3: Eliminate digit 9 from all other cells in rows 5 and 8. Here, 9 is removed from R5C1, R5C2, and R8C1.

863421597176548354738962145681237941581852461428765758146851749322929237232969379393939232969

Eliminated 9 from R5C1, R5C2, R8C1. The remaining 9s in columns 3, 4 are locked to rows 5, 8.

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. Every other cell in those two columns is therefore ruled out. Inside the two rows there is nothing left to remove.

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 unit whose only candidates are the same two digits, and it clears those digits from the rest of that unit. 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.

Related Techniques

Learn first:
Learn next:

The best way to master X-Wing is to practice spotting it in real puzzles.

© 2026 Sudoku Challenge | sudokuchallenge.com

All Sudoku Techniques

Explore all 28 solving techniques in our complete technique guide.

Naked Single Hidden Single Locked Candidates Naked Pair Hidden Pair Naked Triple Hidden Triple Naked Quad Hidden Quad BUG+1 Unique Rectangle Skyscraper Two-String Kite Empty Rectangle Simple Coloring XY-Wing Swordfish W-Wing X-Cycles XY-Chain XYZ-Wing WXYZ-Wing Finned X-Wing Finned Swordfish Jellyfish ALS-XZ Remote Pairs