Happy Number Finder
Check if repeatedly summing squared digits leads a number to 1.
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
A happy number is a positive integer that eventually reaches 1 when you repeatedly replace it with the sum of the squares of its digits. For example, 19 is happy: 1² + 9² = 82, 8² + 2² = 68, 6² + 8² = 100, 1² + 0² + 0² = 1. Numbers that never reach 1 fall into a fixed repeating loop instead (most commonly the cycle 4 → 16 → 37 → 58 → 89 → 145 → 42 → 20 → 4) and are called "unhappy."
Happy numbers are a classic topic in recreational mathematics and a common programming-practice exercise because detecting the cycle requires either memorizing the known unhappy loop or using a cycle-detection technique like Floyd's algorithm (the same "tortoise and hare" method used to detect loops in linked lists). They show up in coding-interview prep and math-education contexts far more than in any applied field, which is part of their appeal — a simple rule with a surprisingly structured pattern underneath.
This calculator repeats the digit-square-sum process on any number you enter and shows every step until it lands on 1 (happy) or falls into the repeating loop (not happy).
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)