Skip to content
Sliding Puzzle Solver
3x34x415 Puzzle
Home›How to solve a 15 puzzle

How to solve a 15 puzzle

To solve a 15 puzzle, enter the current 4x4 arrangement, confirm the target, check solvability and follow the returned tile moves. Use the 15 Puzzle Solver for tiles numbered 1 through 15 and one blank. The empty square is entered as 0; it is not an extra numbered tile. For image pieces, use the 4x4 picture-capable solver instead.

Match the start and goal

Read the board across each row from top-left to bottom-right. Enter all sixteen values, including the gap. If your game finishes with the empty space at bottom-right, the normal goal is:

 1  2  3  4
 5  6  7  8
 9 10 11 12
13 14 15  0

Use Edit to position the tiles or Type numbers to enter the sequence. Open More → Edit goal for a game with another finishing arrangement. The parity rule in the next section assumes the specific ascending target above; a different goal requires comparing with that goal, which the tool does automatically.

Check whether the board is solvable

For this standard 4x4 target, count inversions in the numbered sequence while ignoring 0. An inversion is a pair of tiles in which the larger value appears before the smaller value. Add that count to the blank's row counted from the bottom. An odd sum is solvable; an even sum is not.

This catches the well-known 14-15 swap: the board has one inversion and a blank in the bottom row, so the sum is two. The input is valid, but no sequence of slides reaches the normal goal. Before using repair, make sure you did not simply type those two numbers in the wrong order. The impossible-state guide works through this distinction.

Worked example: three tile moves

Consider this board:

 1  2  3  4
 5  6  7  8
 9  0 11 12
13 10 14 15

Open this exact board in the 15 Puzzle Solver. The sequence below reaches the normal goal in three single-tile moves:

  1. 10 ↑: slide tile 10 up into the gap. The bottom row is now 13 0 14 15.
  2. 14 ←: slide tile 14 left. The bottom row becomes 13 14 0 15.
  3. 15 ←: slide tile 15 left. The bottom row becomes 13 14 15 0, completing the board.

Tile 10 moves up while the blank moves down. This is why copying blank directions instead of tile directions produces the wrong instructions. The result panel uses tile directions throughout. Press Solve to reproduce the sequence, then use the single-step controls to inspect each resulting position.

What the result can tell you

The result shows a move count, the next tile and direction, a complete list, and animation controls. A fast route may appear before the background search has finished. Follow the status and use the solver's label explanation to decide what has been established about the current count. Stopping early keeps the available answer but ends further searching.

All moves are single-tile slides into the adjacent gap. A path length is not a count of mouse gestures, blank rotations or multi-tile swipes. If you are comparing two solutions, make sure they use the same starting board, target and counting convention.

If you prefer to work by hand

Build solved regions in order instead of chasing whichever tile is nearest its target. Finish the top row, then work down the next row while leaving the unfinished region connected so the blank can circulate. The final pair at the end of a row often needs to be staged together: placing one tile permanently too early can block access for the other.

Keep the last two rows available as a working area. Do not assume that a tile in the right spot can never need to move again. For a guaranteed legal continuation from your current attempt, enter that actual board into the solver, rather than starting over or applying a memorized sequence to a different position.

If your puzzle uses pictures or another size

The mechanics are unchanged for fifteen picture pieces, but their identities must come from the completed image. Use manual image mapping, then compare the arrangement before pressing Solve. An 8-puzzle has eight pieces on a 3x3 board; its worked workflow is in the general sliding puzzle guide. The 5x5 page covers larger boards and their reduction-based answer.

Frequently asked questions

How do I enter a 15 puzzle into the solver?

Use the 15 Puzzle Solver and enter sixteen values in row order: tiles 1 to 15 and 0 for the blank. Check that its target matches your game, then press Solve.

Can a 15 puzzle with only tiles 14 and 15 swapped be solved?

With the usual ascending goal and the blank at bottom-right, no. The board has one inversion and its blank is in row one from the bottom. Their sum is even, so the target is unreachable by slides.

Does finding a quick answer end the search?

A 4x4 fast solution can be shown while the background search continues. Check the result label. Stop ends the search; replaying the current answer is a separate operation.

Related Puzzles

  • Sliding Puzzle Solver
  • 3x3 Sliding Puzzle Solver
  • 4x4 Sliding Puzzle Solver
  • 15 Puzzle Solver
  • 5x5 Sliding Puzzle Solver
  • 6x6 Sliding Puzzle Solver
  • 7x7 Sliding Puzzle Solver
  • 8x8 Sliding Puzzle Solver
  • Slide Puzzle Solver
  • Tile Puzzle Solver
  • 8 Puzzle Solver
  • Picture Puzzle Solver

Solving guides

  • How to solve a sliding puzzle
  • How to solve a picture puzzle
  • Check an unsolvable sliding puzzle

Puzzles

  • 3x3 Solver
  • 4x4 Solver
  • 15 Puzzle Solver
  • 5x5 Sliding Puzzle Solver
  • 6x6 Sliding Puzzle Solver
  • 7x7 Sliding Puzzle Solver
  • 8x8 Sliding Puzzle Solver
  • Slide Puzzle Solver
  • Tile Puzzle Solver
  • 8 Puzzle Solver
  • Picture Puzzle Solver

Site

  • About
  • Contact
  • Privacy
  • Terms
  • How to solve a sliding puzzle
  • How to solve a 15 puzzle
  • How to solve a picture puzzle
  • Check an unsolvable sliding puzzle

© 2026 Sliding Puzzle Solver