Sudoku Offline

Sudoku techniques

Every technique our solver knows, in the order worth learning, each shown on a board from a real puzzle.

Learn them in this order: full house, hidden single, naked single, pointing pair, box/line reduction, naked pair, hidden pair, the triples, X-Wing, XY-Wing, Swordfish. The first three finish every Easy and Medium puzzle on this site. Each of the others clears candidates until another single appears.

Why this order

The list follows how much you have to look at. A single is about one cell. A pointing pair is about one digit in one box. Pairs and triples take in a whole row, column or box, and an X-Wing or a Swordfish follows one digit across the board. Our solver also takes the first technique on its list that does something. For the last three it tries X-Wing, then Swordfish, then XY-Wing.

In Evil the XY-Wing decides far more puzzles than the X-Wing and the Swordfish together, so learn it before the Swordfish. The measured table for all five levels is on sudoku difficulty levels.

In the boards below the mint cells are the ones the step uses and the pink cells lose a candidate. R3C1 means row 3, column 1. Boxes count from left to right, starting at the top.

Singles

Full house

One empty cell is left in a row, column or box. The missing digit goes there.

Hidden single

A digit has one possible cell left in a row, column or box, even if that cell could hold other digits too. You can find these without notes by scanning one digit at a time.

71396637858619167426231541816354325792458242452945245241245424723423489345894589423489235895795789713513585794578946748954587926792323236797927928844618
In box 1 the 4 fits only in R3C1.

Naked single

A cell has one possible digit left, because its row, column and box already contain the other eight.

596357212547431856298945176743896287452486485292724783781347138136489681461896778936783673892362361251259291313135715737913791317136136713
6 is the only digit still possible in R2C2.

Locked candidates

Pencil marks help from here on. These steps only remove candidates, and the next single comes out of what is left. Finding instructions are on the pointing pairs page.

Pointing pair

Inside a box a digit fits only in one row or one column. The rest of that line loses the digit.

2932297682979182328196563281753184752965729314834563457345613467451468148945694571567845614674514834515683456146814834534557141474556463434747494916164848
In box 5 every possible 5 lies in column 4. One of them will be the 5 of that line, so no other cell of column 4 can be 5. Remove 5 from R2C4 and R3C4.

Box/line reduction

In a row or column a digit fits only inside one box. The rest of the box loses the digit.

284133911355731414676735891123253579695675645784685672782686778672424789689896892682893892389252582894924891218928934734645675625726467946945674568578946746791467168789689467
In column 4 the 6 fits only inside box 8. The rest of box 8 cannot be 6. Remove 6 from R7C5, R8C6 and R9C5.

Pairs and triples

When two digits own two cells, or three digits own three cells, everything else gives way. How to tell the naked and hidden kinds apart is on naked and hidden pairs.

Naked pair

327561894217365156437219446378578624394267819263584298949489892828935835856576715915925129191913571351535781783545635461717
R8C4 and R8C8 can only be 3 and 5. The two digits take those two cells, so no other cell of row 8 can hold them. Remove 5 from R8C7.

Hidden pair

94231658773158269465874923192312936517481925983842617458674674785645846748373478561467124726136791237357256569344948345859
In column 1 the digits 5 and 8 fit only in R4C1 and R6C1. Those two cells cannot hold anything else. Remove 4 from R4C1 and R6C1.

Naked triple

71354896138763825486923426832417935625138972626254979478789255924591393419256916791791715171457145759135793715791789695677856781814242484646
R1C4, R8C4 and R9C4 share only 2, 4 and 6. Three digits fill three cells, so no other cell of column 4 can hold them. Remove 4 from R5C4; 6 from R7C4.

Hidden triple

81634458277256981424382984915232468528425257979136913636191369193463415891591837371712712346356934935856686756715715676767137917913179159156373716916
In row 3 the digits 3, 4 and 6 fit only in R3C1, R3C4 and R3C6. Those three cells cannot hold anything else. Remove 1 from R3C1; 9 from R3C1.

X-Wing and Swordfish

Both follow a single digit. In an X-Wing two rows share the same two columns for it, and in a Swordfish three rows share three columns. Rows and columns can swap roles.

46377633987251438458363285646298263761212581812528915918915914451251258125615624124515696797979279121791917979158144513537857159147915791359344548595948
X-Wing. In rows 2 and 9 the 8 fits only in columns 2 and 8. Those rows use up the 8 in each of these columns. Remove 8 from R1C2.
716548416769118765244532817692965477285658629628543928938238235929235244537372825839391338138134491934134173437397913137
Swordfish. In rows 2, 7 and 8 the 3 fits only in columns 2, 6 and 9. Those rows use up the 3 in each of these columns. Remove 3 from R1C9, R6C9 and R9C9.

XY-Wing

An XY-Wing uses three cells with two candidates each. The middle one, called the pivot, holds X and Y. One wing holds X and Z, the other Y and Z, and the pivot sees both of them. If the pivot is X, the first wing must be Z. If it is Y, the second one must be. Either way one wing is Z, so a cell that sees both wings cannot be Z.

285974613643521789719524627847231372376159842128372837196838365948138935491859195616468894956568459594656454656
XY-Wing. R4C4 has two candidates. Whichever it is, R4C7 or R6C5 becomes 9. A cell that sees both of them cannot be 9. Remove 9 from R4C5 and R6C7.

How to find it

  1. Mark every cell with exactly two candidates.
  2. Take one of them as the pivot and call its digits X and Y.
  3. In its row, column and box, look for a two-candidate cell that shares only X, and another that shares only Y.
  4. Check that the second digit of both is the same. That digit is Z.
  5. Remove Z from every cell that sees both wings.
834514182941298536784616734859224383957162846418239752785946137969262757353667353912572791759165677917
Another XY-Wing. R6C6 has two candidates. Whichever it is, R4C5 or R6C1 becomes 5. A cell that sees both of them cannot be 5. Remove 5 from R4C2 and R6C5.

The usual mistake is to remove Z from the cells the pivot sees. The pivot never contains Z, and only a cell that sees both wings loses it. The wings do not have to see each other.

Practice on three new boards.

3861275178967635418175298623457618968914375224187178568397514949452452343429293434595636394923342349462624
R8C7 has two candidates. Whichever it is, R7C8 or R8C1 becomes 9. A cell that sees both of them cannot be 9. Remove 9 from R7C1 and R8C8.
329765184187439645281937852733685438498253278356419534822625564619491679241927245915791612626729161767161917967
R5C7 has two candidates. Whichever it is, R5C1 or R6C8 becomes 9. A cell that sees both of them cannot be 9. Remove 9 from R5C8 and R6C1.
498137164953246981768725419329113699617832458759423613245169782757562638235825453837567584645785725824
R6C7 has two candidates. Whichever it is, R5C8 or R6C6 becomes 8. A cell that sees both of them cannot be 8. Remove 8 from R5C4 and R6C8.

When none of them works

First look for a missing or wrong candidate, because a stale note hides every pattern. The checklist on what to do when you are stuck goes through it. Some puzzles from other sources need longer chains that this list does not cover. The solver tells you when that happens and gives you one cell of the answer.

Questions

What is the trick to solving sudoku?

Scan one digit at a time and place hidden singles until none are left. Then write all candidates and look for pointing pairs. That alone carries you through many Hard puzzles.

Is there a formula to solve sudoku?

There is no formula that gives you the next digit. A computer can solve a puzzle by trying digits and going back when one fails. People use the steps on this page instead.

How many techniques do I need?

Three kinds of single are enough for Easy and Medium here. Hard adds pointing pairs and triples, box/line reduction and naked pairs. Expert adds hidden pairs and triples, and Evil adds X-Wing, XY-Wing and Swordfish.

Do I ever have to guess?

Not in the puzzles on this site. Each was solved with these techniques before it went in. A puzzle from elsewhere may need more, and one with more than one answer cannot be finished by logic at all.

What are the 45, 3, 159 and L rules?

The rule of 45 belongs to Killer sudoku. The others are a variant, a name for scanning and a name we could not trace. All four are on the rule of 45.

Keep reading