How to play sudoku

Sudoku is a 9×9 grid split into nine 3×3 boxes. Some squares start with a digit; you fill in the rest. There are four rules, and everything else is technique.

Rules

  1. Fill the 9×9 grid so every row holds the digits 1 to 9 once each.
  2. Every column also holds 1 to 9 once each.
  3. The thick lines split the grid into nine 3×3 boxes (numbered 1 to 9, left to right, top to bottom). Each box holds 1 to 9 once each too.
  4. The digits you start with are fixed. Tap an empty square, then a number. Turn on Notes to pencil in the digits a square might hold.

Your first moves

Start with the digits that already appear most often. Take one, say 7, and look at a box that has no 7 yet. The 7s in the neighbouring boxes rule out every square in their row and column. Often only one square in the box is left: that is the 7. Go through all nine digits this way, then start again; each digit you place opens up new ones.

When scanning stops working, write notes: the digits each empty square could still hold. Every technique below works on those notes.

A worked example

14836579861825963449639218757493129281
An easy puzzle with 38 digits given
715483962346592781298167543182759634457836129639214875821375496973641258564928317
Its only solution

The first three moves, as our solver finds them:

  1. Row 2, column 5 can only be 9: the other eight digits are all in its row, column or box.
  2. Row 2, column 6 can only be 2: the other eight digits are all in its row, column or box.
  3. Row 2, column 1 can only be 3: the other eight digits are all in its row, column or box.

Everything after that is more of the same: this puzzle needs nothing but singles, which is what makes it easy.

Techniques, from easiest to hardest

Every example below comes from a real puzzle on this site, at the moment our solver used the technique. Small digits are notes; red ones are the notes the technique removes.

Naked single

A square where eight of the nine digits already appear in its row, column or box. The ninth must go there.

8767649643159251814927684329327868132248
Row 2, column 4. Its row already has 4, 6, 7 and 9, its column 2, 3, 4, 5, 7 and 9 and its box 1, 3, 4, 6 and 7. Between them that is every digit except 8, so 8 goes here.

Hidden single

A digit that has only one possible square left in a row, column or box. The square may still look open to other digits; this one has nowhere else to go.

3165949528389732912593695381269565782
Box 4 still needs a 2. The 2s already on the board (shaded yellow) rule out every other empty square in the box through their rows and columns, so the 2 goes in row 6, column 2, even though that square could still hold other digits.

Pointing pair and box/line reduction

If a digit's only options inside a box all lie in one row (or column), that row gets its digit from this box, so the rest of the row can't have it. The mirror image is the box/line reduction: if a digit's options in a row all fall inside one box, the rest of that box can't have it. Medium puzzles need one of these at least once.

3541143547613951864237237198872539173591613758989163222
Box 1 (blue) can only put its 2 in column 3: the small 2s are its only options. Whichever one it is, column 3 gets its 2 from box 1, so the 2 struck out in red elsewhere in column 3 can go.

Naked and hidden pairs and triples

Two squares in the same row, column or box that can only hold the same two digits (a naked pair) will take those two digits between them, so the other squares in that unit can't have them. A hidden pair is the reverse: two digits that can only go in the same two squares of a unit, so those squares can't hold anything else. Triples work the same way with three squares and three digits. Hard puzzles need at least one.

X-Wing

Two rows where a digit can only go in the same two columns. The two rows need one each and can't share a column, so between them they use that digit's places in both columns. Every other square in those two columns loses the digit. It works the same with rows and columns swapped.

729631327994673525287343298587322365932686493274444444
In columns 5 and 7 (blue), the 4 can only go in rows 2 and 8: the small 4s. Each of those columns needs one 4, and they can't share a row, so they fill rows 2 and 8 between them. No other square in those rows can be 4: the red ones go.

XY-Wing

Three squares with two notes each: a pivot with AB, and two wings it can see, one with AC and one with BC. If the pivot is A, the first wing is C; if the pivot is B, the second wing is C. Either way one wing is C, so any square that sees both wings can't be C.

Swordfish

The X-Wing with three rows and three columns: a digit that, in three rows, can only go in the same three columns. Those rows take the digit's places in all three columns, so the rest of the columns lose it.

57216842517913645237615145967376513495471471562158488888888
In rows 5, 6 and 8 (blue), the 8 can only go in columns 2, 5 and 7: the small 8s. Each of those rows needs one 8, and they can't share a column, so they fill columns 2, 5 and 7 between them. No other square in those columns can be 8: the red ones go.

What each level needs

LevelDigits givenWhat it takes
Easy36–40Only naked and hidden singles
Medium28–34At least one pointing pair or box/line reduction; nothing harder
Hard24–32At least one naked or hidden pair or triple; nothing harder
Expert24–30One or two X-Wing or XY-Wing steps
Evil24–26A Swordfish, or three or more X-Wing / XY-Wing steps

Common mistakes

Questions

What is the goal of sudoku?

To fill every empty square so that each row, each column and each 3×3 box contains the digits 1 to 9 exactly once.

Is sudoku a math puzzle?

No arithmetic is involved. The digits are just nine different symbols; the puzzle would work the same with letters or colours.

Do I ever need to guess?

Not on this site. Every puzzle here can be finished with the techniques on this page. On harder puzzles elsewhere you may meet ones that need more advanced chains, but a well-made sudoku never needs trial and error.

Where do I start?

Pick the digit that already appears most often and look for the boxes still missing it. For each of those boxes, check which of its empty squares that digit can reach. When only one is left, fill it in.

How many digits does a sudoku need to have one solution?

At least 17. That was shown in 2012 by an exhaustive computer search. Our puzzles start with 24 to 40.