Moves
0
Minimum
7
Fewest from here
7
Time
0:00

Tower of Hanoi with 3 Disks

Three disks is where almost everyone starts: small enough to solve by trial and error, big enough that the order of the moves matters. The shortest solution is 7 moves.

Quick facts

3 disks, from peg 1 to peg 3
Fewest moves possible7
The smallest disk first goes topeg 3
The largest disk moves on move4
With four pegs instead of three5 moves
Time at one move per second7 seconds

A three-disk tower is the building block of every bigger one. The top three disks of any larger tower are moved in exactly this way, again and again.

How often each disk moves

The smallest disk does half of all the work. Each disk moves half as often as the one below it, and the largest disk moves exactly once.

Number of moves of each disk
DiskMoves
Disk 1 (smallest)4
Disk 22
Disk 3 (largest)1

A pattern worth remembering

Count how many times 2 divides the move number, and add one: that is the disk to move. Move 1 is odd, so it moves disk 1. Move 2 is divisible by 2 once, so it moves disk 2. Move 4 is divisible by 2 twice, so it moves disk 3. Move 4 is divisible by 2 exactly 2 times, so it is the one move of disk 3. You can check every line of the list below against it.

The complete solution

All 7 moves, in order. Peg numbers are 1 (left), 2 (middle) and 3 (right).

  1. Disk 1: peg 1 → 3
  2. Disk 2: peg 1 → 2
  3. Disk 1: peg 3 → 2
  4. Disk 3: peg 1 → 3
  5. Disk 1: peg 2 → 1
  6. Disk 2: peg 2 → 3
  7. Disk 1: peg 1 → 3

Other sizes

4 disks5 disks6 disks For the rule behind these lists see how to solve the Tower of Hanoi; for why 3 disks need 7 moves see the formula; to finish a position that has gone wrong, use the solver.