Narcissistic Number Checker

Check if a number equals the sum of its digits raised to the digit count.

Result

Yes
370

How it is calculated

The tool takes the number you typed as a string of whole digits and counts them: len. It then adds up each digit raised to the power of that count, sum = d₁^len + d₂^len + … + d_len^len. If sum equals the number, the answer is Yes, otherwise No. The sum is always shown, so a near miss is visible: 154 gives 190. The input must be a whole number: a decimal such as 153.4 and any negative number give no result, as does a number above 9,007,199,254,740,992 (2⁵³). Zero and every single-digit number pass, because a digit to the power of 1 is itself. The check works in base 10 only.

Worked example

Check 370. It has 3 digits, so every digit is cubed: 3³ = 27, 7³ = 343 and 0³ = 0. Add them: 27 + 343 + 0 = 370. The digit power sum equals the number itself, so the answer is Yes: 370 is a narcissistic number. Try 371 as a neighbour: 27 + 343 + 1 = 371, which also matches, whereas 372 gives 27 + 343 + 8 = 378 and fails.

Try this example →

Common mistakes

  • Using the wrong power. The exponent is the number of digits of the number, not always 3. For 9474 it is 4: 9⁴ + 4⁴ + 7⁴ + 4⁴ = 9474.
  • Typing a decimal such as 153.4 and expecting a verdict. Only whole numbers are tested, so a fractional value gives no result.
  • Entering a negative number such as -153. The tool gives no result for negatives instead of testing the digits.
  • Believing a digit sum that is close to the number counts. Only an exact match passes: 154 produces 190, which is not 154.
  • Forgetting that single digits are narcissistic. 0 to 9 all return Yes, because each equals itself to the first power.

About this calculator

A narcissistic number (also called an Armstrong number or plus perfect number) is a number that equals the sum of its own digits, each raised to the power of the digit count. For example, 153 has 3 digits, and 1³ + 5³ + 3³ = 1 + 125 + 27 = 153 — the number is rebuilt entirely from its own digits. Single-digit numbers (0-9) are trivially narcissistic since any digit to the power of 1 is itself, and beyond those the next examples are 153, 370, 371 and 407 in base 10.

These numbers are a classic topic in recreational mathematics and a favorite first coding exercise, since checking one requires nothing more than splitting a number into digits, raising each to a power and summing — a nice loop-and-modulo exercise for students learning any programming language. They have no deep number-theoretic significance but are popular in math clubs, puzzle sites and programming interview practice.

This calculator takes any whole number, breaks it into its digits, raises each to the power of the digit count, sums them, and tells you instantly whether it's a narcissistic number.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators