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.

Did You Know?

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