Happy Number Checker
Test if a number is a happy number.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- Use the Share button to copy a link to your result.
About this calculator
This tool checks whether a number is a happy number: repeatedly replace the number with the sum of the squares of its digits, and if the process eventually reaches 1, the number is happy (e.g. 19 → 1²+9²=82 → 8²+2²=68 → 6²+8²=100 → 1²+0²+0²=1). Numbers that instead fall into the repeating cycle 4→16→37→58→89→145→42→20→4 are called "unhappy" or "sad."
Programmers use this classic exercise to practice loops, digit manipulation, and cycle detection in coding interviews and algorithm courses, and recreational-math enthusiasts explore happy numbers as a light introduction to number theory. Enter any positive integer to see whether it's happy and the sequence it follows.
Was this helpful?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)