Number Theory
Basic

Divisibility Rule for 9

A number is divisible by 9 if the sum of its digits is.

Formula

n divisible by 9  ⟺  digit sum divisible by 9n \text{ divisible by } 9 \iff \text{digit sum divisible by } 9

Variables

nInteger

Example

729: digit sum 7+2+9 = 18, divisible by 9, so 729 is too.

How it works

A number is divisible by 9 when its digits add up to a multiple of 9. This works because 10, 100, 1000, and so on leave a remainder of 1 when divided by 9, so each place value contributes the same as its digit modulo 9. As a result, the whole number and the sum of its digits have the same remainder when divided by 9.

When to use it

Use this rule when you want a quick check for whether a number is divisible by 9 without doing long division. It is especially useful in mental math, arithmetic checks, and simplifying number theory problems.

Worked example, step by step

Check whether 5,418 is divisible by 9. Step 1: Add the digits: 5 + 4 + 1 + 8 = 18. Step 2: Check whether 18 is divisible by 9. Step 3: 18 ÷ 9 = 2, so 18 is divisible by 9. Conclusion: 5,418 is divisible by 9.

Common mistakes to avoid

  • Adding the digits but forgetting to check whether the sum is itself a multiple of 9
  • Using the rule for 9 and expecting it to work the same way for every divisor
  • Stopping after one digit sum even when the result is still not obviously a multiple of 9

Did You Know?

The digit-sum test for 9 is the basis of "casting out nines", an ancient way to check arithmetic.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026