Puzzle GameLogic

How to Solve the 15 Puzzle (Every Time)

A simple, repeatable method that turns a frustrating scramble into a reliable solve — plus the one trick everyone needs.

Why it feels impossible (but isn't)

The 15 puzzle frustrates beginners because every move that fixes one tile seems to break another. The secret is that you should never try to solve it all at once. Instead, you solve it in layers — finish a row and a column, lock them away, and treat what remains as a smaller puzzle. Done this way, a scramble that looks hopeless becomes a series of small, manageable steps. Follow along in the15 Puzzle, which always deals a solvable board.

The one rule about solvability

Before the method, a fact worth knowing: only half of all random 15-puzzle arrangements can actually be solved. The other half are mathematically impossible, no matter how cleverly you slide. This is why picking up tiles and dropping them back in a random order can leave you with a puzzle that can never be completed. A well-made digital version avoids this by shuffling from the solved state using only legal slides, which guarantees a solution exists — so if you are stuck, it is you, not the board.

Step 1: solve the top row

Work left to right. Bring tile 1 to the top-left corner, then tile 2 to its right, and so on. Moving a tile is a matter of manoeuvring the blank space around to push it where you want, one step at a time. The first two tiles of the top row are easy. The last two — tiles 3 and 4 — are where beginners get stuck, because placing 3 in its final spot often leaves no room to bring 4 in without knocking 3 out again.

The last-two-tiles trick

Here is the move that unlocks the whole puzzle. To finish the right end of a row, do not place the second-to-last tile in its final spot directly. Instead:

This paired rotation places both tiles at once without either displacing the other. The same trick works for the bottom of each column. It feels like magic the first time, and once you have it, the rows and columns fall quickly.

Step 2: solve the left column

With the top row locked, turn the puzzle sideways in your mind and solve the left column the same way: tile 5, then tile 9, then tile 13, using the same last-two trick for the bottom of the column (tiles 9 and 13). Now the top row and left column are done and never need to move again — you have reduced a 4 × 4 puzzle to a 3 × 3 one.

Step 3: repeat, then finish the corner

Solve the next row and next column of the remaining 3 × 3 block exactly as before, reducing it to a 2 × 2 block in the bottom-right. That final 2 × 2 — tiles 11, 12, 15 and the blank — cannot be solved by placing tiles individually; instead you simply rotate them clockwise or anticlockwise until they click into order. If they rotate endlessly without solving, the board was unsolvable to begin with (which cannot happen in a proper version).

StageDo
Top rowPlace 1–4, use the pair trick for 3 & 4
Left columnPlace 5, 9, 13, pair trick for 9 & 13
ReduceRepeat on the remaining 3 × 3
Final 2 × 2Rotate the last four into order

Getting faster

Once the method is second nature, speed comes from planning the blank's path. Rather than nudging a tile one square at a time, look at where the empty space needs to travel to move a tile efficiently, and route it around without disturbing solved tiles. Speed-solvers think in terms of the blank's journey, not the tiles'. But even at a relaxed pace, the layered method guarantees a solution — which is the whole point.

The puzzle that fooled a nation

The 15 puzzle has one of the best origin stories in games. It appeared in the 1870s and triggered a genuine international craze, but its fame owes much to a famous stunt: the American puzzle-maker Sam Loyd claimed to have offered a $1,000 prize — an enormous sum then — to anyone who could solve a version with the 14 and 15 tiles swapped. Thousands of people reportedly spent days and nights trying. Employers complained about lost productivity; there are stories of shopkeepers neglecting customers.

The prize was never claimed, because the challenge was mathematically impossible. Swapping two tiles flips the puzzle's parity, moving it into the unreachable half of all arrangements. Loyd's "unsolvable" puzzle was, in effect, a very profitable piece of mathematics dressed up as a game — and it made the parity result famous. (Historians now doubt Loyd invented the puzzle at all, crediting Noyes Chapman, but the legend stuck.)

Why exactly half of all arrangements are impossible

The parity argument is elegant enough to be worth understanding. Count the number of inversions in an arrangement — the number of pairs of tiles that appear in the wrong relative order. Now notice what a single slide does: moving a tile sideways changes nothing about the ordering, while moving a tile vertically jumps it past exactly three others, changing the inversion count by an odd number — but it also moves the blank up or down one row.

Combine those two facts and a quantity stays constant: the inversion count plus the blank's row number always keeps the same parity, no matter how you slide. Since the solved state has a specific parity, only arrangements sharing that parity can ever reach it. Exactly half of all possible arrangements do, and the other half — including Loyd's swapped pair — are permanently marooned. This is why a well-built digital version scrambles by making legal moves from the solved state rather than shuffling tiles randomly: it guarantees you land in the solvable half.

From solving to speed-solving

Once the layered method is automatic, improvement comes from the same place it does in speedcubing: reducing wasted movement. Beginners move the blank one square at a time, reacting to each position; fast solvers plan the blank's route several moves ahead, steering it around solved tiles by the shortest safe path. Learning to think in terms of the empty space rather than the tile you are pushing is the single biggest speed gain available.

Two other habits help. Learn to recognise the standard setups on sight — particularly the last-two-tiles configuration — so you execute the rotation without re-deriving it each time. And practise look-ahead: while your fingers finish placing one tile, let your eyes already locate the next one and its route. That overlap between execution and planning is what separates a steady solve from a fast one. For reference, the hardest possible 15-puzzle position requires 80 single-tile moves, so any solve close to that range on a bad scramble is genuinely efficient.

The $1,000 prize nobody could win

The 15 puzzle caused a genuine international craze in the 1880s — a Victorian equivalent of the Rubik's Cube boom, with people obsessing over it in offices, trains and parlours. The puzzle-maker Sam Loyd famously offered a $1,000 prize (an enormous sum at the time) to anyone who could solve a board presented with just the 14 and 15 swapped, and later claimed to have invented the puzzle himself.

Both claims were dishonest. Loyd did not invent the puzzle — it was created around 1874 by Noyes Chapman, a postmaster in New York — and his prize was safe because that particular arrangement is mathematically impossible to solve. He was, in effect, running a challenge he knew could never be won. The controversy did more than any advertisement could: mathematicians took the puzzle seriously, and within a year had published the proof explaining exactly why half of all arrangements can never be solved.

Why exactly half are impossible

The proof rests on a quantity that never changes, no matter how you slide the tiles — what mathematicians call an invariant. Count the number of inversions in the board: every pair of tiles that appears in the wrong relative order when you read the grid row by row. Now add the row number of the blank square, counting from the bottom. That combined total is either even or odd — and here is the key: every legal slide preserves whether it is even or odd.

Sliding a tile sideways doesn't change the reading order at all. Sliding one vertically moves it past exactly three other tiles, changing the inversion count by an odd number — but it also moves the blank up or down a row, which flips the other part of the sum. The two changes cancel out, so the parity is locked from the moment the board is created. Since the solved board has one particular parity, any arrangement with the opposite parity — exactly half of all 20 billion or so possible arrangements — can never reach it. Loyd's 14-15 swap was one of those, and no amount of cleverness could have rescued it.

God's number: 80 moves

A natural follow-up question is: from the worst possible solvable starting position, how many slides does a perfect solver need? This value is nicknamed God's number, and for the 15 puzzle it was proven in 2011 to be exactly 80 single-tile moves. Every solvable scramble in existence, no matter how tangled it looks, can be solved in 80 moves or fewer.

That figure is a useful reality check on your own play. The layered method in this guide is reliable but not optimal — it typically takes a few hundred moves, because locking rows in place means shuffling tiles around fixed regions. That is a fair trade: a method you can always execute beats an optimal one you cannot compute. But it explains why speed-solvers do not use the beginner method at all; they plan several tiles at once and route the blank efficiently, which cuts the move count dramatically at the cost of much more mental effort.

The same idea, bigger and smaller

PuzzleGridNote
8 puzzle3 × 3Solvable in ≤31 moves; a classic AI teaching example
15 puzzle4 × 4The classic; God's number 80
24 puzzle5 × 5Same method, far more layers to peel

The beauty of the layered approach is that it scales to all of them without modification: solve the top row and left column, then treat the rest as a smaller puzzle, repeating until a 2 × 2 remains. Learn it once on the 15 puzzle and you can solve a 5 × 5 or larger the first time you meet one — which is exactly what makes it worth learning properly rather than fumbling through by trial and error.

Common sticking points

Almost everyone gets stuck in the same three places, and each has a specific fix rather than requiring more effort.

The underlying principle behind all three fixes is the same: protect what you have finished. The layered method only works because solved regions stay solved, so any move that disturbs them costs you far more than the shortcut saves. Once routing the blank around your completed rows becomes automatic, the whole puzzle stops feeling like a fight and starts feeling like a procedure — which is exactly the point.

The 15 puzzle rewards structure over cleverness: solve a row, solve a column, shrink the problem, andfinish with a rotation. Try it in the15 Puzzle— your best time is saved on your device, so you can chase a faster solve each round.