How to play the 15 puzzle
Only tiles in the same row or column as the gap can move. Tap or click a tile next to the gap to slide it in. Tap a tile further along the same line and every tile between it and the gap slides together. On a keyboard, click the board and use the arrow keys: ← slides a tile left into the gap, ↑ slides one up, and so on.
You win when the tiles read 1 to 15 from the top-left, row by row, with the gap in the bottom-right corner. The counter adds one move for every tile that moves, and the clock starts with your first move. Your best time is saved in this browser.
How to solve it
Nobody solves a 15 puzzle by staring at it. The trick is to solve it in parts and never undo a finished part:
- Top row. Put 1 and 2 in place. Then bring 3 and 4 in together: park 4 where 3 belongs, 3 right below it, move the gap to the top-right corner, and slide 4 right, then 3 up.
- Second row. The same again for 5, 6, 7 and 8. Don't disturb the top row.
- The last two rows, column by column. Bring in 9 and 13 together (13 where 9 belongs, 9 beside it, then 13 down and 9 left), then 10 and 14 the same way.
- The final square. Move the gap around the last 2×2 square until 11, 12 and 15 fall into place.
Our step-by-step guide to solving a sliding puzzle explains each step with pictures.
A short history of the 15 puzzle
The 15 puzzle is usually credited to Noyes Palmer Chapman, a postmaster in Canastota, New York, who was showing friends an early version in the 1870s. By 1880 it was a craze across North America and Europe, sold under names like the Gem Puzzle, the Boss Puzzle, the Game of Fifteen and the Mystic Square.
The puzzle maker Sam Loyd later claimed for years that he had invented it. He hadn't, but he did make one version famous: the "14-15 puzzle", with every tile in order except 14 and 15 swapped, and a story of a $1,000 prize for anyone who could fix it. Nobody ever could. In 1879, the mathematicians William Woolsey Johnson and William Edward Story had already published the reason: exactly half of all arrangements of the puzzle can be solved, and the other half can't. Loyd's was in the wrong half.
Why half of all positions are impossible
Every slide changes the order of the tiles in a very particular way, and one property, called the parity, always comes out the same afterwards. The solved board has one parity. Swapping any two tiles, like 14 and 15, flips it, and no sequence of slides can ever flip it back. That's why a puzzle you take apart and reassemble at random has a one-in-two chance of being impossible. Here's how to check whether a position can be solved. Every puzzle on this site is generated so that it can always be solved.
The 15 puzzle by the numbers
- 10,461,394,944,000 positions can be solved: about 10.5 trillion, half of the 16! ways to arrange the tiles.
- 80 moves is enough for any of them. The hardest positions need all 80 when every single tile counts as a move, or 43 if sliding a whole line counts as one.
- 4×4 is the board, but the same idea works on any size: try the 8 puzzle (3×3) to warm up, or the 24 puzzle (5×5) when this one feels easy.
Questions about the 15 puzzle
How do you solve the 15 puzzle?
Solve the top row, then the second row, placing the last two tiles of each row together. Then solve the last two rows one column at a time (9 with 13, then 10 with 14) and finish by rotating 11, 12 and 15 around the last 2×2 square.
Is the 15 puzzle always solvable?
Only half of all possible arrangements can be solved. Every 15 puzzle on slidingblock.app is generated so that it can be solved.
What is the most moves a 15 puzzle can need?
The hardest positions need 80 single-tile moves to solve, or 43 moves if sliding a whole line of tiles counts as one move.
Who invented the 15 puzzle?
It is usually credited to Noyes Palmer Chapman, a postmaster in Canastota, New York, in the 1870s. Sam Loyd later claimed to have invented it, but he didn't.