Tower of Hanoi

Move four disks to the right-hand peg, then compare your move count with the fixed 15-move shortest route.

About 1 minThinkingNo download, no sign-up

This round measures how you solved it: the moves you used, against the shortest route.

Step efficiency = 15 divided by the moves you take. Higher is better.It describes this round, and practice makes it better.


  1. Move one disk at a time.
  2. Only the top disk of a peg can move.
  3. A bigger disk can never sit on a smaller one.
  • Tap a peg to pick up its top disk, then tap the peg you want it on.
  • Or hold the disk and drag it across to another peg.
  • Keys 1 2 3 pick a peg the same way; Esc puts the disk back.

Goal: get all four disks onto the right-hand peg.

4 disks, 15 moves at best · 90 second cap.2^4 − 1 = 15, the shortest route for any 4-disk start.

The first round starts with a 3-disk practice board, not scored.

How to read your score

ScoreWhat it means
100.0% (15 moves)A Tower of Hanoi step-efficiency score of 100.0 percent means you solved a four-disk round in 15 moves, exactly matching its 15-move shortest route with no extra moves. This is the best possible route score on this page, not a ranking against other players.
93.8% to 83.3% (16 to 18 moves)A Tower of Hanoi step-efficiency score from 93.8 to 83.3 percent means 16 to 18 moves against the fixed 15-move shortest route, or one to three extra moves. Compare that extra-move count with your own completed rounds; this range is not a player ranking.
78.9% to 62.5% (19 to 24 moves)A Tower of Hanoi step-efficiency score from 78.9 to 62.5 percent means 19 to 24 moves against the fixed 15-move shortest route, or four to nine extra moves. The useful comparison is whether that extra-move count falls across your next completed rounds.
60.0% to 37.5% (25 to 40 moves)A Tower of Hanoi step-efficiency score from 60.0 to 37.5 percent means 25 to 40 moves against the fixed 15-move shortest route, or ten to twenty-five extra moves. This describes the route taken in one round, not your ability or rank.
36.6% or lower (41 moves or more)A Tower of Hanoi step-efficiency score of 36.6 percent or lower means 41 moves or more against the fixed 15-move shortest route, at least twenty-six extra moves. It describes one completed route on this page, not the person who played it.

These Tower of Hanoi score ranges apply only to this page's four-disk round, whose shortest route is always 15 moves. No player norm is available, so the ranges do not show how you rank against other people. Higher is better; compare your own completed rounds played under the same rules.

How to play

  1. How do you play the Tower of Hanoi online?: Press Start. On your first visit, solve or skip the unscored three-disk practice board, then start the four-disk scored round. Study the opening before you move: the solving clock starts with your first legal move. Make that move within two minutes or the attempt is dropped without a score.
  2. How do you move disks in the Tower of Hanoi?: Tap a peg to pick up its top disk, then tap the destination peg. You can also drag a disk, or press 1, 2 or 3 to choose a peg and Esc to put the disk back. Selecting the original peg again cancels the pick-up and does not add a move.
  3. What are the Tower of Hanoi rules?: Move only one top disk at a time, and never place a larger disk on a smaller one. The round ends when all four disks are stacked on the highlighted right-hand peg. An illegal move is refused without adding to your move count, so choose another destination and continue.
  4. How is the Tower of Hanoi score calculated?: Higher is better. Your step-efficiency score is 15 divided by your move count, shown as a percentage: 15 moves gives 100.0 percent and 19 moves gives 78.9 percent. The result also shows extra moves, solving time and the separate time you spent planning before the first move.

What this measures

Three pegs hold four disks of different sizes. Move one disk at a time, take only the top disk of a peg, and never put a bigger disk on a smaller one. The round is over when all four disks sit on the right-hand peg.

Every scored round starts from one of sixteen four-disk positions that are exactly 15 moves from the goal. Because the shortest route is always 15 moves, you can compare completed rounds by move count and extra moves.

Step efficiency is 15 divided by the moves you took. Higher is better, and 100.0 percent means you matched the shortest route. Check the raw move count beside the percentage to see exactly how many moves a detour added.

You can study the untouched board before committing to a route. The solving clock starts on your first legal move; the earlier planning time is shown separately. Make that first move within two minutes or the attempt is dropped without a score.

Moving a disk back where it came from is legal and counts as another move. There is no undo or hint, so after a detour, keep solving from the board you now have and use the extra-move result to guide your next attempt.

Tapping, dragging and the number keys all make the same kind of move. An empty source peg or a larger disk placed on a smaller one is refused without adding a move, and the screen explains what to correct.

A round has a 90-second cap. Exceeding it, refreshing, switching away or quitting ends that attempt without a score; previously completed rounds stay available for comparison.

The first-visit practice board has three disks, a seven-move shortest route, no clock and no score, and you can skip it. A round opened from a shared link repeats the same starting position but does not replace your personal best.

FAQ

What is the Tower of Hanoi puzzle and how does it work?

The Tower of Hanoi is a three-peg puzzle in which you move one top disk at a time without ever placing a larger disk on a smaller one, until the full stack reaches the target peg. Édouard Lucas introduced it in 1883; the historical Tower of Brahma name refers to the legend used to present the same puzzle. This page uses four disks and varied starting positions that are each 15 moves from the goal.

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

The minimum number of Tower of Hanoi moves is 2^n − 1 when all n disks start on one peg, so four disks require 15 moves and five disks require 31. This page also uses varied four-disk openings, but every scored position was selected because its shortest route to the right-hand peg is exactly 15 moves.

How do you solve the Tower of Hanoi quickly?

The quickest Tower of Hanoi method is recursive: move the smaller stack to the spare peg, move the largest required disk toward the goal, then rebuild the smaller stack on top of it. Repeat the same three-part pattern for each smaller stack. On a varied opening, first identify which larger disk blocks the goal and where the disks above it must wait.

What is a good Tower of Hanoi score?

A good Tower of Hanoi score on this page is one close to 100.0 percent: 100.0 percent is the 15-move shortest route, while 93.8 to 83.3 percent means 16 to 18 moves and only one to three extra moves. These are route-efficiency bands, not player norms, so compare the percentage and extra moves with your own earlier completed rounds.

What does the Tower of Hanoi test measure?

This online Tower of Hanoi test measures only route efficiency for one four-disk round: it compares your move count with the fixed 15-move shortest route and reports planning time and solve time separately. It is a non-standardised adaptation, not a clinical test, and the result cannot diagnose planning ability, executive function or intelligence.

How do you practice the Tower of Hanoi effectively?

The most useful Tower of Hanoi practice is to repeat the recursive three-step pattern while tracking extra moves, because fewer extra moves show that your route—not your speed—has become more efficient under the same rules. First aim to finish consistently, then reduce detours toward 15 moves. Use solve time only when two rounds have the same move count.

This Tower of Hanoi test is for self-understanding and practice only, not a clinical or intelligence diagnostic tool. It is a non-standardised adaptation of a public-domain puzzle (Lucas, 1883); its scores cannot be used interchangeably with clinical assessment scores.

Last updated: 2026-10-07 · Scores stay on this device