Digit Sum Calculator

This calculator adds up the individual digits of any whole number and works out its digital root, the single digit you reach by repeatedly summing the digits until only one remains. Type a whole number into the input box and it instantly returns three results: the digit sum itself, shown as the main figure, the digital root, and the total number of digits you entered. For example, entering 12345 gives a digit sum of 15 (1 + 2 + 3 + 4 + 5), a digital root of 6 (from 1 + 5), and a digit count of 5. Behind the scenes it uses the exact integer algorithm rather than an approximation, and the digital root follows the neat shortcut of 1 plus the remainder when the number minus 1 is divided by nine. Digit sums have genuine practical uses beyond curiosity: they underpin the quick mental test for divisibility by 9, since a number splits evenly by 9 only when its digit sum does too, and they turn up in checksum routines used to catch data entry errors. Students, programmers and anyone exploring number theory use this tool to check working by hand, verify code, or simply satisfy curiosity about a number's properties. Just enter a whole number and read the results, which update live as you type.

Advertisement
Digit sum = 15
Digital root6
Number of digits5

The formula

The digit sum adds each digit once. The digital root is found by repeating that until one digit remains, and equals 1 + (n minus 1) mod 9 for any positive n, or 0 when n is 0.

Worked example

For 12345 the digits add to 1 + 2 + 3 + 4 + 5 = 15, and summing again gives 1 + 5 = 6, the digital root. The number has 5 digits. Enter 12345 to confirm.

Frequently asked questions

What is a digit sum?

The total you get by adding all the digits of a number, for example 1 + 2 + 3 = 6 for 123.

What is the digital root?

The single digit reached by repeatedly summing the digits. For 12345 it is 6.

How does this check divisibility by 9?

A number is divisible by 9 exactly when its digit sum is, which is why the digital root of a multiple of 9 is 9.

Who this calculator is for

This calculator is for students, programmers and anyone exploring number theory.

What this calculator assumes

  • You enter a whole number within the stated range.
  • The exact integer algorithm is used.
  • Very large results are shown grouped for readability.

Formula and sources

Related calculators

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-15 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.