Tower of Hanoi
Move the whole tower to another peg, one disc at a time, never placing a larger disc on a smaller one. Drag discs to solve it yourself with a live move counter, or press solve and watch the optimal recursive solution play out. The minimum is exactly 2ⁿ − 1 moves — the puzzle that makes exponential growth and recursive thinking tangible, and the reason the legend’s 64-disc tower would outlast the universe.
Runs 100% in your browser — simulations are computed locally on your device.
Read the full guide to this tool
Notes
- Recursive insight: move n − 1 discs aside, move the big one, move them back on top.
- Minimum moves double (plus one) with each extra disc: 1, 3, 7, 15, 31…
- At one move per second, 64 discs take about 585 billion years.
- Runs 100% in your browser — simulations are computed locally on your device.