How to solve the 15 puzzle

Anyone can solve the 15 puzzle with one simple idea: solve it a piece at a time, and never undo what you have finished. First the top row, then the left column. What is left is a 3×3 puzzle, which you solve the same way. This page shows each step.

You won’t find the shortest solution this way. A computer can solve a typical 4×4 board in about 50 moves; this method takes more like 100 to 200. But it works on every board, every time, and it gets faster with practice.

Two moves to know

Moving a tile where you want it. To move a tile one cell, the empty cell has to be on that side of it first. So the real work is steering the empty cell around: bring it next to the tile, on the side you want the tile to go, then slide the tile into it. Repeat.

Moving a tile without disturbing the rest. Once a row is done, don’t let the empty cell go into it. Steer the empty cell around the tile you are moving, along the cells you haven’t solved yet.

Step 1: the top row (1, 2, 3, 4)

  1. Bring 1 to the top left corner.
  2. Bring 2 next to it.
  3. The last two tiles of a row are the tricky part. If you put 3 in place first, there is no room left to bring 4 in beside it. So instead:
    • Put 4 where 3 belongs (third cell of the top row).
    • Put 3 directly below it (third cell of the second row).
    • Bring the empty cell to the top right corner, then slide 4 right and 3 up. Both drop into place together.

If 4 gets stuck in the corner with 3 next to it the wrong way round, move 4 down out of the row, rebuild the pair as above, and try again.

Step 2: the left column (5, 9, 13)

Now ignore the top row; you won’t touch it again. The left column works the same way as the row, turned on its side:

  1. Bring 5 to the left of the second row.
  2. For the last two, put 13 where 9 belongs, put 9 right beside it, then bring the empty cell to the bottom left corner and slide them both into place.

Step 3: the 3×3 corner

What’s left is a 3×3 puzzle in the bottom right: 6, 7, 8, 10, 11, 12, 14 and 15. Solve it just like the big one:

  1. The top row of the corner: 6, then 7 and 8 as a pair, like 3 and 4 before.
  2. The left column of the corner: 10 and 14 as a pair.
  3. The last four cells hold 11, 12 and 15. Turn them around the little 2×2 square until they click into place. They always will: every board on this site can be solved.

The 5×5 puzzle

The method is the same, just one round longer: solve the top row and the left column of the 5×5 board, and you are left with a 4×4 puzzle. Solve that as above.

Using fewer moves

  • Plan the empty cell’s path. Most wasted moves come from the empty cell taking the long way round. Before moving, look for the shortest route that doesn’t cross your finished tiles.
  • Move whole runs. Tapping a tile two or three cells from the empty cell slides the whole run at once. It counts the same number of moves, but it’s much faster.
  • Look ahead. While you place one tile, notice where the next one is and try to bring it closer as you go.
  • Try 3×3 for the fewest moves. After each 3×3 game you see the shortest possible solution length. Getting within a few moves of it is great practice for the bigger boards.
  • Stuck? Use a hint. It shows a move that always leads towards a solved board.

When you are ready, try the daily challenge: everyone gets the same board, and three stars means finishing within one and a half times the fewest moves possible.

Stuck on a real puzzle? Type it into the solver and watch the shortest solution move by move.