Enter a positive integer to check if it is divisible by the sum of its digits
Enter Number
Result
Verdict
-
Digit Sum
-
n / Digit Sum
-
Detailed Derivation
Harshad Number Definition
n is Harshad if digit_sum(n) divides n
Also called Niven numbers (after Ivan Niven)
0 is trivially Harshad (0/0 undefined)
All base 10 repunits (11, 111...) are Harshad
Harshad numbers, also called Niven numbers, are integers divisible by the sum of their digits. The term Harshad comes from Sanskrit meaning joy-giver. They were named by Indian mathematician D. R. Kaprekar.
⚠Harshad property is base-dependent. A number may be Harshad in base 10 but not in base 8, and vice versa.
What Is a Harshad Number?
A Harshad number is an integer that is divisible by the sum of its digits in a given base. In base 10, these are also called Niven numbers after mathematician Ivan Niven. They are a fascinating class of numbers studied in recreational mathematics.
Definition
n mod digit_sum(n) = 0. 18: digit sum 9, 18/9=2 -> Harshad. 19: digit sum 10, 19/10=1.9 -> not Harshad.
Named By
D. R. Kaprekar coined the term Harshad (Sanskrit for joy-giver). Ivan Niven studied them independently, giving the alternative name Niven numbers.
All Single Digits
Numbers 1 through 9 are trivially Harshad (digit sum = itself, divides itself). 10 is also Harshad (digit sum 1 divides 10).
Champion Numbers
Numbers with high digit sums like 999 have digit sum 27. 999/27=37 -> Harshad. Large digit sums make it harder to be Harshad.
Teaching Example: Test 18. Digits: 1,8. Sum = 9. 18/9 = 2 (remainder 0). 18 is Harshad! Test 19: digits 1,9. Sum = 10. 19/10 = 1 with remainder 9. 19 is not Harshad. Try 20: digit sum 2, 20/2=10, Harshad!
A number divisible by the sum of its digits. 18: digit sum 9, 18/9=2 -> Harshad. Also called Niven numbers.
Is 10 a Harshad number?▼
Yes! Digit sum of 10 = 1+0 = 1. 10/1 = 10 with remainder 0. All powers of 10 (10, 100, 1000) are Harshad since digit sum is 1.
Who named Harshad numbers?▼
D. R. Kaprekar, an Indian mathematician, named them Harshad from Sanskrit meaning joy-giver. Ivan Niven later studied them independently.
Are all repunits Harshad?▼
Yes! 11: digit sum 2, 11/2=5.5? Wait no, 11/2=5 r1, so 11 is NOT Harshad. Actually, 111: digit sum 3, 111/3=37, so 111 IS Harshad. Not all repunits are Harshad.
Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.