This Harshad number calculator tells you whether any whole number you enter is a Harshad number, also known as a Niven number, meaning it divides evenly into the sum of its own digits. Harshad numbers matter in number theory and recreational maths because they sit at a simple but surprisingly rich intersection of a number's value and the way its digits are written, and testing for them is a common exercise in programming and divisibility practice. You enter a whole number, and the calculator works out the digit sum by adding each digit together, then checks whether the original number divides evenly by that digit sum. The result card tells you plainly whether the number is or is not a Harshad number, and shows the digit sum and, when the test passes, the quotient of the number divided by its digit sum. Every single digit number is automatically a Harshad number, since any number divides itself, but as numbers grow the property becomes less predictable, which is part of what makes them interesting to explore. Try entering numbers like 18, 21 or 100 to see the pattern for yourself, or test a number you already suspect is special. The name comes from the Sanskrit for joy giver, coined by the mathematician D. R. Kaprekar, and the same numbers are also called Niven numbers after Ivan Niven.
A number n is a Harshad number if it is divisible by the sum of its digits, that is, n divided by its digit sum leaves no remainder. The quotient is n divided by the digit sum.
18 has digit sum 1 + 8 = 9, and 18 divided by 9 is 2 with no remainder, so 18 is a Harshad number. Enter 18 to confirm.
A number divisible by the sum of its digits, such as 18, since 1 + 8 = 9 divides 18.
Every one digit number is, because a number always divides itself. Larger ones vary.
After Ivan Niven, who discussed them in a 1977 talk. Harshad is the older name from Kaprekar.
This calculator is for students, programmers and anyone exploring number theory.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland by SiteHost New Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-08-07 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.