Happy Number Checker

Test if a number is a happy number.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. 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?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators