Guides

Tower of Hanoi 4 Disks: The 15-Move Solution

Solve Tower of Hanoi with 4 disks in 15 moves. Follow the complete sequence, understand the recursive plan and avoid common mistakes in our browser game.

Original illustration: four colored rings stacked on the left of three pegs, with a path toward the empty right peg.
Original ProjectGAMR editorial illustration.

The four-disk solution starts with a smaller problem

The Tower of Hanoi 4 disks puzzle takes at least 15 legal moves from a complete starting tower to a complete destination tower. The useful plan is to move the top three disks out of the way, transfer the largest disk once, then rebuild those three above it. This guide uses ProjectGAMR's four-disc, three-peg browser version, with the tower starting on the left and the target on the right.

Call the left peg A, the middle peg B and the right peg C. Number the disks by size: 1 is the smallest and 4 the largest. Move only the exposed top disk, and never put a larger disk on a smaller one. These labels describe the instructions below; the game's controls identify pegs by position.

Moves 1–7: park the smaller tower in the middle

Follow this sequence, reading each entry as disk number, source peg, destination peg: 1: disk 1, A to B; 2: disk 2, A to C; 3: disk 1, B to C; 4: disk 3, A to B. At this checkpoint, disk 4 remains on A, disk 3 is on B, and disks 2 and 1 form a tower on C.

Continue with 5: disk 1, C to A; 6: disk 2, C to B; 7: disk 1, A to B. You should now have disks 3, 2 and 1 stacked on B, largest underneath. C is empty. Check this arrangement before continuing: it leaves a legal destination for disk 4 rather than trapping it behind a smaller disk.

Moves 8–15: move the base and rebuild on the right

Move 8 is disk 4, A to C. Then play 9: disk 1, B to C; 10: disk 2, B to A; 11: disk 1, C to A; 12: disk 3, B to C. The right peg now holds disks 4 and 3. The two smallest disks are together on A, ready for the final three-move transfer.

Finish with 13: disk 1, A to B; 14: disk 2, A to C; 15: disk 1, B to C. All four disks should be on C in descending size from bottom to top. The worked sequence contains 15 transfers; selecting a peg to pick up a disk is part of making a transfer, rather than another puzzle move.

Why 15 moves is the minimum

NIST's Dictionary of Algorithms and Data Structures gives the standard three-peg minimum as 2 to the power n, minus 1. For four disks, that is 16 minus 1. Its recursive construction matches the plan here: move n minus 1 disks aside, move the largest, then move the smaller tower onto it.

You can see the lower bound without memorizing a formula. Before disk 4 can reach an empty C, the smaller three must be together on B. Moving a three-disk tower requires seven moves; rebuilding it above disk 4 requires seven more. The largest disk's transfer sits between those tasks: 7 + 1 + 7 = 15. The displayed sequence meets that bound.

Keep the destination clear instead of chasing quick progress

A disk reaching C early does not mean it can stay there. In moves 2 and 3, C temporarily stores two small disks; moves 5 and 6 clear them away again. Treat the spare peg as a changing role rather than a permanent storage bin. The same peg can be a destination for a small task and an obstacle to the next larger task.

If you lose your place, compare your board with the checkpoints after moves 4, 7, 8 and 12. Do not jump to a later instruction merely because its source peg contains a disk. Confirm the disk number too. For a clean 15-move attempt, restart after a detour instead of assuming this sequence is still aligned with the current arrangement.

Use the browser controls and then solve from the plan

In ProjectGAMR, tap or click the source peg, then the destination. Selecting the same peg cancels the selection. An illegal larger-on-smaller placement is rejected and leaves the disk selected, so choose a legal destination or cancel. The move counter increases when a disk actually transfers, and the puzzle finishes when all four reach the right peg.

After following the sequence once, try recalling only three milestones: smaller tower to the middle, largest disk to the right, smaller tower to the right. Break each smaller transfer into the same pattern. This four-disk walkthrough does not cover four-peg variants, altered movement rules or arbitrary starting positions; those require their own plan.

Keep exploring

FOLLOW THE SOURCE

Sources & further reading

Have a correction? Tell our editorial team.

✦ NICE. YOU LEARNED SOMETHING.
PUT THE IDEAS INTO PLAY

YOUR NEXT MOVE.

Nim

↗

Take a little, leave a trap. Remove the final token to win this classic logic duel.

LogicTwo players

Towers of Hanoi

↗

Move a tower, one disc at a time. Small steps unlock a surprisingly deep puzzle.

LogicSolo

15 Puzzle

↗

Slide the pieces and restore the order. Every shuffle is reachable.

LogicSolo

Games, guides & curious things. Press Esc to close.

YOUR LOCAL PLAYER CARD

Small quests.
Real good breaks.

Progress stays in this browser. No accounts, tracking or public leaderboard.