Input a number to check if it's a Harshad number, or input a range to generate all Harshad numbers within it.
Harshad Number Check or Generate
Result
Result
What is a Harshad Number?
A Harshad number, also known as a Niven number, is an integer that is divisible by the sum of its digits. For example, the number \( 18 \) has a digit sum of \( 1 + 8 = 9 \). Since \( 18 \) is divisible by \( 9 \), it is a Harshad number.
How to Determine if a Number is a Harshad Number
Calculate the digit sum: Add up all the digits of the number.
Check divisibility: Verify if the original number is divisible by its digit sum. If it is divisible, the number is a Harshad number; otherwise, it is not.