ForHosting KIT · Math

Digital root calculator

9875 becomes 29, then 11, then 2: its digital root is 2, reached in 3 steps. Enter any non-negative whole number, even one with up to 1000 digits, and see the root, the step count and each sum. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
N
9,875
You get
Digital root
2
Additive persistence
3

The digital root of a non-negative integer is the single digit you obtain by repeatedly replacing the number with the sum of its decimal digits until only one digit remains. That process also defines additive persistence: the count of digit-sum steps required to reach a single digit. Both quantities appear in divisibility rules, checksum intuition, recreational number theory, and classroom exercises about congruence modulo nine. This calculator takes one non-negative integer, runs the iterative digit-sum algorithm deterministically, returns the digital root and the persistence count, and lists every intermediate step so you can verify the path by hand.

What digital root and additive persistence mean

Start with any non-negative integer written in base ten. Add its digits to produce a new non-negative integer that is strictly smaller whenever the original had more than one digit. Repeat until the result is a single digit in the range zero through nine.

That final digit is the digital root. The number of times you performed a full digit sum is the additive persistence. For example, nine thousand eight hundred seventy-five becomes twenty-nine, then eleven, then two: the digital root is two and the additive persistence is three.

Zero already is a single digit, so its digital root is zero and its persistence is zero. Single-digit inputs similarly need no steps. A deep reason the process is stable is modular arithmetic: for any positive n the digital root equals n modulo nine, except that multiples of nine map to nine rather than zero, while zero itself maps to zero.

That congruence explains classic divisibility tests by three and nine and is why two numbers with the same digital root share the same residue class modulo nine. Additive persistence is a separate complexity measure: how many iterations the digit-sum map needs before it stabilizes. Large strings of nines need more steps than sparse small digits, which makes persistence a useful teaching counterexample when students assume every digit function behaves like a single modular reduction.

How this calculator evaluates the repeated digit sum

The implementation first validates that n is present, finite, integral, and not negative. It then normalizes the value to a canonical digit string without deceptive leading zeros. While the current string has more than one character, the engine sums its digit codes, records a step with the previous value and the new digit sum, and continues from that sum written in decimal.

When a single digit remains, that digit is the digital root and the step count is the additive persistence. Independently, a modular closed form computed from the original digits confirms the same root, so a mismatch would surface as an internal consistency error rather than a silent wrong answer.

Practical use, limits, pricing, and delivery

Use the browser tool when you want an immediate digital root while studying divisibility, checking a contest problem, or explaining congruence modulo nine without installing a computer-algebra system. Accepted inputs are non-negative integers, including long digit strings up to one thousand digits so classroom examples and checksum demos are not forced into floating-point approximations. Results are fully deterministic: the same n always yields the same digital root, the same additive persistence, and the same ordered list of intermediate steps.

There is no language model, no external arithmetic service, and no randomness, so the capability is safe to pin in automated tests and reproducible notebooks.

Homework and contest verification

Students and graders can confirm digital roots and additive persistence for arbitrary non-negative integers and inspect every intermediate digit sum without a local CAS.

Divisibility and modular-arithmetic teaching

Lesson materials that introduce congruence modulo nine can show the digital root beside the iterative path so learners connect digit sums to residues.

What happens if n is negative?

Digital root is defined here for non-negative integers only; negatives are rejected and not charged.

What is additive persistence?

Additive persistence is the number of times you must replace a number by the sum of its digits until only one digit remains. Single-digit inputs have persistence zero.

Is the digital root calculator free?

The browser tool runs free on your device.

Does the digital root always match n modulo 9?

For positive n the digital root equals n mod 9, except multiples of nine map to nine instead of zero. Zero maps to zero. This calculator also returns the iterative steps so you can verify by hand.

What is the digital root of 9875?

It is 2. The digits of 9875 add up to 29, the digits of 29 add up to 11, and the digits of 11 add up to 2. That took 3 steps, so the additive persistence is 3.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/numth/digital-root

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/numth/digital-root \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n":9875}'
{
  "n": 9875
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "numth.digital_root",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_digits1000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

How this calculator evaluates the repeated digit sum

Call the capability with a field n holding a non-negative integer, either as a JSON number within the safe integer range or as a decimal digit string for longer values up to the published digit limit. Negative inputs, non-integers, missing n, and strings that exceed the maximum digit length fail with invalid_input and are not charged.

Practical use, limits, pricing, and delivery

Each successful request is one billable item at $0.002; failed validation does not consume balance. Wire the endpoint into number-theory demos, divisibility tutorials, recreational math pages, or integer preprocessing steps where you already trust exact digit arithmetic more than approximate heuristics or opaque black-box calculators.

Automated number-theory pipelines

Scripts that classify integers by digital root or measure additive persistence can call a single deterministic item-priced endpoint instead of embedding ad hoc digit loops.

How do I compute the digital root with this API?

Send a JSON body with non-negative integer field n to the numth.digital_root capability. The response returns digital_root, additive_persistence, and the ordered list of digit-sum steps.

Read the full KIT documentation →