← back to Mathematics

Tower of Hanoi 3D

Move a tower of 3–8 discs to another peg without ever putting a big disc on a smaller one. Shows the 2ⁿ−1 minimum and animates the recursive solution.

Learn recursion with the Tower of Hanoi

The rules are simple: move one disc at a time, only the top disc, and never a big disc onto a smaller one. To move n discs, first move n−1 discs to the spare peg, move the biggest disc, then move the n−1 discs back on top. Breaking a problem into a smaller copy of itself is called recursion, and it gives the minimum of 2ⁿ−1 moves. Your best move counts are saved on your device for each disc count.

tags: #tower of hanoi #recursion #logic puzzle #math for kids

How to install the app

This browser has not offered an automatic install button yet. Install it from the browser menu:

Android (Chrome)
Tap the ⋮ menu at the top right, then choose "Install app" or "Add to Home screen".
iPhone / iPad (Safari)
Tap the Share button (the square with an up arrow), then choose "Add to Home Screen". On iOS this only works in Safari.
Computer (Chrome / Edge)
Click the install icon (a monitor with a down arrow) at the right end of the address bar, or menu ⋮ → "Install Daily Apps".