Tower of Hanoi

Move the whole tower, a big disk never on a small one.

Tower of Hanoi: game details

Category
Puzzle
Released
November 2026
Updated
November 2026
Players
1 player
Levels
4 (Easy, Medium, Hard, Expert)
Controls
mouse, touch, keyboard
Badges
4, from bronze to diamond (up to +185 points)
Platforms
Web browser on computer, phone and tablet
Screen
Portrait and landscape
Technology
HTML5
Price
Free, no download

Tags

More games like this

Tower of Hanoi is one of our puzzle games. If you enjoy it, try 2048, Sudoku or Sliding Puzzle next.

How to play Tower of Hanoi

  1. All the disks start on the left peg, the biggest at the bottom.
  2. Tap a peg to pick up its top disk, then tap another peg to drop it. On a keyboard, keys 1, 2 and 3 pick the pegs.
  3. Move one disk at a time, and always put a disk on a bigger one or on an empty peg.
  4. Rebuild the whole tower on the right peg to win.

Tips

  • With an odd number of disks, move the smallest disk first to the right peg; with an even number, to the middle peg.
  • The smallest disk moves every other turn, always in the same direction around the pegs.
  • Between two moves of the smallest disk, there is only one legal move left: make it.
  • The best possible score is 2 to the power of the number of disks, minus 1: 7 moves for 3 disks, 31 for 5.
  • Stuck after a few wrong moves? Hint shows the best next move from where you are, and Undo takes a move back. The diamond badge is for a perfect tower with neither.

About Tower of Hanoi

The Tower of Hanoi was invented by the French mathematician Edouard Lucas in 1883. A legend tells of monks moving 64 golden disks: at one move per second, they would need almost 600 billion years.

It is a perfect lesson in breaking a big problem into smaller ones: to move a tower of five disks, first move the four on top, then the big one, then the four again. Four levels go from 3 to 6 disks, and the game tells you when you hit the perfect score.

Points and badges

Finishing a game of Tower of Hanoi earns points for your level. Four badges are waiting in this game, from bronze to diamond: each one says what to do and adds bonus points.

Questions

What is the minimum number of moves?

2 to the power of n, minus 1, where n is the number of disks: 7 for 3 disks, 15 for 4, 31 for 5 and 63 for 6.

Why can't I drop a disk on some pegs?

A disk can only go on an empty peg or on a bigger disk.

Do I get a bonus for a perfect game?

Yes. Solving the tower in the minimum number of moves earns extra points.