What Is the X-Wing Technique?

The X-Wing is an intermediate Sudoku solving technique used to eliminate candidate numbers from rows or columns. It's one of the first "pattern-based" strategies you'll encounter beyond basic scanning, and mastering it opens the door to solving Hard and Expert-level puzzles.

The technique gets its name from the X-shaped pattern it forms across the grid.

The Core Concept

An X-Wing occurs when a specific digit appears as a candidate in exactly two cells in each of two different rows, and those cells all align in the same two columns. When this pattern exists, that digit must be placed in one of those two diagonal configurations — and therefore, it can be safely eliminated from all other cells in those two columns.

Step-by-Step: How to Find an X-Wing

  1. Choose a candidate digit — let's use the digit 7.
  2. Scan all rows for rows where 7 appears as a candidate in exactly two cells. Mark the column positions of those candidates.
  3. Look for two such rows where the candidate 7 sits in the same two columns. For example: Row 2 has 7 candidates in columns 4 and 8; Row 6 also has 7 candidates in columns 4 and 8.
  4. You've found an X-Wing! In this scenario, the 7 in the solution must occupy either (Row 2, Col 4) + (Row 6, Col 8), or (Row 2, Col 8) + (Row 6, Col 4).
  5. Eliminate 7 from all other cells in columns 4 and 8 — because no matter which diagonal wins, those columns are covered by the X-Wing.

X-Wing: Rows vs. Columns

The same logic applies in reverse. Instead of scanning rows, you can scan columns for a digit that appears as a candidate in exactly two cells within two different columns, all aligned in the same two rows. The elimination then happens across those two rows.

X-Wing DirectionPattern Found InEliminations Made In
Row-Based2 rows, same 2 columnsThose 2 columns
Column-Based2 columns, same 2 rowsThose 2 rows

Why X-Wing Works: The Logic

The reasoning is straightforward: if a digit can only go in two places within a row, it must go in one of them. When two rows share the exact same two column positions for a candidate, those four cells form a closed system. The digit will appear in exactly two of the four corners — one per row and one per column — meaning no other cell in those columns can hold that digit.

Common Mistakes to Avoid

  • Confusing 3 candidates with 2: An X-Wing only works when the digit appears in exactly two candidate cells per row (or column). Three or more candidates in a row break the pattern.
  • Forgetting to check box constraints: After applying X-Wing eliminations, always re-check if the removed candidates create new singles or other patterns in nearby boxes.
  • Applying eliminations to the wrong lines: If you found a row-based X-Wing, eliminations go in the columns, not the rows.

Beyond X-Wing: What Comes Next?

Once you're comfortable with X-Wing, the natural next steps are:

  • Swordfish — a three-row/three-column version of X-Wing.
  • Jellyfish — extends the pattern to four rows/columns.
  • Naked Pairs & Triples — complementary candidate-elimination strategies.

The X-Wing is your gateway into pattern-based solving. Practice spotting it on Hard puzzles until it becomes second nature — it's a skill that will dramatically cut your solving time.