What is an Armstrong number?
An Armstrong number is a number that equals the sum of its own digits, each raised to the power of the number of digits. The classic example is 153: it has three digits, and 1 cubed plus 5 cubed plus 3 cubed is 1 plus 125 plus 27, which is exactly 153. This page gives you that answer in a second, with the working shown beside the result, and everything runs entirely in your browser with no sign-up and no data sent anywhere.
Armstrong numbers are a favourite puzzle in school maths and in programming courses, where checking one is a classic exercise in loops and powers. They are also called narcissistic numbers, because the number is, in a sense, in love with its own digits. Students meet it in school maths, programmers meet it in code, and shopkeepers and clerks meet it whenever a total has to be split fairly or checked by hand.
The results box shows the answer first, in large type, and then the supporting numbers underneath it, so you can see both the headline and the working at a glance. Change any input and the answer updates at once, which makes it easy to test a few values and build a feel for how the numbers behave.
How an Armstrong number is tested
The checker counts the digits, raises each digit to that power, and adds the results. For the default example, 153, there are three digits, so the cubes are 1, 125, and 27, and their sum is 153, which matches the number, so the answer is yes. The full working is shown, so you can follow every step.
The rule is that a number with n digits is Armstrong when the sum of each digit raised to the power n equals the number. For 153, n is 3, so the sum is 1 cubed plus 5 cubed plus 3 cubed, which is 1 plus 125 plus 27, which is 153. The power changes with the digit count, which is the part people most often forget.
Single-digit numbers are all Armstrong numbers, because a one-digit number raised to the power of 1 is itself: 5 to the power of 1 is 5. Zero counts too, since 0 to the power of 1 is 0. The interesting cases start at three digits, where the test actually has something to prove.
A quick mental check is to estimate the size of the sum before adding it. Three digits can give at most 9 cubed three times, which is 729 times 3, or 2,187, so any three-digit Armstrong number must be below that, and a number like 100, whose sum is only 1, fails at a glance.
The digit count sets the power
The digit count is the input people get wrong, because the power is not always 3. A three-digit number uses cubes, but a four-digit number uses fourth powers, so 9474 is tested with 9 to the power of 4 plus 4 to the power of 4 plus 7 to the power of 4 plus 4 to the power of 4, which is 9,474. Using cubes for a four-digit number gives a wrong answer every time.
Compare 153 with 9474 to see the power change. For 153, the cubes add to 153; for 9474, the fourth powers are 6,561, 256, 2,401, and 256, which add to 9,474. The method is the same, but the power follows the digit count, and the checker handles that automatically.
The safe habit is to read the input back before trusting the output: check the digits, check the sign, and check that you have not swapped the two numbers round. A calculator only repeats the question you actually asked it, so a careful ten seconds on the input saves a wrong answer later.
A worked example: 153, 100, and 9474
First, the default example: 153. It has three digits, so cube each one: 1 cubed is 1, 5 cubed is 125, and 3 cubed is 27. Add them, 1 plus 125 plus 27, and you get 153, which equals the number, so 153 is an Armstrong number.
Second, 100. It has three digits, so cube each one: 1 cubed is 1, 0 cubed is 0, and 0 cubed is 0. Add them and you get 1, which is nowhere near 100, so 100 is not an Armstrong number. The zeroes add nothing, which is why 100 fails so badly.
Third, 9474. It has four digits, so raise each to the fourth power: 9 to the fourth is 6,561, 4 to the fourth is 256, 7 to the fourth is 2,401, and 4 to the fourth is 256. Add them, 6,561 plus 256 plus 2,401 plus 256, and you get 9,474, so 9474 is an Armstrong number.
The pattern is that Armstrong numbers are rare and the test is strict: every digit must contribute, and the total must match exactly. Below 10,000 there are only a handful, and the gaps between them grow as the numbers get bigger.
Where Armstrong numbers turn up
Armstrong numbers turn up in programming courses more than anywhere else, because writing a checker for them practises digit extraction, loops, and powers in one short program. They are a standard interview exercise and a standard homework task, and this checker is the answer key for both.
In school maths, Armstrong numbers make powers concrete: cubing 5 to get 125 is no longer abstract when it is part of a test that 153 passes. An exponent calculator and a power calculator do the single-digit powers that this checker combines, and students often use all three together. A prime number checker and a exponent calculator sit next to this kind of work in most maths toolboxes, and people often use two or three of them together on the same problem.
The name comes from Michael F. Armstrong, who used them as a teaching example, and the alternative name, narcissistic number, comes from the idea that the number admires its own digits. Whatever the name, the maths is the same, and the test takes seconds.
Try a few values yourself once you have read the worked examples, changing one input at a time and watching how the answer moves, then check one result by hand with the method above before you trust the screen. That habit, one hand check for every new kind of problem, is what turns a quick answer into real understanding, and it catches the typing slips that no calculator can catch for you.
Armstrong checker vs a prime number checker
An Armstrong checker looks at the digits of a number and raises them to powers, while a prime number checker looks at what divides the number. The two tests share nothing except the input: a number can be Armstrong and composite, or prime and not Armstrong, and the two ideas are independent. A power calculator answers a different question, so the two tools complement each other rather than competing.
Use this checker when the question is about digits and powers, for a puzzle, a program, or a homework problem. Use a prime checker when the question is about factors and divisibility. If a question mentions digits, it is almost certainly an Armstrong question; if it mentions factors, it is a prime question.
Armstrong numbers pair naturally with powers and roots, since the whole test is built from them, and a square root or an exponent tool is the natural companion when the working needs checking by hand. A square root calculator is another tool people reach for on the same kind of problem, and keeping the three together covers most everyday cases.
Common Armstrong number mistakes
The most common mistake is always cubing the digits, whatever the length of the number. Cubes are only right for three-digit numbers; a four-digit number needs fourth powers, and a two-digit number needs squares. The power is the digit count, every time, with no exceptions.
The second mistake is forgetting a digit, usually a zero. Zero contributes 0 to the sum, so it is tempting to skip it, but the digit count still includes it: 100 has three digits, so the power is 3, even though two of the digits add nothing.
The third mistake is adding the digits first and then raising the total to a power. The test raises each digit separately and then adds the results, so 1 cubed plus 5 cubed plus 3 cubed is 153, while 1 plus 5 plus 3, cubed, is 729, a different number entirely.
The fourth mistake is calling every number with a matching digit sum Armstrong. The sum must match the number exactly, digit for digit, and a sum of 152 for the number 153 is a failure, not a near miss. Armstrong numbers are exact or they are nothing.
How to use this Armstrong number checker
Type any whole number in the box and read the answer at once: yes or no, with the full digit-power sum underneath. The result updates live as you type, so try 153, 370, 371, and 407 to see all four three-digit Armstrong numbers pass.
Read the headline answer first, then the working underneath it, which shows each digit raised to the power of the digit count and the total. If the total equals your number, it is Armstrong; if it does not, the working shows exactly how far short it fell.
If an answer surprises you, check the input first, then run the worked example from this page through the calculator and confirm it gives the same result. When the known example is right and your own input is right, the answer is right, and that two-step check settles almost every disagreement between a person and a calculator.
Nothing you type leaves your device, so you can use the armstrong number checker as often as you like, for homework, for work, or just to settle an argument. Bookmark the page and it is ready whenever the next number needs checking.