Web Games Online Sudoku Online

How many Sudoku puzzles are there?

There are 6,670,903,752,021,072,936,960 ways to fill in a finished 9 by 9 Sudoku grid, and about 5.5 billion of them are truly different once you treat relabelled numbers and shuffled rows as the same grid. The number of puzzles is far bigger and has never been counted exactly: the best published estimate is about 3.1 × 1037 puzzles, and that only counts the ones with no spare clues.

Every puzzle on Sudoku Online is one of them. Here is where each of those numbers comes from, in plain words.

What is the difference between a grid and a puzzle?

A grid is a finished Sudoku: all 81 squares filled, with 1 to 9 once in every row, column and box. It is the answer.

A puzzle is a grid with most of the numbers taken out. For it to be a proper Sudoku, the numbers that are left must lead to exactly one answer.

The two are counted separately because one grid can become many puzzles. Take out a different set of numbers and you have a new puzzle with the same answer. That is why the puzzle count is so much bigger than the grid count.

Who counted the grids, and how?

In 2005 two mathematicians, Bertram Felgenhauer and Frazer Jarvis, worked out the exact number of finished 9 by 9 grids with a computer. The answer is 6,670,903,752,021,072,936,960, or about 6.67 sextillion.

They did not check every grid one by one. They counted the ways to fill the top three boxes, grouped the ones that behave the same way, and then counted how each group could be finished. That brought the job down to something a computer could do.

To see how fast the numbers grow, we counted the smaller sizes ourselves, by computer, trying every possible grid:

Grid sizeFinished gridsHow it was counted
4 by 4288Our own count, in a few thousandths of a second
6 by 628,200,960Our own count, in about 37 seconds
9 by 9About 6.67 sextillionFelgenhauer and Jarvis, 2005

The 4 by 4 is the size of our Sudoku for Kids, and the 6 by 6 is our Mini Sudoku. The 9 by 9 count is far beyond what our simple method could reach, which is why it took a smarter approach.

Why are only about 5.5 billion grids truly different?

Many of those 6.67 sextillion grids are the same grid in disguise. You can change a finished grid in several ways and it stays a valid Sudoku:

  • Swap the numbers around. Turn every 1 into a 7 and every 7 into a 1, for example.
  • Shuffle rows inside a band. The three rows that run through the same three boxes can go in any order.
  • Shuffle whole bands. The top, middle and bottom groups of three rows can swap places.
  • Do the same with columns.
  • Flip the grid along its diagonal, so rows become columns.

If you count all the grids you can reach this way as one, Ed Russell and Frazer Jarvis found that there are 5,472,730,538 essentially different grids. That is about 5.5 billion.

Why has nobody counted the puzzles?

Because there are far too many, and because “puzzle” is harder to pin down than “grid”.

The cleanest kind to count is a minimal puzzle: one with exactly one answer, where taking away any single clue would allow a second answer. There are no spare clues. The researcher Denis Berthier estimated that there are about 3.1 × 1037 minimal puzzles. That is a 31 followed by 36 zeros. He got there by generating a large random sample of puzzles, correcting for the known bias of his generator, and scaling the result up. Nobody has counted them one by one.

Puzzles that are not minimal, with a clue or two to spare, add many more on top. So the full number of possible puzzles is bigger again, and no one has published an exact figure for it.

What is known exactly is the lower limit. A puzzle needs at least 17 clues to have only one answer. Our post on why the fewest clues is 17 explains how that was proved.

How big are these numbers, really?

Say you could fill in one finished grid every second, without stopping:

  • All 6.67 sextillion grids would take about 211 trillion years.
  • The 5.5 billion truly different grids would take about 173 years.

And that is only the answers. The puzzles outnumber the grids by many times over. There is no risk of the puzzles running out, today or ever.

For more about the people behind the puzzle, from its American start to the British boom, see our history of Sudoku.

Where do these numbers come from?

What else do people ask?

Will I ever get the same puzzle twice on this site?

It is very unlikely. Every new game starts from a random number, one of about 4.3 billion, and different numbers give different puzzles. In our test, 100,000 different starting numbers gave 100,000 different puzzles on Easy, and the same on Hard.

Will we ever run out of Sudoku puzzles?

No. Even the 5.5 billion truly different grids would take 173 years to get through at one a second, and each grid can be turned into a huge number of different puzzles.

What is the fewest clues a Sudoku can have?

Seventeen. In 2012 Gary McGuire, Bastian Tugemann and Gilles Civario used a long computer search to show that no puzzle with 16 clues has only one answer.

Play Sudoku now and start one of them. There is no danger of running out.

More from the blog