Skip to content
kawu

How to Play the Tower of Hanoi

The Tower of Hanoi is a classic puzzle invented in 1883. A tower of discs, biggest at the bottom, has to be moved from one peg to another.

The rules

  1. Move one disc at a time, and only the top disc of a peg.
  2. A disc may only go onto an empty peg or onto a bigger disc.
  3. Move the whole tower from the left peg to the right peg.

The fewest moves

With n discs the puzzle needs at least 2ⁿ−1 moves:

DiscsFewest moves
415
663
8255

On kawu

Frequently asked questions

How many moves does the Tower of Hanoi take?

At least 2ⁿ−1 for n discs: 15 moves for 4 discs, 63 for 6, 255 for 8. The legend's 64 discs would take over 18 quintillion moves.

Can I move a disc to the middle peg?

Yes. Any peg is allowed as long as the disc goes on an empty peg or on a bigger disc.

Last updated 2026-10-20

Play Tower of Hanoi now →Tower of Hanoi strategy