The Happy Number Calculator is a free online tool used to check if the number is a happy number or an unhappy number.
What is a happy number?
A happy number is a number that reaches 1 when the number is replaced by the sum of squares of each digit. If the answer doesn’t reach one and it starts looping with the same numbers, then the number is not a happy number. It is called a sad or unhappy number.
The sum of squares of all unhappy numbers will eventually enter a loop of 4 -> 16 -> 37 -> 58 -> 89 -> 145 -> 42 -> 20 -> 4.
To calculate a happy number, start by calculating the sum of squares of each digit of the number. This process is repeated until the result is 1. The algorithm will determine if the number is a happy number when the sum of squares of each digit results in 1. If it never reaches 1 or loops between numbers that have already appeared, then it is not a happy number.
For example, Is 5555 a happy number?
5555 -> 52 + 52 + 52 + 52 = 25 + 25 + 25 + 25 = 100
100 -> 12 + 02 + 02 = 1 + 0 + 0 = 1
So, 5555 is a happy number.
First 100 happy numbers
1 | 7 | 10 | 13 | 19 | 23 | 28 | 31 | 32 | 44 |
49 | 68 | 70 | 79 | 82 | 86 | 91 | 94 | 97 | 100 |
103 | 109 | 129 | 130 | 133 | 139 | 167 | 176 | 188 | 190 |
192 | 193 | 203 | 208 | 219 | 226 | 230 | 236 | 239 | 262 |
263 | 280 | 291 | 293 | 301 | 302 | 310 | 313 | 319 | 320 |
326 | 329 | 331 | 338 | 356 | 362 | 365 | 367 | 368 | 376 |
379 | 383 | 386 | 391 | 392 | 397 | 404 | 409 | 440 | 446 |
464 | 469 | 478 | 487 | 490 | 496 | 536 | 556 | 563 | 565 |
566 | 608 | 617 | 622 | 623 | 632 | 635 | 637 | 638 | 644 |
649 | 653 | 655 | 656 | 665 | 671 | 673 | 680 | 683 | 694 |
How to use the happy number calculator
The procedure to use the happy number calculator is as follows:
- Enter the positive number.
- Click Calculate button to verify whether the input number is a happy number or an unhappy number.
- Click the Reset button to start a new verification.
Solved examples using the happy number calculator
Example 1: Is 478 a happy number?
Enter 478 into the input box and click Calculate button, as shown in the figure, 478 is a happy number.
478 -> 42 + 72 + 82 = 16 + 49 + 64 = 129
129 -> 12 + 22 + 92 = 1 + 4 + 81 = 86
86 -> 82 + 62 = 64 + 36 = 100
100 -> 12 + 02 + 02 = 1 + 0 + 0 = 1
Example 2: Is 2023 a happy number?
Enter 2023 into the input box and click Calculate button, as shown in the figure, 2023 is an unhappy number.
2023 -> 22 + 02 + 22 + 32 = 4 + 0 + 4 + 9 = 17
17 -> 12 + 72 = 1 + 49 = 50
50 -> 52 + 02 = 25 + 0 = 25
25 -> 22 + 52 = 4 + 25 = 29
29 -> 22 + 92 = 4 + 81 = 85
85 -> 82 + 52 = 64 + 25 = 89
89 enters the cycle of unhappy numbers. So, 2023 is an unhappy number.
Latest calculators
Standard Form to Slope-Intercept Form Calculator
Slope Intercept Form Calculator
Slope Calculator: Calculate Slope, X-Intercept, Y-Intercept
Reciprocal of Complex Number Calculator
Conjugate Complex Number Calculator
Modulus of Complex Number Calculator
Profit Percentage Calculator: Calculate Your Profitability Easily
Attendance and Absence Percentage Calculator
Circular Segment Radius Calculator
Regular Polygon Side Length Calculator
Annulus Calculator for Width, Perimeter, and Area