Moves
0
Minimum
7
Time
0:00

Tower of Hanoi

Play the Tower of Hanoi online, then let the solver finish any position you get stuck in.

The rules

  • Move the whole tower from peg 1 to the last peg (peg 3, or peg 4 if you choose four pegs).
  • Move one disk at a time, and only the top disk of a peg.
  • Never put a disk on top of a smaller one.

With n disks the fewest possible moves is 2n − 1: 7 for three disks, 1,023 for ten. The board shows that number as the minimum, and tells you how many moves are left from wherever you are.

Learn more

By size: 3 disks4 disks5 disks6 disks