Tower of Hanoi with 3 Disks
The shortest solution is 7 moves. Play them on the board, or read every one in the list under it.
Optimal solution
7moves2³ − 1
- First move
- Disk 1, A → C
- At one move a second
- 7 seconds
- Difficulty
- Easy
3 disks on tower A. 7 moves to go.Step 0 of 7
| Move | Disk | From | To |
|---|---|---|---|
| 1 | 1 | A | C |
| 2 | 2 | A | B |
| 3 | 1 | C | B |
| 4 | 3 | A | C |
| 5 | 1 | B | A |
| 6 | 2 | B | C |
| 7 | 1 | A | C |
On this page
The shape of the solution
There are never 7 separate moves to remember — only three stages:
- Moves 1 to 3: build a tower of 2 disks on B.
- Move 4: disk 3 crosses to C — the only time it moves.
- Moves 5 to 7: rebuild the 2-disk tower on top of it.
Stages 1 and 3 are each the three-move solution for two disks: smallest, larger, smallest.
Which disk moves when
Disk 1 makes half of all the moves — 4 of them, on every odd-numbered move. Each larger disk moves half as often as the one above it, which is the binary counter hiding inside the puzzle: the disk that moves is one more than the number of times you can halve the move number and still get a whole number. Move 6 halves once, to 3, so move 6 is disk 2. There is more on that in Tower of Hanoi and binary.
| Disk | Moves | First moves on | Then every |
|---|---|---|---|
| 1 | 4 | move 1 | 2 moves |
| 2 | 2 | move 2 | 4 moves |
| 3 | 1 | move 4 | — |
The smallest disk's circuit
With 3 disks — an odd number — disk 1 travels A → C → B → A for the whole game, never reversing. Every move in between is the only legal move that leaves disk 1 alone. Those two rules alone reproduce the list above move for move; the iterative solution explains why, and strategies turns it into something to play by.
About the 3-disk puzzle
Three disks is the size to learn on, and the smallest one with any structure to see. Two disks is three moves and hardly a puzzle. Three is the first size where the pattern behind every larger tower fits on one screen: three moves to park two disks on B, one move for the largest disk, three moves to bring the two back on top of it.
It is also where the most common beginner mistake is easiest to catch. The instinct is to send the smallest disk to B first, as if the middle tower were the natural stepping stone. With an odd number of disks it is not: disk 1 goes straight to C. Start the other way and you can still finish, but you will never finish in seven.
Seven is a Mersenne prime — a prime one less than a power of two — and so is the count for seven disks, for a reason with a history of its own. Once three feels automatic, move on to four disks, where that first move changes direction.
Other sizes
- 4 disks15 moves — this solution twice, with one move between.
- Solve 3 disks from a position you are stuck inThe solver finishes a half-played game in the fewest moves left, rather than starting again.
- Every solution, from 3 to 10 disksMove counts, first moves and timings side by side.
Frequently asked questions
How many moves does it take to solve Tower of Hanoi with 3 disks?
7 moves is the minimum: 2³ − 1 = 7. No solution with fewer moves exists, and any solution with more has wasted some.
What is the first move in 3-disk Tower of Hanoi?
Move disk 1, the smallest, from tower A to tower C. With an odd number of disks the smallest disk travels A → C → B → A for the whole game, so its first stop is C. Sending it to B first still lets you finish, but it costs one extra move.
How long does 3-disk Tower of Hanoi take to solve?
A perfect game is 7 moves, which at one move a second is 7 seconds and at three moves a second — about as fast as anyone plays by hand — 2 seconds.
What are the 7 moves of 3-disk Tower of Hanoi?
Disk 1 from A to C, disk 2 from A to B, disk 1 from C to B, disk 3 from A to C, disk 1 from B to A, disk 2 from B to C, and disk 1 from A to C. Written as pairs of towers: AC, AB, CB, AC, BA, BC, AC.