|*||First, cross out all 9's and digits that total 9 in each addend (italicized).|
|†||Add up leftover digits for each addend until one digit is reached.|
|‡||These new values are called excesses.|
|**||Do to the excesses what you did to the addends, coming to a single digit.|
|Now follow the same procedure with the sum, coming to a single digit.|
|††||The excess from the sum should equal the final excess from the addends.|
*2 and 4 add up to 6.
†There are no digits left.
‡2, 4, and 6 make 12; 1 and 2 make 3.
**2 and 0 are 2.
††7, 3, and 1 make 11; 1 and 1 add up to 2.
|First, cross out all 9's and digits that total 9 in both minuend and subtrahend (italicized).|
|Add up leftover digits for each value until one digit is reached.|
|Now follow the same procedure with the difference, coming to a single digit.|
|Because subtracting 2 from zero gives a negative number, borrow a 9 from the minuend.|
|The difference between the minuend and the subtrahend excesses should equal the difference excess.|
|First, cross out all 9's and digits that total 9 in each factor (italicized).|
|Add up leftover digits for each multiplicand until one digit is reached.|
|Multiply the two excesses, and then add until one digit is reached.|
|Do the same with the product, crossing out 9's and getting one digit.|
|*||The excess from the product should equal the final excess from the factors.|
*8 times 8 is 64; 6 and 4 are 10; 1 and 0 are 1
|Cross out all 9's and digits that total 9 in the divisor, quotient, and remainder.|
|Add up all uncrossed digits from each value to a single digits.|
|Multiply the divisor and quotient excesses, and add the remainder excess.|
|Do the same with the dividend, crossing out 9's and getting one digit.|
|(Nines are italicized).|
|The dividend excess should equal the final excess from the other values.|
Formally, casting out nines is a valid method of checking equations because of a property of modular arithmetic. Specifically, if x and x' (respectively, y and y') have the same remainder modulo 9, then so do x + y and x' + y', x − y and x' − y' and x × y and x' × y'.
For an equation utilizing only integers to be correct, the following must be true: the sum of the digits of the decimal writing of an integer has the same remainder, modulo 9, as this integer. Because of this, one can add all digits in the original number to obtain another number, and so on repeatedly until one gets a 1-digit number, which is necessarily equal to the original number. Also, nines can be tossed out before this, because 9 is equal to 0 modulo 9.
In a correct equation, one side equals the other. If the equation was correct before, performing the above operation on both sides preserves correctness. However, it is possible that two previously unequal integers will be identical modulo 9 (on average, a ninth of the time).
One should note that the operation does not work on fractions, since a given fractional number does not have a unique representation.