Sudoku technique 9 of 12

X-Wing

One digit confined to the same two columns in two rows is cleared from the rest of those columns.

What is an X-Wing?

An X-Wing works on one digit. Find two rows where that digit has exactly two possible cells, with both pairs of cells in the same two columns. The four cells form a rectangle. Each row needs the digit once, and whichever way round it falls, the two copies sit at opposite corners and so take up both columns. No other cell in those two columns can hold the digit.

The same works with rows and columns swapped: two columns whose only spots for a digit lie in the same two rows clear the digit from the rest of those rows.

How to spot an X-Wing

Pick a digit and look at it alone, ignoring every other candidate. Go row by row and note the rows where the digit has only two spots. If two of them have their spots in the same two columns, you have an X-Wing. Then scan up and down those columns for the digit outside the four corners.

Do the same with columns. X-Wings are far easier to see with a single digit highlighted, which is why many players pencil one digit at a time, and why the diagram below shows only the 5s.

A worked example

2 8 6 5 5 3 5 4 7 5 3 7 6 4 8 9 9 4 1 5 7 8 3 6 5 3 5 2 1 8 9 4 7 6 6 9 7 5 2 5 1 3 7 1 5 3 6 9 2 5 8 7 9 3 1 6 5 4 2 3 8 6 5 7 9 1 1 6 5 7 3
X-Wing on the digit 5; only the 5s are pencilled in. In rows 3 and 6, the 5 can only go in r3c4, r3c9, r6c4 and r6c9, all of them in columns 4 and 9. Those two rows need two different 5s, one in each of those two columns, so columns 4 and 9 get their 5s from the pattern, and 5 is removed from the rest of those columns: r1c4. That leaves r1c4 with a single candidate, so it is 9.

Position from an Expert puzzle dealt by our Sudoku generator, pencilled in from the digits alone. Our game's own solver stops at naked pairs, so this step is beyond it; we checked that no simpler technique in this guide moves this position forward.

Cells are named by row and column: r4c1 is row 4, column 1. Rows count from the top, columns from the left, and boxes are numbered 1 to 9 reading like a book, so box 1 is top-left and box 9 is bottom-right.

This position is from an Expert puzzle our game dealt. Every candidate is pencilled in from the digits on the board, though the diagram shows only the 5s. Nothing simpler moves the grid forward: no single, no pointing pair or box-line reduction, no naked or hidden pair, and no naked or hidden triple.

Look at rows 3 and 6. Row 3 can only place its 5 in r3c4 or r3c9, and row 6 only in r6c4 or r6c9. Those four cells are the corners of a rectangle in columns 4 and 9. Either r3c4 and r6c9 are the 5s, or r3c9 and r6c4 are. Both ways, column 4 gets its 5 from row 3 or row 6, and so does column 9.

So the 5 pencilled in r1c4 has to go. That cell held only 5 and 9, so r1c4 is 9.

Why it works

Rows 3 and 6 each need a 5, and neither can put it outside columns 4 and 9. That is two 5s for two columns, and no column may hold two 5s, so one lands in each. Column 4’s only 5 therefore comes from row 3 or row 6, and a 5 at r1c4 would be a second one.

Which difficulty levels need it

Expert only. Our game's own solver stops at naked pairs, and any puzzle it cannot finish with those is rated Expert, so no Easy, Medium or Hard puzzle needs an X-Wing.

We measured 3,000 Expert puzzles our generator dealt. A solver that always tries the simplest technique first made a move with an X-Wing in 461 of them. For 12 (0.4%), the X-Wing was the hardest technique the puzzle needed: everything simpler stalls, and adding it finishes the grid. Of the 719 puzzles that the twelve techniques in this guide finish on their own, 23 cannot be finished without it. The rest of our Expert puzzles need techniques this guide does not cover yet, almost all of them chains.

Related: Swordfish .

Try it in a real grid

Free Sudoku in your browser, with pencil marks, hints and a daily puzzle.

Play Sudoku →

All Sudoku techniques · Sudoku rules

Install GameDavinci

You never have to — every game plays in the browser, free, with no download. Installing just adds a home-screen icon, full screen, and offline play for games you've already opened.