If you have already mastered the basics of Sudoku — naked singles, hidden singles, and scanning — and you are starting to find that some puzzles just refuse to budge no matter how long you stare at them, you are almost certainly ready for the X-Wing technique. This elegant intermediate strategy is one of the most satisfying moves in all of Sudoku, because the moment you spot it, an entire chain of eliminations opens up at once. In this guide we will walk you through exactly what the X-Wing pattern looks like, why it works, and how to use it to crack puzzles that would otherwise leave you stuck.
What Is the X-Wing Technique?
The X-Wing is a candidate elimination technique used in advanced Sudoku solving. Unlike basic strategies that focus on a single cell or a single house (a row, column, or 3×3 box), the X-Wing spans two rows and two columns simultaneously. The name comes from the shape the four key cells make on the grid: connect them with diagonal lines and you get a shape that looks like the letter X, or a flying wing fighter from a certain famous science-fiction franchise.
At its core, the X-Wing works by using the principle of locked candidates extended across the entire grid. When a specific digit can only appear in exactly two cells within each of two different rows, and those two cells fall in the same two columns in both rows, you have discovered an X-Wing. The logic then tells you that the digit must appear in one of two diagonal pairs — and therefore it cannot appear anywhere else in those two columns.
This is not a guessing technique. Every elimination the X-Wing produces is 100% logically guaranteed. That is what makes it so powerful and so satisfying to find.
Understanding the Logic Behind the X-Wing
To truly trust the X-Wing, you need to understand why it works rather than just memorising a pattern to match. Let us think through the logic step by step.
Imagine you are working with the digit 5. You notice that in Row 2, the number 5 can only go in Column 3 or Column 7 — no other cells in that row are available candidates for 5. You then look at Row 6 and find the same situation: the digit 5 can only go in Column 3 or Column 7 in that row too.
Now ask yourself: where will the 5 end up in Row 2? It has to go in either Column 3 or Column 7. There is no third option. The same is true in Row 6. Because of this, consider what happens to Column 3:
- If Row 2 places its 5 in Column 3, then Column 3 already has a 5 from Row 2. Row 6 must therefore place its 5 in Column 7.
- If Row 2 places its 5 in Column 7, then Column 3 still needs a 5 — and it can only come from Row 6, which places it in Column 3.
Either way, in Column 3 the 5 must land in either Row 2 or Row 6. It cannot land anywhere else in Column 3. By the same logic, in Column 7 the 5 must land in either Row 2 or Row 6. No other row can supply the 5 for those two columns. This means every other candidate 5 in Column 3 and Column 7 — in every other row — can be safely eliminated.
The pattern works equally well when you start by looking at two columns instead of two rows. If a digit appears as a candidate in exactly two cells within each of two columns, and those cells share the same two rows, the eliminations then apply to those two rows rather than those two columns.
A Worked Example: Spotting and Using an X-Wing
Let us walk through a concrete, step-by-step illustration so you can see the X-Wing in action.
Suppose you are solving a hard Sudoku puzzle and you are tracking pencil marks (the small candidate numbers written in cells). You focus on the digit 3 and you notice the following after scanning all nine rows:
- Row 1: The digit 3 is a candidate in Column 4 and Column 9 only. All other cells in Row 1 are either filled or have 3 eliminated as a candidate.
- Row 5: The digit 3 is a candidate in Column 4 and Column 9 only. All other cells in Row 5 are either filled or have 3 eliminated as a candidate.
- All other rows either have 3 placed already, or have more than two candidate positions for 3 — they do not form part of this pattern.
You have found an X-Wing on the digit 3, using Row 1 and Row 5 as your two base rows, and Column 4 and Column 9 as your two cover columns. The four cells involved are: (Row 1, Col 4), (Row 1, Col 9), (Row 5, Col 4), and (Row 5, Col 9). Draw imaginary lines connecting them diagonally and you see the X shape.
Now make your eliminations. Because the 3 in Column 4 must come from either Row 1 or Row 5, you can remove 3 as a candidate from every other cell in Column 4: that means Row 2, Row 3, Row 4, Row 6, Row 7, Row 8, and Row 9 in Column 4 can all have 3 crossed off their pencil marks (wherever 3 currently appears as a candidate). Do the same for Column 9.
After making these eliminations, other techniques may suddenly become applicable. A cell that had two candidates might now have only one, giving you a naked single. A row or box that could not resolve its 3 might now have only one valid position, giving you a hidden single. The X-Wing does not always solve the puzzle outright, but it clears the path for simpler techniques to finish the job.
How to Search for X-Wings in Your Puzzle
Knowing what an X-Wing looks like is one thing; finding it efficiently in a real puzzle is another. Here is a reliable search method you can practice:
- Choose a digit to investigate. Start with digits that appear fewer times in the grid as candidates, since the pattern is easier to spot when there are fewer cells to check.
- List candidate positions by row. For each row, note which columns contain your chosen digit as a candidate. Write these down or visualise them clearly.
- Look for rows with exactly two candidates. Ignore any row where the digit has three or more candidate positions, or where it is already placed.
- Check if two such rows share the same column pair. If Row A has candidates in Column X and Column Y, and Row B also has candidates in exactly Column X and Column Y, you have an X-Wing.
- Make your eliminations in the cover columns. Remove the digit as a candidate from every other cell in Column X and Column Y.
- Repeat using columns as your base. Scan by column instead of row to find column-based X-Wings, whose eliminations then apply to the two cover rows.
With practice, your eye will naturally gravitate toward rows or columns where a digit is tightly constrained. Many experienced solvers keep a mental note of which digits are “almost placed” in a row — having only two positions — because these are prime candidates for X-Wing patterns.
Common Mistakes and How to Avoid Them
Even once you understand the X-Wing conceptually, a few common errors can trip up solvers who are new to the technique.
Mistake 1: Applying eliminations in the wrong direction. If you find a row-based X-Wing (two rows, two shared columns), the eliminations happen in the columns — not in the rows. The two base rows themselves are untouched; you already know the digit must be in one of those two cells in each base row. It is everywhere else in those columns that you eliminate. Confusing rows and columns here will lead to incorrect moves.
Mistake 2: Including rows or columns with more than two candidates. An X-Wing requires exactly two candidate positions in each base row (or column). If a row has three possible positions for your digit, it cannot be a base row, even if two of those positions happen to match your target columns. The logic breaks down entirely with three or more candidates.
Mistake 3: Forgetting to check pencil marks are up to date. The X-Wing depends on having accurate, complete pencil marks. If you have not diligently updated your candidates using simpler techniques like box-line reduction or pointing pairs, you might think a row has only two candidates for a digit when in fact it has more. Always keep your candidate list clean before attempting X-Wing searches.
Mistake 4: Confusing the X-Wing with the Swordfish. The Swordfish is the natural extension of the X-Wing: instead of two rows and two columns, it uses three rows and three columns. If you spot what looks like an almost-X-Wing but with one extra row involved, you may actually be looking at the beginning of a Swordfish pattern. Do not force the X-Wing label onto a three-row pattern.
X-Wing in Context: Where It Fits in Sudoku Strategy
The X-Wing sits comfortably in the intermediate-to-advanced tier of Sudoku solving techniques. In terms of difficulty, it is generally considered a step above locked candidates and naked/hidden pairs, but a step below more complex fish patterns like the Swordfish and Jellyfish, or chain-based techniques like XY-Wing and Skyscraper.
Most rated Sudoku puzzles labelled “hard” or “expert” will require at least one application of the X-Wing or a similar technique. If you can reliably find and use X-Wings, you will find that a significant number of puzzles previously beyond your reach suddenly become solvable without any guessing.
It is also worth noting that the X-Wing belongs to a broader family of techniques called fish patterns or basic fish. Understanding the X-Wing deeply — not just as a pattern to match but as a logical argument about where a digit must go — gives you the foundation to understand Swordfish, Jellyfish, and their finned and sashimi variants when you are ready to explore those more advanced techniques.
Key Takeaways
- The X-Wing involves four cells forming a rectangle across two rows and two columns, where a single digit is a candidate in exactly those two positions in each of the two rows (or columns).
- The logic is airtight: the digit must occupy one of two diagonal pairs, so it cannot appear anywhere else in the two cover columns (or cover rows).
- Eliminations apply to the cover lines, not the base lines.
- Always ensure your pencil marks are accurate and complete before searching for the X-Wing pattern.
- Search systematically: list rows with exactly two candidates for a given digit and check for shared column pairs.
- The X-Wing belongs to the fish family of techniques and is the foundation for understanding Swordfish and other advanced patterns.
- No guessing is involved — every elimination produced by a valid X-Wing is logically certain.
The X-Wing is one of those techniques that transforms the way you see a Sudoku grid. Once you have found your first genuine X-Wing in a real puzzle and watched a cascade of eliminations unlock new possibilities, you will never want to go back to guessing. Take your time building up your pencil marks, train your eye to spot rows and columns where a digit is tightly restricted, and the X-Wing will start appearing to you almost naturally. Keep practising on the puzzles here at playsudoku.org, and enjoy the deep satisfaction that comes with solving smarter, not harder.