Skip to content

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

Every move of the 3-disk solution
MoveDiskFromTo
11AC
22AB
31CB
43AC
51BA
62BC
71AC
On this page
  1. The solution
  2. The shape of the solution
  3. Which disk moves when
  4. The smallest disk's circuit
  5. About the 3-disk puzzle
  6. Other sizes
  7. Frequently asked questions

The shape of the solution

There are never 7 separate moves to remember — only three stages:

  1. Moves 1 to 3: build a tower of 2 disks on B.
  2. Move 4: disk 3 crosses to C — the only time it moves.
  3. 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.

DiskMovesFirst moves onThen every
14move 12 moves
22move 24 moves
31move 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

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.