Guide for parents

How to solve Tower of Hanoi

In short

Tower of Hanoi looks like a stacking toy, but it hides one of the neatest ideas in maths: a big problem is just a small problem done twice, with one move in the middle. Once a child sees that, any tower becomes solvable.

The rules

There are three pegs and a stack of rings, biggest at the bottom. The goal is to move the whole tower from the first peg to the last. You move one ring at a time, always the top ring of a peg, and a bigger ring can never sit on a smaller one.

That’s it. The challenge is doing it without getting stuck, and doing it in as few moves as possible.

Tower of Hanoi: wooden rings stacked on the first of three pegs
Ages 6+2,178 challengesFrom France

Tower of Hanoi

Move the tower to the last peg. A big ring never sits on a small one.

Planning aheadLogic

Start with two rings, then three

With two rings the answer is three moves: small ring to the middle peg, big ring to the last peg, small ring on top of it. Let your child find this on their own; it takes a minute and it’s the seed of everything else.

With three rings, ask: “Before the biggest ring can move to the last peg, where must the other two be?” They must all be on the middle peg, out of the way. So the plan is: move the top two rings to the middle (the two-ring puzzle again), move the big ring across, then move the two rings back on top of it (the two-ring puzzle once more). That’s 3 + 1 + 3 = 7 moves.

The pattern that solves any tower

Every tower works the same way. To move n rings: move the top n − 1 rings to the spare peg, move the biggest ring to the target, then move the n − 1 rings on top of it. Each smaller tower is solved by the same method, so the idea repeats all the way down.

Because each extra ring doubles the work and adds one move, the fewest possible moves are 2ⁿ − 1: 7 for three rings, 15 for four, 31 for five, 63 for six and 127 for seven. AmuseMind shows this best score at the top so children can see how close they got.

There is also a handy rhythm for doing it by hand. Every other move, move the smallest ring, always going round the pegs in the same direction. On the moves in between, make the only legal move that doesn’t touch the smallest ring. With an odd number of rings, send the smallest ring towards the target peg first; with an even number, send it to the middle peg first.

Teaching it to your child

Younger children (six and seven) do best with three rings and lots of freedom. Let them make wasted moves; the satisfaction of finishing matters more than the count. Ask “where does the big ring need to go?” rather than telling them a move.

Older children love the challenge of hitting the minimum exactly. When they manage four rings in 15, ask them to predict five before they try it. Spotting that the answer roughly doubles is a genuine “aha” about patterns.

Tower of Hanoi: wooden rings stacked on the first of three pegs
Ages 6+2,178 challengesFrom France

Tower of Hanoi

Move the tower to the last peg. A big ring never sits on a small one.

Planning aheadLogic
Number Slide: numbered wooden tiles in a frame
Ages 6+49,000 challengesFrom USA

Number Slide

Slide the wooden tiles until the numbers are back in order.

Planning aheadLogic
Sokoban: wooden crates in a small warehouse
Ages 7+34 challengesFrom Japan

Sokoban

Push every crate onto its spot. You can push, but never pull.

Planning aheadLogic

Common mistakes

The most common slip is moving the smallest ring to the wrong peg at the very start, which leads to a dead end a few moves later. If your child keeps ending up with the big ring blocked, suggest starting again and trying the other peg first. Undo is always there, and starting over is part of how the pattern gets learned.

Turning it into a family puzzle

Tower of Hanoi works brilliantly as a shared challenge. Take turns making moves with a three-ring tower and see whether you can reach the minimum of seven together. Talking through each move (“if I put this here, what can you do next?”) teaches children to look one step ahead without it feeling like a lesson.

You can also play “predict the count”. Before starting a bigger tower, ask your child to guess how many moves it will take. After a few towers, most children notice that each new ring roughly doubles the work, and some will find the 2ⁿ − 1 rule on their own. Writing the counts in a little table (3 rings: 7, 4 rings: 15, 5 rings: 31) makes the pattern jump off the page.

For children who love it, a real wooden set on the table and the puzzle on a screen make a nice pair: the physical rings are satisfying to hold, and the on-screen version keeps count and resets in a second.

Questions parents ask

What is the minimum number of moves for Tower of Hanoi?

For n rings it is 2ⁿ − 1: 7 moves for 3 rings, 15 for 4, 31 for 5, 63 for 6 and 127 for 7.

What age can children solve Tower of Hanoi?

Most six and seven year olds can solve three rings with a little patience. Hitting the minimum with four or five rings suits children from about nine.

Is Tower of Hanoi good for maths?

It is a classic way to meet recursion and doubling patterns: solving a big problem by solving a smaller copy of it.

Try a puzzle now

Every puzzle is free to try in the browser. No sign-up, no ads.

More guides