Since a new school year is upon us, I thought I'd share some interesting credit card facts so that you can get your math brain going.
A credit card number must be from 13 to 16 digits long. The last digit of the number is also known as the “check digit”. This number is calculated from the Luhn formula (a.k.a Modulus 10) from the other numbers.
Ready for more numbers?
Here is another algorithm used to determine the validity of a credit card.
As mentioned above, a credit card number has 13 to 16 digits. The first 6 digits of the the number is the Issuer Identification Number (IIN) or sometimes called Bank Identification Number are the first 6 digits of the credit card number. The IIN no only tells you what kind of credit card it is (e.g. Visa, MasterCard, etc.), it also contains issuing bank information. With an American Express card, you can even tell whether the card is a business or a personal card.
IIN can be used to prevent fraud. For example, IIN from foreign countries deserve a closer look, especially in light of other transactional information, such as billing/shipping/ IP address. Also, once you confirm a case of fraud, make sure to go back and look at similar transactions. We recently came across a case where a merchant saw suspicious orders around the same time all with cards with the same IIN.
Luhn formula
A credit card number must be from 13 to 16 digits long. The last digit of the number is also known as the “check digit”. This number is calculated from the Luhn formula (a.k.a Modulus 10) from the other numbers.
- Start with card number
- Drop the last number (check number)
- Double every other number in the string
- Sum all numbers
- Multiply by 9
- The last digit of the result is the check number
Ready for more numbers?
Credit Card Validity
Here is another algorithm used to determine the validity of a credit card.
- Take the credit card number
- Double every other digit from right to left starting from the second to last number (meaning, exclude the check digit)
- Sum up all the double digit numbers (i.e. 14 becomes 1+4) to make single digit numbers
- Add all the numbers up, including the unaffected numbers from the original
- If the result if divisible by 10, then the credit card number is valid
Beyond Validation
As mentioned above, a credit card number has 13 to 16 digits. The first 6 digits of the the number is the Issuer Identification Number (IIN) or sometimes called Bank Identification Number are the first 6 digits of the credit card number. The IIN no only tells you what kind of credit card it is (e.g. Visa, MasterCard, etc.), it also contains issuing bank information. With an American Express card, you can even tell whether the card is a business or a personal card.
Using IIN to Prevent Fraud
IIN can be used to prevent fraud. For example, IIN from foreign countries deserve a closer look, especially in light of other transactional information, such as billing/shipping/ IP address. Also, once you confirm a case of fraud, make sure to go back and look at similar transactions. We recently came across a case where a merchant saw suspicious orders around the same time all with cards with the same IIN.