1. MII Number - The First Digit
The major credit card numbers are comprised of 15 or 16-digit numbers, of which the first digit represents the Major Industry Identifier (MII). The last digit is the checksum digit that confirms to the Luhn algorithm (see below). Most popular MII identifiers are:
MII |
Brand Name |
Length |
Notes |
3 |
American Express |
15 |
Starts with 34 or 37 |
3 |
Diners Club |
14 |
Starts with 36 or 38 |
4 |
Visa Card |
16 |
|
5 |
Master Card |
16 |
|
6 |
Discover Card |
16 |
Starts with 65, 644, 6011 |
5,6 |
Maestro Card |
16-19 |
Starts with 50, 56, 58, 63, 67 |
2. IIN/BIN Number - The First 6-digits
The first 6-digit numbers including the MII is known as the Issuer Identification Number (IIN), formally known as the Bank Identification Number (BIN). The IIN tells us which credit card company issued the card, and what network it belongs to. For example, the credit card number starting with the 414720 represents JP Morgan Chase cards.
3. Account Number - The Next Digits before Final Digit
The next several digits before the final digit is known as the individual's account number.
4. Checksum - The Last Digit
The last digit is made up from the Luhn algorithm, and it represents the checksum of all digits. A card complying to Luhn check is the valid credit card number whethere it is actually issued by a card issuer or not.
Luhn algorithm is the modulus 10 formula used to validate a variety of identification numbers such as credit card and IMEI numbers.
The right-most digit is used as the checksum digit, and the rest of the numbers represent the payload. Based on the position of
the each digit, every 2nd digit from the right-most payload are doubled, and each digit (or doubled) are summed up make up the total. The total is then modulated to create the checksum digit. The payload and the checksum digit make up the credit card number.
To learn more about Luhn Algorithm, please refer Wikipedia page.