Skip to content
PencilGrid

Sudoku technique · Hard

X-Wing, Swordfish and XY-Wing in Sudoku

X-Wing, Swordfish and XY-Wing are the three Sudoku techniques that make a PencilGrid grid Hard. An X-Wing is one digit confined to the same two columns in two rows. A Swordfish is the same pattern over three lines, and an XY-Wing is a chain of three two-candidate cells; every Hard grid needs at least one of them.

Published · Updated

X-Wing: a rectangle of candidates

Choose a digit. Find two rows in which that digit has exactly two candidate cells, and check whether those cells fall in the same two columns. If they do, the four cells form a rectangle. The digit must occupy two opposite corners, one per row, which means it also takes one cell in each of the two columns, so every other candidate for the digit in those two columns can be erased. Read with columns as the base, the same rectangle clears the two rows instead.

Worked Example: an X-Wing on the 9s

The daily from 16 August 2026 is puzzle 15, a Hard grid with 22 givens. After thirty-seven steps of singles the solver stalls with 59 cells filled. In row 6 the digit 9 fits only columns 4 and 8; in row 7 it also fits only columns 4 and 8. Whichever diagonal the two 9s take, columns 4 and 8 each receive one of them from these rows.

So 9 is erased from the rest of both columns: row 5, column 4 drops from 4, 6, 9 to 4 and 6, and row 8, column 8 drops from 1, 4, 9 to 1 and 4. Neither cell is solved yet, but the first of them has just become a two-candidate cell, which is exactly what the next technique needs.

The 16 August 2026 Sudoku daily with an X-Wing on the digit 9 outlined at rows 6 and 7, columns 4 and 8A 9 by 9 Sudoku after thirty-seven solver steps, shown in accent. Four cells are outlined: row 6 column 4 (3, 4, 9), row 6 column 8 (1, 9), row 7 column 4 (4, 9) and row 7 column 8 (4, 9). Row 5, column 4 is shaded with 4, 6, 9 and row 8, column 8 is shaded with 1, 4, 9; the other empty cells of rows 5 and 6 show their candidates, none of which is a 9 outside the rectangle.3257168781952462514893737981245681 4 524 6 94 5371 91 41 4 563 4 973 4 581 922374 98164 95568721 4 91 94526783
Rows 6 and 7 each confine their 9 to columns 4 and 8. The 9s in the two shaded cells are removed.

XY-Wing: a chain of three two-candidate cells

An XY-Wing uses three cells that each have exactly two candidates. The pivot holds X and Y. One pincer, which shares a unit with the pivot, holds X and Z; the other pincer, also sharing a unit with the pivot, holds Y and Z. Whatever the pivot turns out to be, one of the pincers must be Z, so any cell that sees both pincers cannot be Z. To find one, list every two-candidate cell, pick a pivot, and look for two others in its row, column or box that overlap it on different digits and share a third digit with each other.

Worked Example: the XY-Wing one step later

On the same grid the X-Wing left row 5, column 4 with 4 and 6, and that cell is the pivot. Row 5, column 5 holds 6 and 9 and shares the pivot's row and box; row 7, column 4 holds 4 and 9 and shares its column. If the pivot is 4, the row pincer is 9; if the pivot is 6, the column pincer is 9. One of the two pincers is a 9 either way.

Two cells see both pincers and still carry a 9: row 6, column 4, which shares the column with one pincer and the centre box with the other, and row 8, column 5, which shares a column with one and the bottom-centre box with the other. Both lose their 9; row 8, column 5 had only 3 and 9, so it becomes 3, and singles finish the puzzle from there.

The 16 August 2026 Sudoku daily after the X-Wing, with an XY-Wing outlined: pivot at row 5 column 4, pincers at row 5 column 5 and row 7 column 4The same grid one step later. Row 5, column 4 (candidates 4, 6) is the outlined pivot; row 5, column 5 (6, 9) and row 7, column 4 (4, 9) are the outlined pincers. Row 6, column 4 (3, 4, 9) and row 8, column 5 (3, 9) are shaded because they see both pincers and lose their 9.3257168781952462514893737981245681 4 524 66 94 5371 91 41 4 563 4 973 4 581 922374 98164 9556873 921 41 94526783
One pincer is a 9 whichever digit the pivot takes, so the two shaded cells cannot be 9. Row 8, column 5 becomes 3.

Swordfish: the three-line X-Wing

A Swordfish uses three lines instead of two. In each of the three lines the digit's candidates must fall within the same three crossing lines, and a line may use only two of them. The digit then occupies exactly one cell in each of those three crossing lines, so it can be removed from every other cell of theirs.

The daily from 2 August 2026, puzzle 1, needs one. With 62 cells filled, the digit 8 appears in column 2 only at rows 1 and 6, in column 4 only at rows 1 and 2, and in column 9 only at rows 1, 2 and 6. Three columns, three rows, so the 8s of rows 1, 2 and 6 are all inside those columns, and the 8 in row 1, column 1 is erased. That cell drops to 4 and 7 and becomes the pivot of an XY-Wing on the very next step, the pattern that makes puzzle 1 Hard.

The 2 August 2026 Sudoku daily with a Swordfish on the digit 8 outlined across columns 2, 4 and 9A 9 by 9 Sudoku with 62 cells filled, placements in accent and every remaining candidate written in. Seven cells are outlined: rows 1 and 6 of column 2 (7, 8 each), rows 1 and 2 of column 4 (8, 9 each), and rows 1, 2 and 6 of column 9 (4 8 9, 8 9 and 4 8). Row 1, column 1 is shaded with candidates 4, 7, 8.4 7 87 818 962534 8 93658 914278 94 8 924 97534 8161924867534 8361754 8 98 9257 84 7239164 82183976457 957 96483216435218 98 97
Columns 2, 4 and 9 confine their 8s to rows 1, 2 and 6, so the 8 in the shaded cell of row 1 is removed.

How often Hard dailies need each one

The grader puts all three in the Hard band, so a Sunday daily may need any of them. X-Wings and XY-Wings are the common ones: the daily of 30 August 2026, puzzle 29, is Hard because of an X-Wing on the digit 6 and needs nothing harder, while puzzle 15 above needs an X-Wing and an XY-Wing in succession. Swordfish are rarer and tend to appear, as on puzzle 1, as a short bridge to an XY-Wing. When the singles and pairs run dry on a Hard grid, press Hint: it names the technique and marks the pattern cells and the cells that lose a candidate, and seeing a few drawn on real grids teaches the shapes faster than any description.

Common Mistakes

  • Building an X-Wing from rows that have three candidate cells for the digit. Each base line must have exactly two, or the rectangle is not forced.

  • Eliminating from the base lines instead of the cover lines. A row-based X-Wing clears the two columns; the rows keep their candidates.

  • Choosing XY-Wing pincers that overlap the pivot on the same digit. The pincers must take different digits from the pivot and share a third digit, Z, with each other.

Frequently Asked Questions

What makes a Sudoku Hard on PencilGrid?

Needing an X-Wing, a Swordfish or an XY-Wing at least once. The solver grades every grid by the hardest technique it uses, so a puzzle that singles, pairs and box-line eliminations can finish is Medium at most.

Is a Swordfish just a bigger X-Wing?

Yes. An X-Wing uses two base lines and two cover lines; a Swordfish uses three of each, and a base line may hold the digit in only two of the three cover lines. The elimination is the same: the digit leaves the cover lines outside the pattern.

Do XY-Wings need pencil marks?

Yes. The pattern is built from cells with exactly two candidates, which only notes make visible. On the 16 August 2026 daily the pivot itself was created by the X-Wing one step earlier.

Sources

Sources last checked on 2026-11-10.

Written and checked by the maker of PencilGrid, a puzzle enthusiast and software engineer who also builds the generator and solver behind every grid on the site.

Every technique on this page is one the site's solver actually uses: puzzles are generated offline, checked for a single solution, and graded by the hardest step they need. How PencilGrid puzzles are made →

More Sudoku Pages

Related puzzles: Sudoku X · Killer Sudoku · Futoshiki

Keep Learning