Skip to content
ADVERTISEMENT
Sign In
  • Sections
    • News
    • Advice
    • The Review
  • Topics
    • Data
    • Diversity, Equity, & Inclusion
    • Finance & Operations
    • International
    • Leadership & Governance
    • Teaching & Learning
    • Scholarship & Research
    • Student Success
    • Technology
    • Transitions
    • The Workplace
  • Magazine
    • Current Issue
    • Special Issues
    • Podcast: College Matters from The Chronicle
  • Newsletters
  • Events
    • Virtual Events
    • Chronicle On-The-Road
    • Professional Development
  • Ask Chron
  • Store
    • Featured Products
    • Reports
    • Data
    • Collections
    • Back Issues
  • Jobs
    • Find a Job
    • Post a Job
    • Professional Development
    • Career Resources
    • Virtual Career Fair
  • More
  • Sections
    • News
    • Advice
    • The Review
  • Topics
    • Data
    • Diversity, Equity, & Inclusion
    • Finance & Operations
    • International
    • Leadership & Governance
    • Teaching & Learning
    • Scholarship & Research
    • Student Success
    • Technology
    • Transitions
    • The Workplace
  • Magazine
    • Current Issue
    • Special Issues
    • Podcast: College Matters from The Chronicle
  • Newsletters
  • Events
    • Virtual Events
    • Chronicle On-The-Road
    • Professional Development
  • Ask Chron
  • Store
    • Featured Products
    • Reports
    • Data
    • Collections
    • Back Issues
  • Jobs
    • Find a Job
    • Post a Job
    • Professional Development
    • Career Resources
    • Virtual Career Fair
    Upcoming Events:
    College Advising
    Serving Higher Ed
    Chronicle Festival 2025
Sign In
casting out 100

Casting Out Nines

Where math, technology, and education cross.

The Chronicle Blog Network, a digital salon sponsored by The Chronicle of Higher Education, features leading bloggers from all corners of academe. Content is not edited, solicited, or necessarily endorsed by The Chronicle.

Math Monday: What is casting out nines?

By Robert Talbert September 19, 2011
http://www.flickr.com/photos/artnoose/
http://www.flickr.com/photos/artnoose/

Last week in this post, I asked for requests for math topics you’d like to read about. One person wrote in and asked:

To continue reading for FREE, please sign in.

Sign In

Or subscribe now to read with unlimited access for as low as $10/month.

Don’t have an account? Sign up now.

A free account provides you access to a limited number of free articles each month, plus newsletters, job postings, salary data, and exclusive store discounts.

Sign Up

http://www.flickr.com/photos/artnoose/
http://www.flickr.com/photos/artnoose/

Last week in this post, I asked for requests for math topics you’d like to read about. One person wrote in and asked:

Why don’t you enlighten us about the name “Casting Out Nines?” I learned a system in grade school with the same name --it was a way of checking multiplication and long division answers. Long before calculators.

A review please?

OK then. Casting out nines is an old-fashioned method of checking for errors in basic arithmetic problems (addition and subtraction too, not just multiplication and division). Here’s how it works, using addition as an example.

Let’s suppose I’m trying to add 32189 to 87011. I get a sum of 119200. But did I make a mistake? Do the following to check:

  1. Take the first number, 32189, and remove -- “cast out” -- any 9’s in the number and any group of numbers that adds up to 9. So, here, cast out the 9 and the pair consisting of 8 and 1. The leftover digits are 3 and 2; add those together: 3+2 = 5.
  2. Do the same for the second number. For 87011, cast out the 8 and one of the 1’s (because they add up to 9). Adding the leftover digits, we get 7 + 0 + 1 = 8.
  3. Now add the two sums from steps 1 and 2 together: 5 + 8 = 13. If the sum is bigger than 9, like it is here, subtract 9 from it until you get something between 0 and 8. Here, we’d subtract once: 13 - 9 = 4.
  4. Finally, go to the sum I first calculated -- 119200 -- and cast out any nines. In this case, cast out the one 9 you see. Then add up the remaining digits: 1 + 1 + 2 + 0 + 0 = 4.

The result from step 3 should equal the result from step 4. In this case, it does. Had I obtained a different number in step 3 than I did in step 4, it would tell me I had made an error in my original adding. For example, let’s suppose made the mistake of adding the ten-thousands digits incorrectly, getting 3 + 8 = 12 and an answer of 129200 instead of 119200. Casting out the nine and adding the remaining digits would give 1 + 2 + 2 + 0 + 0 = 5, which is different than the 4 I got in step 3 -- and casting out nines detects that an error has been made.

ADVERTISEMENT

This method works also for addition, multiplication, and division (therefore you can use it for checking decimal arithmetic, not just integer) and is apparently as old as the hills. Even so, many of today’s modern check-digit systems for verifying numerical data, such as credit card numbers or UPC symbols, are based on techniques not far removed from casting out nines.

Casting out nines does have limitations. It can give false positives in some circumstances. For instance, if in the example above, I had forgotten to carry the “1" when adding the units digits of those two five-digit numbers, I would have gotten a wrong answer of 119290. But when you cast out the two nines and add the digits, you end up with 1 + 1 + 2 + 0 = 4 which agrees with the sum of the leftovers in step 3. So step 3 equalling step 4 does not mean you did your arithmetic right. Casting out nines also fails to detect digit transpositions -- if you accidentally wrote the sum down as 112900 instead of 119200, you’d still end up with a “4" in step 4, and casting out nines would miss the error.

So, why does this method work? It’s based on the fact that given an integer, both the integer and the sum of its digits always have the same remainder when divided by 9. This is easy to see if you look at a generic integer \( N\) of a fixed size, say three digits. Such an integer can be written as

$$N = 1000d_3 + 100d_2 + 10d_1 + d_0$$

where \( d_3, d_2, d_1 \), and \( d_0 \) are integers between 0 and 9 (and \( d_3 \) does not equal 0). Just split off one term of \( d_3, d_2\), and \(d_1\) and rewrite:

$$N = 999d_3 + 99d_2 + 9d_1 + (d_3 + d_2 + d_1 + d_0)$$

ADVERTISEMENT

If you divide both sides of this equation by 9, you will get the same remainder on the left as you do on the right because the \(999d_3 + 99d_2 + 9d_1\) is divided evenly by 9. Nothing really changes if you use a larger integer -- you would just have more terms of 9’s on the right side of the equation above and additional digits.

In more technical language, we’d say that \(N\) and its digit sum are congruent modulo 9. If we are adding two integers \(N\) and \(M\), then the digit sum of \(N+M\) is congruent modulo 9 to the sum of the digit sum of \(N \) and the digit sum of \(M\). If you make a mistake in calculating \(N+M\), this is likely to trickle down to its residue mod 9 and be detected. (But not always.)

So I called my blog “Casting Out Nines” primarily because I thought the phrase had a cool, math-y ring to it. (There’s an algebra pun there for those who know where to look.) But I also liked the blog being associated with a method of error detection, because I feel like my blogging in some ways is a form of detecting (and hopefully correcting) errors in my own work and in the world at large. And I like the fact that casting out nines has its roots (see? another math pun) in algebra and number theory, two disciplines that are close to my heart; and yet it’s also simple enough for a child. That’s also something that I aspire to in my teaching and blogging.

Thanks for the question! Please put any more requests, corrections, expansions, etc. in the comments.

We welcome your thoughts and questions about this article. Please email the editors or submit a letter for publication.
Share
  • Twitter
  • LinkedIn
  • Facebook
  • Email
About the Author
Robert Talbert
Robert Talbert is a mathematician and educator with interests in cryptology, computer science, and STEM education. He is affiliated with the mathematics department at Grand Valley State University.
ADVERTISEMENT
ADVERTISEMENT

More News

Vector illustration of large open scissors  with several workers in seats dangling by white lines
Iced Out
Duke Administrators Accused of Bypassing Shared-Governance Process in Offering Buyouts
Illustration showing money being funnelled into the top of a microscope.
'A New Era'
Higher-Ed Associations Pitch an Alternative to Trump’s Cap on Research Funding
Illustration showing classical columns of various heights, each turning into a stack of coins
Endowment funds
The Nation’s Wealthiest Small Colleges Just Won a Big Tax Exemption
WASHINGTON, DISTICT OF COLUMBIA, UNITED STATES - 2025/04/14: A Pro-Palestinian demonstrator holding a sign with Release Mahmud Khalil written on it, stands in front of the ICE building while joining in a protest. Pro-Palestinian demonstrators rally in front of the ICE building, demanding freedom for Mahmoud Khalil and all those targeted for speaking out against genocide in Palestine. Protesters demand an end to U.S. complicity and solidarity with the resistance in Gaza. (Photo by Probal Rashid/LightRocket via Getty Images)
Campus Activism
An Anonymous Group’s List of Purported Critics of Israel Helped Steer a U.S. Crackdown on Student Activists

From The Review

John T. Scopes as he stood before the judges stand and was sentenced, July 2025.
The Review | Essay
100 Years Ago, the Scopes Monkey Trial Discovered Academic Freedom
By John K. Wilson
Vector illustration of a suited man with a pair of scissors for a tie and an American flag button on his lapel.
The Review | Opinion
A Damaging Endowment Tax Crosses the Finish Line
By Phillip Levine
University of Virginia President Jim Ryan keeps his emotions in check during a news conference, Monday, Nov. 14, 2022 in Charlottesville. Va. Authorities say three people have been killed and two others were wounded in a shooting at the University of Virginia and a student is in custody. (AP Photo/Steve Helber)
The Review | Opinion
Jim Ryan’s Resignation Is a Warning
By Robert Zaretsky

Upcoming Events

07-31-Turbulent-Workday_assets v2_Plain.png
Keeping Your Institution Moving Forward in Turbulent Times
Ascendium_Housing_Plain.png
What It Really Takes to Serve Students’ Basic Needs: Housing
Lead With Insight
  • Explore Content
    • Latest News
    • Newsletters
    • Letters
    • Free Reports and Guides
    • Professional Development
    • Events
    • Chronicle Store
    • Chronicle Intelligence
    • Jobs in Higher Education
    • Post a Job
  • Know The Chronicle
    • About Us
    • Vision, Mission, Values
    • DEI at The Chronicle
    • Write for Us
    • Work at The Chronicle
    • Our Reporting Process
    • Advertise With Us
    • Brand Studio
    • Accessibility Statement
  • Account and Access
    • Manage Your Account
    • Manage Newsletters
    • Individual Subscriptions
    • Group and Institutional Access
    • Subscription & Account FAQ
  • Get Support
    • Contact Us
    • Reprints & Permissions
    • User Agreement
    • Terms and Conditions
    • Privacy Policy
    • California Privacy Policy
    • Do Not Sell My Personal Information
1255 23rd Street, N.W. Washington, D.C. 20037
© 2025 The Chronicle of Higher Education
The Chronicle of Higher Education is academe’s most trusted resource for independent journalism, career development, and forward-looking intelligence. Our readers lead, teach, learn, and innovate with insights from The Chronicle.
Follow Us
  • twitter
  • instagram
  • youtube
  • facebook
  • linkedin