Code tool

Digit Root Calculator

Enter an integer and number base to calculate its digit root exactly, including negative values and leading zeros.

In-browser processingNo account requiredPrivacy details ↗

A QUICK WALKTHROUGH

How to use this tool

  1. Enter an integer, optionally with a leading minus sign.
  2. Choose a base from 2 through 36.
  3. Calculate to see the normalized value, digit sum, and digit root.

Defined integer rules

The input is a signed integer written with ASCII digits 0–9 and letters A–Z (case-insensitive). Leading zeros do not change its value; a minus sign is accepted and the absolute value is used for the digit root.

Exact base arithmetic

Bases 2 through 36 are supported. Zero has digit root 0. For a nonzero value, the result is 1 + ((|n| − 1) mod (base − 1)), computed with BigInt so large integers remain exact.

GOOD TO KNOW

Common questions

What is the digit root of zero?

Zero has digit root 0.

Do negative numbers stay negative?

No. The digit root uses the absolute value, so −123 and 123 have the same result.

Do leading zeros matter?

No. They are accepted for readability and do not change the numeric value.