Sort It - Number Puzzle app icon

How to play

Number Puzzle (15 Puzzle)

Also known as 15 puzzle, Sliding puzzle, N-puzzle, Gem Puzzle, Game of Fifteen, Mystic Square

  • 5.0★ 297 ratings
  • 100K+ downloads
  • On Google Play since 2021
  • Free to play

What is Number Puzzle (15 Puzzle)?

This is the classic sliding tile puzzle: a grid of numbered tiles with one cell left empty. You can only push a tile into that gap, so every rearrangement has to be steered one slide at a time. It looks trivial and turns into a real test of planning as the grid grows.

How to play Number Puzzle (15 Puzzle)

Setting up the board

The board is a square grid of numbered tiles with exactly one cell left empty. The classic 4x4 version holds fifteen tiles numbered 1 to 15; grids range from 3x3 with eight tiles up to 8x8 with sixty-three. The tiles begin shuffled, and that single empty cell is the only room you have to work with.

How it works

  1. Only a tile directly adjacent to the empty cell can move: up, down, left or right, never diagonally.
  2. Sliding a tile moves it into the gap, and the gap moves to the cell the tile just left.
  3. Tiles can never be lifted out, rotated, or swapped with each other.
  4. Pushing a whole line of tiles at once is simply shorthand for making those single slides in sequence.
  5. Arrange the tiles in ascending numerical order, reading left to right and top to bottom.
  6. The empty cell belongs in the bottom right corner when the board is solved.

How to solve

You win when every tile sits in ascending order from left to right and top to bottom, with the empty cell back in the bottom right corner.

Play Number Puzzle (15 Puzzle) on your phone Free on Android — offline vs AI, or pass-and-play with a friend.
 Get it on Google Play

Solving tips

About this puzzle

The puzzle was created by Noyes Palmer Chapman, a postmaster in Canastota, New York, who demonstrated a version with sixteen numbered blocks as early as 1874.

It swept the United States as a craze in 1880, sold under names such as the Gem Puzzle and the Boss Puzzle.

The puzzle designer Sam Loyd claimed from 1891 until his death in 1911 that he had invented it, a claim historians have since shown to be false.

In 1879, Johnson and Story proved that half of all starting arrangements can never be solved, which explains the impossible versions that circulated during the craze.

Frequently asked questions

Exactly half of all possible arrangements can be solved; the other half can never reach the ordered state no matter how you play. The deciding factor is a parity invariant: count the inversions, meaning pairs of tiles out of numerical order, and on even-width boards add the row of the empty cell counted from the bottom. Sliding a tile can never flip that parity, so puzzles are generated from solvable positions.

Any solvable 4x4 board can be finished in at most 80 single-tile moves, and a small number of positions genuinely require all 80. Most shuffles need far fewer, and finding the shortest solution for a given board is a hard computational problem.

The family runs from 3x3 with eight tiles up through 4x4 with fifteen, and on to larger grids such as 5x5, 6x6 and 8x8 with sixty-three tiles. They are known collectively as the N-puzzle, named after the tile count rather than the grid.

No, the method scales. You keep peeling off the top row and left column until only a 3x3 remains, so a large board is simply the same technique repeated more times with longer gap journeys between placements.

Because the two cells sit next to each other, placing one correctly forces the gap to displace the other. The standard fix is to set them up in the rotated arrangement and cycle them in together rather than trying to seat them individually.

More puzzles