15 Puzzle

USA, 1880Puzzles

Fifteen tiles, one empty space. Slide them back into order, 1 to 15.

15 Puzzle

Put the tiles in order from left to right, top to bottom, with the gap in the bottom-right corner. Every shuffle can be solved.

Size
Advertisement

How to play the 15 Puzzle

The board is a 4×4 frame holding fifteen numbered tiles and one empty space. A tile next to the space can slide into it, which moves the space to where the tile was. Your goal is to put the tiles back in order, 1 to 15, reading left to right and top to bottom, with the empty space in the bottom-right corner.

Tap any tile in the same row or column as the gap and the whole run of tiles between them slides over in one move. You can also swipe, or use the arrow keys on a keyboard. Tiles that are already in their home square are highlighted, so you can see your progress at a glance. For a gentler start, try the 3×3 eight-puzzle; for a long think, the 5×5 twenty-four puzzle.

A simple way to solve it

You don't need to plan the whole puzzle at once. Most people solve it in layers, and the method below works on every board.

  1. Finish the top row. Bring 1 and 2 into place first. Then line up 3 and 4 together: park 4 where 3 belongs, put 3 just below it, and rotate the pair into the corner in one go.
  2. Finish the second row the same way, without disturbing the first. From here on, the top row is a wall.
  3. Solve the last two rows column by column. Place 9 and 13 together as a vertical pair, then 10 and 14, using the same park-and-rotate trick.
  4. Cycle the last three. The final three tiles always fall into place by circling them around the empty corner.

The same layer method solves the 3×3 and 5×5 boards. On a 5×5 you simply finish three rows before switching to columns.

Why half of all positions are impossible

If you pop two tiles out of a real 15 Puzzle and swap them, it can never be solved. Every slide changes the order of the tiles in a way that keeps one quantity, the parity of the arrangement, fixed. Exactly half of all possible arrangements have the wrong parity, and no sequence of moves will ever fix them. That is why this page never simply scatters the tiles at random: every shuffle is checked, and corrected if needed, so it is always solvable.

The history of the 15 Puzzle

The puzzle is usually credited to Noyes Palmer Chapman, a postmaster in Canastota, New York, who showed friends an early version in the 1870s. Wooden copies went on sale in Boston, and in early 1880 the puzzle became a craze across the United States and then Europe, played in offices, on trains and in the newspapers.

The craze also produced one of the first famous pieces of recreational mathematics. In 1879 William Woolsey Johnson and William Edward Story published a proof in the American Journal of Mathematics that only half of the starting positions can be solved. The best-known impossible case is the "14-15 puzzle", with just the 14 and 15 swapped. The puzzle writer Sam Loyd later claimed to have invented the game and to have offered a large prize for solving that position, a prize that was safe because no solution exists.

Frequently asked questions

Is every shuffle solvable?

Yes. Each shuffle is a random arrangement that has been checked for parity, the mathematical property that decides whether a position can be solved. Any arrangement with the wrong parity is corrected before you see it.

What is the fewest number of moves to solve the 15 Puzzle?

Any position of the 4×4 puzzle can be solved in at most 80 single-tile moves, a result proven with computer searches. Most shuffles need far fewer. Humans using the layer method typically take a few hundred moves, and that is perfectly fine.

What's the difference between the 8, 15 and 24 puzzles?

They are the same game on different board sizes: 3×3 with eight tiles, 4×4 with fifteen, and 5×5 with twenty-four. The 3×3 is quick to learn on, the 4×4 is the classic, and the 5×5 is a long, satisfying solve.

Does it count tile slides or moves?

The move counter adds one for every tile that slides, so sliding a run of three tiles at once counts as three moves. The timer starts on your first slide.

Is it free?

Yes, completely free with no sign-up. Your best time is saved in your browser, on your own device.