Skip to content

Tower of Hanoi

Move the tower to the far peg, one disc at a time, never big on small.

Loading game…

How to play

  1. Move one disc at a time, always the top disc of a peg.
  2. A disc can never be placed on a smaller disc.
  3. Get the whole tower onto the right-hand peg.
  4. The fewest moves is 2ⁿ−1: 15 for 4 discs, 63 for 6, 255 for 8.
  5. Tap a peg, then another, to move its top disc; or drag the disc.

About Tower of Hanoi

Play Tower of Hanoi free online with 4, 6 or 8 discs: drag or tap to move, a move counter against the 2ⁿ−1 minimum, and a hint that always knows the shortest way.

Tower of Hanoi: common 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.
What is the trick to the Tower of Hanoi?
Every other move is the smallest disc, and it always circles the pegs in the same direction. Between its moves there's only one other legal move. Follow that and you finish in 2ⁿ−1 moves.
  • Peg Solitaire1 playerJump pegs over each other until one is left in the centre.Puzzle GamesPlay
  • Switch Off1 playerEvery press flips a light and its neighbours. Turn them all off.Puzzle GamesPlay
  • Memory1 playerTurn over two cards at a time and find all the pairs.Puzzle GamesPlay
  • Rectangles (Shikaku)1 playerCut the grid into rectangles, one number each, number equals area.Puzzle GamesPlay
  • Collapse1 playerTap groups of matching blocks to clear them; big groups score big.Puzzle GamesPlay
  • Light Up1 playerPlace lamps to light every cell without two lamps shining on each other.Puzzle GamesPlay

More Puzzle Games →