X-Wing Sudoku Technique: How to Find & Use It

The X-Wing is the most important advanced strategy in sudoku — learn exactly how it works, how to spot it, and how to use it to break through hard puzzles.

HomeBlog › X-Wing Technique

You’ve filled in every pencil mark. You’ve checked every row, column, and box for naked singles and hidden singles. Nothing. The grid is staring back at you, and no obvious move remains. Sound familiar?

This is the exact moment you need the X-Wing — the first advanced technique most solvers learn, and arguably the most powerful single pattern in all of sudoku. Once you understand how it works, you’ll start spotting it everywhere, and puzzles that felt impossible will suddenly crack open.

In this guide we’ll explain the X-Wing from the ground up: what it is, why it works, how to find it in your own grids, and the mistakes to avoid. We’ll walk through a real example with diagrams so you can see each step clearly.

✅ What Is an X-Wing in Sudoku?

An X-Wing is an advanced candidate-elimination technique. It gets its name from the shape formed when you draw lines connecting the four cells involved — two diagonal lines that cross in an “X” shape.

ℹ️ Definition

An X-Wing occurs when a single candidate (let’s call it n) appears in exactly two cells in each of two different rows, and those four cells line up in the same two columns. The four cells form the corners of a rectangle.

Result: candidate n can be eliminated from all other cells in those two columns.

That sounds abstract, so let’s break it down with simple logic before looking at a real example.

🧠 How the X-Wing Works (The Logic)

Imagine you’re tracking candidate 4 across the grid. You notice:

  • In Row 1, the digit 4 can only go in two cells: Column 4 and Column 6.
  • In Row 5, the digit 4 can also only go in two cells: Column 4 and Column 6.

Now think about what this means for Column 4 and Column 6. In each of these two rows, the 4 must go in one of those two columns. There are only two possible arrangements:

  • Option A: 4 goes in R1C4 and R5C6
  • Option B: 4 goes in R1C6 and R5C4

Either way, both Column 4 and Column 6 are already “claimed” by one of those cells. No other cell in Column 4 or Column 6 can contain a 4. So you can safely remove the candidate 4 from every other cell in those two columns.

💡 Key Insight

You don’t need to know which of the two options is correct. Both options produce the same result: columns 4 and 6 each get a 4 from one of the X-Wing cells. That’s enough to eliminate 4 from all other cells in those columns.

🔎 Step-by-Step Example

Let’s walk through a concrete X-Wing on a real grid. We’re looking at candidate 4.

Step 1: Identify the Pattern

Scan through each row and find rows where candidate 4 appears in exactly two cells. In this grid:

  • Row 1: candidate 4 appears only in R1C4 and R1C6.
  • Row 5: candidate 4 appears only in R5C4 and R5C6.

These four cells share the same two columns (4 and 6), forming a perfect rectangle — an X-Wing.

X-Wing pattern on candidate 4 — four green cells at R1C4, R1C6, R5C4, R5C6 forming a rectangle, with red eliminated candidates in columns 4 and 6
The X-Wing pattern: candidate 4 locked into two cells in Row 1 and Row 5 (green). Red candidates in columns 4 and 6 can be eliminated.

Step 2: Make the Eliminations

Because the X-Wing guarantees that columns 4 and 6 will each receive a 4 from one of the pattern cells, we can remove candidate 4 from every other cell in those columns. In this example, that means removing the 4 from cells like R2C4, R3C6, R7C4, and so on — any cell in Column 4 or Column 6 that isn’t part of the pattern.

Grid after X-Wing eliminations — candidate 4 removed from non-pattern cells in columns 4 and 6
After applying the X-Wing: candidate 4 has been eliminated from all non-pattern cells in columns 4 and 6. The grid is now simpler.

Step 3: Continue Solving

After these eliminations, some cells may now have fewer candidates — potentially revealing naked singles, hidden singles, or other patterns that weren’t visible before. That single X-Wing can cascade into multiple solved cells.

🔢 Pattern Summary

Find: A candidate that appears in exactly 2 cells in each of 2 rows, all in the same 2 columns.
Eliminate: That candidate from all other cells in those 2 columns.
Shape: Four cells forming a rectangle (the “X” comes from the diagonal connections).

🕵️ How to Spot an X-Wing in Your Grid

Finding an X-Wing takes a systematic approach. Here’s a step-by-step scanning method you can use every time you get stuck:

🛠️ Scanning Method

1. Pick a candidate (start with 1, then 2, then 3, etc.).
2. For each row, count how many cells contain that candidate.
3. Write down (or remember) every row where the count is exactly 2.
4. Compare the column positions of those “two-cell” rows. If any two rows share the same two columns, you have an X-Wing.
5. Eliminate that candidate from all other cells in those two columns.
6. Repeat for the next candidate.

This method might sound tedious, but with practice it becomes second nature. Most solvers develop a visual instinct for spotting the rectangular pattern — you’ll start seeing X-Wings without consciously counting.

💡 Speed Tip

Focus on candidates that appear frequently across the grid but have limited positions in individual rows. If a candidate only appears 3–4 times in a row, it’s not a candidate for an X-Wing in that row (you need exactly 2). Skip rows where the count isn’t exactly 2.

🔄 Column-Based X-Wings

Everything we’ve described so far uses rows as the “defining” lines. But X-Wings work in both directions:

  • Row-based X-Wing: candidate appears in exactly 2 cells in each of 2 rows, same 2 columns → eliminate from those columns.
  • Column-based X-Wing: candidate appears in exactly 2 cells in each of 2 columns, same 2 rows → eliminate from those rows.

The logic is symmetrical. If you’ve scanned all rows and found nothing, try the same approach with columns. The pattern is identical — just rotated 90 degrees.

ℹ️ Row vs. Column

A row-based X-Wing eliminates from columns. A column-based X-Wing eliminates from rows. The “defining” lines lock the candidate, and the eliminations happen on the other axis.

⚠️ Common Mistakes to Avoid

The X-Wing is straightforward once you understand it, but beginners often trip up on a few common errors:

1. Forgetting the “Exactly Two” Rule

For an X-Wing to work, the candidate must appear in exactly two cells in each of the two defining rows (or columns). If it appears in three or more cells in either row, the X-Wing logic doesn’t apply — the candidate isn’t forced into the two columns.

2. Eliminating from the Wrong Axis

If your X-Wing is defined by rows, you eliminate from the columns (not the rows). This is the most common mistake beginners make. The defining lines lock the candidate; the eliminations happen on the perpendicular lines.

3. Removing the Pattern Cells Themselves

Never eliminate the candidate from the four X-Wing cells! Those are the very cells that define the pattern. You only remove the candidate from other cells in the affected columns (or rows).

4. Incomplete Pencil Marks

The X-Wing relies on knowing all possible positions for a candidate. If your pencil marks are incomplete or out of date, you might miss the pattern or make incorrect eliminations. Always keep your candidates fully up to date before looking for advanced techniques.

💡 Pro Tip

After every X-Wing elimination, immediately re-check the affected cells. Removing even a single candidate can trigger a cascade of naked singles, hidden singles, or new patterns. Don’t move on to the next technique until you’ve squeezed every consequence out of the elimination.

📅 When to Look for X-Wings

X-Wings sit in the “intermediate to advanced” tier of sudoku techniques. Here’s where they fit in a typical solving hierarchy:

  1. Basic techniques: Naked singles, hidden singles, full-house.
  2. Intermediate techniques: Naked pairs/triples, hidden pairs/triples, pointing pairs, box/line reduction.
  3. Advanced techniques: X-Wing, Swordfish, XY-Wing, colouring.
  4. Expert techniques: Jellyfish, chains, almost locked sets, forcing nets.

You should exhaust all basic and intermediate techniques before searching for X-Wings. If the simpler strategies are still producing results, there’s no need for the heavier tools yet.

🔢 Difficulty Indicator

If a puzzle requires an X-Wing, it’s typically rated Hard or Expert. Easy and medium puzzles almost never need advanced fish techniques. Our hard sudoku puzzles are a great place to practice spotting X-Wings in real grids.

🚀 Beyond the X-Wing: Swordfish & Jellyfish

The X-Wing is the simplest member of a family of techniques known as fish patterns. They all follow the same logic, just at increasing scale:

Pattern Rows Columns Max Cells
X-Wing 2 2 4
Swordfish 3 3 9
Jellyfish 4 4 16

A Swordfish works the same way as an X-Wing, but uses three rows and three columns instead of two. A Jellyfish uses four of each. The logic is identical — the candidate is locked within the defining rows, so it can be eliminated from the corresponding columns.

Master the X-Wing first. Once the two-row, two-column pattern feels natural, extending it to Swordfish and Jellyfish becomes much easier.

🎯 Practice the X-Wing

The best way to get comfortable with X-Wings is to practice on real puzzles. Here are some tips to build your skill:

  • Use pencil marks: Always fill in all candidates before looking for advanced patterns. On our site, the pencil-mark mode makes this easy.
  • Start with hard puzzles: Easy and medium grids rarely need X-Wings. Jump straight into hard sudoku for the best practice.
  • Focus on one candidate: Don’t try to find X-Wings for all 9 digits at once. Pick one digit, scan all rows, then move to the next.
  • Check your work: After an elimination, verify that it was correct by checking the resulting grid still makes sense. Our sudoku solver can validate your grid at any point.

Hard Sudoku

Expert-level grids that frequently require X-Wings and other advanced strategies. The perfect training ground.

▶ Play Hard Sudoku

Classic Sudoku

Our standard 9×9 puzzles with adjustable difficulty. Switch to hard mode to encounter X-Wing situations.

▶ Play Classic Sudoku

Sudoku Solver

Enter your puzzle and watch the solver find X-Wings and other advanced techniques automatically, step by step.

▶ Open the Solver

Frequently Asked Questions

An X-Wing is an advanced sudoku solving technique. It occurs when a single candidate appears in exactly two cells in each of two different rows, and those cells share the same two columns. The four cells form a rectangle, and you can safely eliminate that candidate from all other cells in those two columns.

Look for an X-Wing after you have filled in all pencil marks (candidates) and basic techniques like naked singles, hidden singles, and pointing pairs no longer make progress. X-Wings are typically needed in hard and expert-level puzzles.

Scan one candidate at a time. For each candidate, look for a row where that candidate appears in exactly two cells. Then look for a second row where the same candidate also appears in exactly two cells — and those two cells must be in the same two columns as the first row. If the four cells form a rectangle, you have an X-Wing.

An X-Wing uses 2 rows and 2 columns (4 cells forming a rectangle). A Swordfish extends the same logic to 3 rows and 3 columns (up to 9 cells). A Jellyfish goes further with 4 rows and 4 columns. They are all part of the same family of “fish” techniques.

Yes! An X-Wing can be defined by rows or by columns — the logic is symmetrical. If a candidate appears in exactly two cells in each of two columns, and those cells share the same two rows, you can eliminate that candidate from all other cells in those two rows.