Harshad (Niven) Number Checker

Enter a positive integer to test the Harshad property and see the digit sum.

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

A Harshad number — also called a Niven number — is a positive integer that is evenly divisible by the sum of its own digits. For example, 18 has digit sum 1+8=9, and 18÷9=2 with no remainder, so 18 qualifies. The name comes from Sanskrit, roughly ‘great joy,’ coined by the mathematician D. R. Kaprekar; ‘Niven number’ honors Ivan Niven, who wrote about the same property. Every number from 1 to 9 is trivially a Harshad number since a single digit always divides itself.

Harshad numbers are a staple of recreational number theory: they show up in puzzle collections, programming katas that ask you to test divisibility rules, and sequences studied on OEIS. Runs of consecutive Harshad numbers get rarer as numbers grow, which makes finding long unbroken chains an interesting computational challenge, and some coding exercises use Harshad-style digit-sum checks as a simple divisibility filter before more expensive primality or factoring tests.

Enter any positive integer and the calculator computes its digit sum and reports immediately whether it divides evenly, telling you whether the number has the Harshad property.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators