What Is the Checksum on a Credit Card? | Sapling

What Is the Checksum on a Credit Card?

What Is the Checksum on a Credit Card?
Written By
Cam Merritt
Cam Merritt
Feb 23, 2011
3 minute read
...
The checksum on a credit card can help flag any errors that occur when typing in the number.

On a credit card, a checksum is a single digit in the account number that allows a computer, or anyone familiar with the formula involved, to determine whether the number is valid. The checksum can help identify credit card numbers that have been entered incorrectly -- or phony credit card numbers created by counterfeiters.

Checksum

A checksum is a value embedded within a set of data. The checksum gives you a quick way to determine whether errors have been introduced into that data set during storage or transmission. Think of it like a packing slip that comes with a large delivery. The way to make sure nothing has been lost during shipment is to check each item against the packing slip. When you're dealing with data, the way to make sure that the information has arrived intact is to check it against the checksum.

Check Digit

On credit cards, the checksum takes the form of a "check digit." In a typical 16-digit credit card number, the first six digits identify the institution that issued the card. The next nine digits identify the individual account associated with the card. The last digit, the 16th, is the check digit. Credit card issuers plug the first 15 digits into a mathematical formula called the Luhn algorithm, which produces a single-digit result. That result becomes the check digit.

Purposes

The main purpose of the check digit is to verify that a card number is valid. Say you're buying something online, and you type in your credit card number incorrectly by switching the places of two digits, perhaps the most common error. When the website looks at the number you've entered and applies the Luhn algorithm to the first 15 digits, the result won't match the 16th digit on the number you entered. The computer knows the number is invalid, and it knows the number will be rejected if it tries to submit the purchase for approval. So it asks you to re-enter the number. A secondary purpose of the check digit is to thwart clumsy attempts to create phony credit card numbers. A counterfeiter familiar with the Luhn algorithm, however, could get past this particular hurdle.

Advertisement

The Algorithm in Action

Verifying a 16-digit card number starts by taking the first 15 digits, which are the institution code and the individual account identifier. For example, in the card number 4578 4230 1376 9219, those digits would be:

4-5-7-8-4-2-3-0-1-3-7-6-9-2-1

Starting with the first digit, multiply every second digit by 2:

8-5-14-8-8-2-6-0-2-3-14-6-18-2-2

Every time you have a two-digit number, just add those digits together for a one-digit result:

8-5-5-8-8-2-6-0-2-3-5-6-9-2-2

Finally, add all the numbers together:

8 + 5 + 5 + 8 + 8 + 2 + 6 + 0 + 2 + 3 + 5 + 6 + 9 + 2 + 2 = 71

When this number is added to the check digit, then the result must be an even multiple of 10. In this case:

71 + 9 = 80

The number is therefore valid. If the algorithm doesn't produce a multiple of 10, then the card number cannot be valid.

Cam Merritt

Cam Merritt is a writer and editor specializing in business, personal finance and home design. He has contributed to USA Today, The Des Moines Register and Better Homes and Gardens"publications. Merritt has a journalism degree from Drake…

Sponsored
Sapling Logo

We demystify personal finance and make financial adulting easier. From student loans to credit and investing, all the money questions you were ever afraid to ask are right here.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.