Sudoku
A new Sudoku every time, each with exactly one solution and a difficulty based on the techniques it needs. Click a cell and type 1 to 9, switch on Notes to pencil candidates, and use Undo, Check, Hint or Solve when you are stuck. Runs entirely in your browser.
Generating a puzzle…
Solving techniques
- Naked single: a cell where only one digit is still possible. Check its row, column and box.
- Hidden single: a digit that can go in only one cell of a row, column or box.
- Pointing and claiming pairs: when a digit’s only spots in a box lie on one line, it cannot appear elsewhere on that line (and the reverse).
- Naked pair: two cells in a unit that can only hold the same two digits; those digits go from the unit’s other cells.
What the difficulty label means
The label comes from running a logic solver on the finished puzzle. Easy needs only singles. Medium needs at least one pair or locked-candidate move. Hard is what those techniques cannot finish. The line under the board names the techniques this puzzle needed. Clue counts are kept sensible (at least 36 for easy and 30 for medium) so an easy puzzle is also short for a person to solve.
How the puzzles are made
The page fills a complete valid grid at random using backtracking, then removes digits one at a time, keeping a removal only if a solver confirms the puzzle still has a single solution (and, for easy and medium, still stays within that level). That is why no puzzle ever needs guessing to be uniquely solvable. The count of grids behind this is a counting problem: a single row alone has 9! = 362,880 orderings (see the permutation calculator).
How to play Sudoku
Fill the 9 × 9 grid so that every row, every column and every one of the nine 3 × 3 boxes contains the digits 1 to 9 exactly once. Some cells are filled in at the start; the rest are yours to solve. Click or tap an empty cell, then type a digit or use the number pad under the board. Wrong digits are not blocked, so you can make mistakes and fix them. Check marks cells that conflict with the solution, Hint fills in one cell, and Solve shows the whole answer. Clear mine removes everything you entered but keeps the original clues.
Notes and undo
Turn Notes on to pencil small candidate digits in a cell instead of committing to an answer. Notes let you track what each cell could be, which is how most harder puzzles are solved. When you place a digit, Undo reverses the last move, including a note, so exploring a guess is safe. Switch Notes off to go back to entering final digits.
Choosing a difficulty
Each puzzle is graded by the logic it needs, not just by how many clues it shows. An easy puzzle can be finished with naked and hidden singles. A medium one needs at least a pair or pointing and claiming move. A hard puzzle needs more than these techniques. Start with easy, learn the techniques listed above, and move up when the singles run out and you want a new idea to try.
A method that works
- Scan for singles. Look at rows, columns and boxes with the most digits filled and see which digit is missing.
- Note the candidates for every empty cell once the easy cells are done.
- Look for hidden singles in each box, then each row and column.
- Apply pairs and locked candidates to remove candidates from other cells.
- Repeat. Each placed digit creates new singles, so go back to step 1.
Do I need to guess?
Never. Every puzzle here has exactly one solution and can be solved by logic alone at the level shown. If you are stuck, you have probably missed a single: re-check the rows, columns and boxes for each missing digit. When you are truly stuck, Hint reveals one cell without spoiling the rest of the puzzle.
Benefits and tips
- Sudoku uses no arithmetic; the digits are only symbols. Any nine distinct symbols would work.
- Work on one digit at a time and see where it fits in every box.
- Check for duplicates before you commit a digit, because one early mistake spreads.
- Take a break if you stall; a fresh look often reveals the next move straight away.
Common questions
How do you play Sudoku?
Fill the 9 × 9 grid so that every row, every column and every 3 × 3 box contains the digits 1 to 9 exactly once. Some cells are given; the rest are deduced. Every puzzle here has exactly one solution, so it can always be solved by logic without guessing.
How are the difficulty levels decided?
By the techniques a solver needs, not by the number of clues. Easy puzzles fall to naked and hidden singles alone. Medium puzzles also need a pair or a locked-candidate move (a pointing or claiming pair, or a naked pair). Hard puzzles get stuck even with those and need something stronger, such as a wing, a chain or a trial. After each puzzle is made, the page checks it with a logic solver and shows the techniques it needed.
How do pencil notes work?
Switch on Notes, then click a cell and press a digit to pencil it in; press it again to remove it. Typing a real digit in a cell clears that cell’s notes and removes the same digit from the notes in its row, column and box. Undo steps back one action at a time, including note changes.
How many Sudoku grids exist?
There are 6,670,903,752,021,072,936,960 valid completed grids, about 6.67 × 10²¹. Counting grids that are the same after rotating, reflecting or relabelling digits, there are 5,472,730,538 essentially different ones.
What is the minimum number of clues?
No 16-clue puzzle with a unique solution exists; the smallest known uniquely solvable puzzles have 17 clues, proved in 2012 by exhaustive computer search.
Does Sudoku need maths?
No arithmetic at all. The digits are only symbols, so you never add or multiply. What you need is patience and a habit of checking each row, column and box for the digit that is missing.
Related calculators
-
Permutation calculator
9! orderings of a row.
-
Combination calculator
Counting selections.
-
Factorial calculator
n! exactly.
-
Blackjack
A game of odds.