X-Wing Sudoku Technique: How to Spot and Use It
Sudoku a Day Blog ·
You have tried every basic technique. Singles are done. Locked candidates turned up nothing. You even found a hidden pair and it still did not break the puzzle open. Now what?
The X-Wing technique is the next step. It is one of the most satisfying patterns in advanced Sudoku, because once you learn to see it, you start spotting it everywhere on expert and master grids. It requires no guessing, just careful observation of where a single candidate can go across multiple rows and columns.
What Is the X-Wing Pattern?
X-Wing is an elimination technique based on the interaction between two rows and two columns (or two columns and two rows). Here is the core rule:
If a candidate digit appears in exactly two cells in Row A and exactly two cells in Row B, and both pairs share the same two columns, then that digit can be eliminated from all other cells in those two columns.
Why? Because in whatever solution is correct, the digit in Row A must go into one of its two column positions, and the digit in Row B must go into the other. Either way, both columns are "used up" by the digit from those two rows. Any other cell in those columns cannot hold that digit.
The name comes from the shape: draw lines connecting the four cells and you get an X, or a rectangle with candidates at each corner.
Row-Based X-Wing: Step-by-Step Identification
- Pick a candidate digit that has not been placed yet in many cells. Digits 1-9 are all fair game, but start with whichever appears least often in pencil marks.
- Scan each row. For each row, count how many cells still have that candidate. Look for rows where it appears in exactly two cells. Note the column positions.
- Find two rows with matching columns. If Row 2 has the candidate in columns 4 and 7, and Row 6 also has the candidate in columns 4 and 7 (and nowhere else in those rows), you have an X-Wing.
- Eliminate from the shared columns. Remove that candidate from every other cell in column 4 and column 7, except for the four corner cells of the X-Wing itself.
- Look for new singles or pairs. Eliminations often cascade into new solve steps. Work through any new naked or hidden singles immediately.
Column-Based X-Wing: Step-by-Step Identification
Column-based X-Wing works the same way, just rotated 90 degrees:
- Scan columns for a candidate that appears in exactly two cells per column.
- Find two columns where the two candidate cells share the same two rows.
- Eliminate the candidate from all other cells in those two rows (outside the four X-Wing corners).
The logic is identical. In practice, scan both orientations when you are stuck, because one may reveal an X-Wing that the other misses.
Real Grid Walkthrough
Here is a concrete scenario. You are working through an expert puzzle and you have candidate 6 penciled in across the grid. After scanning, you notice:
- Row 1: candidate 6 in column 3 and column 8 only.
- Row 5: candidate 6 in column 3 and column 8 only.
Those two rows each have exactly two cells for digit 6, and the two cells fall in the same columns (3 and 8). That is an X-Wing.
What to eliminate: Remove candidate 6 from every other cell in column 3 and column 8. If column 3 had candidate 6 in rows 3, 4, 7, and 9 (aside from the corners in rows 1 and 5), eliminate it from all of them. Same for column 8.
What happens next: One of those eliminations might leave only one cell in a box or row that can hold the digit 6, instantly solving it. Or it reduces a pair to a single. Either way, progress is made without any guessing.
Common Mistakes When Applying X-Wing
- The candidate appears in more than two cells in one of the rows. If Row 1 has 6 in columns 3, 8, and also 5, there is no X-Wing for digit 6 in Row 1. The two-cell constraint is strict.
- Eliminating from the wrong units. For a row-based X-Wing, eliminate from the columns, not from other cells in the same rows. The four corner cells are safe; only the non-corner cells in those columns are affected.
- Assuming it must involve a 3x3 box. X-Wing spans full rows and columns, ignoring box boundaries entirely.
- Not updating pencil marks afterward. Every elimination you make can unlock new steps. Always re-scan after any elimination chain.
When to Look for X-Wings
Use this general solving order for advanced puzzles:
- All singles (naked and hidden)
- Locked candidates
- Naked and hidden pairs and triples
- X-Wing (and column-based variant)
- Swordfish and harder patterns (three-row/column version of X-Wing)
On a typical expert sudoku from Sudoku a Day, you will encounter X-Wing several times. If you find an X-Wing but nothing cascades from it, keep scanning for a second one. Puzzles at this level often have two or three.
Want to see all advanced techniques in one place? Visit our sudoku strategies guide or try a daily puzzle right now and put X-Wing into practice.
Frequently Asked Questions
What is the X-Wing technique in Sudoku?
X-Wing is an elimination technique where a candidate digit appears in exactly two cells in each of two rows, and those cells fall in the same two columns. You can then eliminate that candidate from all other cells in those two columns. The same logic applies column-first, eliminating from rows.
When should I use X-Wing in Sudoku?
Use X-Wing after exhausting singles, locked candidates, and naked or hidden pairs. It is most common on expert and master difficulty puzzles. If the puzzle is still stuck after X-Wing, try Swordfish, which extends the same pattern across three rows or columns.
What is the difference between a row-based and column-based X-Wing?
In a row-based X-Wing you scan rows for a candidate that appears in exactly two cells, then eliminate from the shared columns. In a column-based X-Wing you scan columns and eliminate from the shared rows. Both work by identical logic.
Does X-Wing work on all Sudoku difficulty levels?
X-Wing is rarely needed below expert difficulty. It is one of the first advanced patterns worth learning because it appears more frequently than Swordfish or Jellyfish, and it is much easier to spot once you know the shape to look for.