Exploring Happy Numbers

Happy Number Engine

Here is the interactive that applies the Happy Numbers algorithm again in case you want it in your explorations.

Enter a whole number up to 999,999.

Click "Go!" to see your number and the next number. Keep clicking "Go!" to get more numbers.

Click "Reset" to start with a new number. (Or just type a new number in the box and click "Go!".)

Happy Steps Calculator

In this grid, the happy numbers are colored blue.

Happy numbers eventually reach 1 when you keep squaring the digits and adding them together, but how many steps does it take?

Use this calculator to find the steps it takes for a happy number to get to 1. Enter a happy number and click "Go!"

Click "Reset" to try a new number. Click "Clear" to clear the results area.


Happy Steps for a Range

To find the number of steps to get to 1 for a range of numbers, enter the low and high ends (between 1 and 999,999) of your range and click 'Go!'. You may also specify the minimum and/or maximum steps from 1 you wish to be reported (otherwise you may get lots and lots of results if you give a large range). The results will only display the happy numbers in the range you selected.

If there are a lot of results, they may take a few seconds to show up.

Click Reset to clear the current results and try new numbers.

Low High

Minimum steps reported

Maximum steps reported

Happy Steps Distribution Graph

To find the distribution of steps to get to 1 for happy numbers in a range, enter the low and high numbers and click "Go!"

Low High