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
- Move one disc at a time, and only the top disc of a peg.
- A disc may only go onto an empty peg or onto a bigger disc.
- 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:
| Discs | Fewest moves |
|---|---|
| 4 | 15 |
| 6 | 63 |
| 8 | 255 |
On kawu
- Tap a peg to pick up its top disc, then tap the peg to put it on. Or drag the disc.
- The counter shows your moves against the fewest possible.
- The hint shows the next move of the shortest way from wherever you are, even after a detour.
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