Credit card numbers have 13 to 19 digits, depending on the card type
Most credit cards in the United States have 16 digits. Visa, Mastercard, and Discover cards all use 16-digit numbers. American Express cards are different — they have 15 digits. Some specialty cards, business cards, or older card formats may have 13, 14, or up to 19 digits, but these are less common.
The digits are not random. They follow a structure called the Luhn algorithm, which is a mathematical formula that banks use to check whether a card number is valid. The first digit or first few digits identify the card issuer — Visa numbers start with 4, Mastercard with 5, American Express with 3, and Discover with 6. The remaining digits encode information about your account and include a check digit that catches typos.
When you enter your card number online or in person, the merchant's system runs it through the Luhn check automatically. If the number fails the check, the system rejects it before it even reaches the bank. This catches most accidental mistyping but does not verify that the card is real or that you own it.
Key Takeaways
- Visa, Mastercard, and Discover cards have 16 digits; American Express has 15 digits.
- The first digit identifies the card network, so you can tell what type of card it is by looking at the first number alone.
- Card numbers follow the Luhn algorithm, a mathematical check that catches typos but does not verify ownership.
- Specialty, business, or international cards may have 13, 14, or 19 digits, though these are uncommon in everyday use.
Why card numbers are different lengths
American Express chose 15 digits when it designed its card system decades ago, and it has kept that standard. Visa, Mastercard, and Discover all settled on 16 digits. The difference is historical — there was no universal standard, so each network made its own choice and stuck with it.
The length matters because payment systems need to know which network they are dealing with before they process the transaction. A 15-digit number tells the system when ready that it is an American Express card. A 16-digit number starting with 4 is a Visa. This routing happens in milliseconds and is one reason why entering the wrong card type can cause a transaction to fail even if the number itself is valid.
Older card formats and some specialty cards use 13 or 14 digits. Diners Club cards, for example, have 14 digits. Some business or corporate cards may also vary. International cards issued outside the United States occasionally use 19 digits, though this is rare for cards used domestically.
How the digits break down
A 16-digit Visa card breaks into sections, though the sections are not separated by spaces or dashes on the physical card:
- First digit: The card network identifier (4 for Visa, 5 for Mastercard, 3 for American Express, 6 for Discover).
- Digits 2–6: The issuing bank's identifier. This tells the payment network which bank issued the card.
- Digits 7–15: Your account number. This is unique to you and links the card to your bank account or credit line.
- Digit 16: The check digit. This is calculated from all the other digits using the Luhn algorithm and is used to catch errors.
American Express uses a slightly different structure because it has only 15 digits, but the principle is the same: the first digit identifies the network, the next digits identify the issuer and your account, and the last digit is a check digit.
The account number section (digits 7–15 on a Visa) is where your bank encodes information about which specific account the card is tied to. Two cards from the same bank will have different numbers in this section because they belong to different customers or different accounts.
What the Luhn algorithm does
The Luhn algorithm is a checksum formula — a way to verify that a number has not been altered or mistyped. It works by performing a series of mathematical operations on the first 15 digits of a 16-digit card, and the result should match the 16th digit (the check digit).
When you type your card number into a payment form, the merchant's system runs the Luhn check before sending the number anywhere. If you mistype a digit, the check fails and the system tells you the number is invalid. This happens when ready and saves time because the transaction never reaches the bank if the number is obviously wrong.
The Luhn check does not verify that the card is real, that you own it, or that you have money in the account. It only confirms that the number follows the correct mathematical pattern. A number can pass the Luhn check and still be declined if the card is expired, the account is closed, or the transaction exceeds your credit limit.
Why you should not share your full card number
Your card number is sensitive information. Anyone who has it can attempt to use it for online purchases, and some merchants store it for future transactions. You should never type your full card number into an unsecured website or share it over email or text message.
When you make a purchase in person, the cashier or card reader sees your full number, but that is unavoidable. For online purchases, reputable merchants use encrypted connections (you can tell by the padlock icon in your browser) and do not ask you to email or text your card number.
If you are concerned about a merchant storing your card number, you can ask whether they do and request that they delete it after the transaction. Many payment systems now use tokenization, which means the merchant stores a token or reference number instead of your actual card number, so even if their system is breached, your card number is not exposed.
Card numbers on different card types
| Card Network | Number of Digits | First Digit |
|---|---|---|
| Visa | 16 | 4 |
| Mastercard | 16 | 5 |
| American Express | 15 | 3 |
| Discover | 16 | 6 |
| Diners Club | 14 | 3 or 5 |
Most cards you encounter in everyday use will be one of the four main networks: Visa, Mastercard, American Express, or Discover. Diners Club is less common but still in use, particularly for business travel and dining. If you receive a card with a different number of digits or a first digit that does not match any of these networks, contact your bank to confirm it is legitimate.
Prepaid cards and gift cards sometimes use different numbering schemes, so do not be surprised if a prepaid Visa has a slightly different structure than your regular Visa credit card. The payment system will still recognize it as a Visa because of the first digit, but the internal structure may vary.
Frequently Asked Questions
Can I tell what type of card I have just by looking at the first digit?
Yes. The first digit alone tells you the card network: 3 for American Express or Diners Club, 4 for Visa, 5 for Mastercard, and 6 for Discover. This is why payment systems ask you to select your card type — they are often checking the first digit to route your transaction to the correct processor.
What if my card number has a different number of digits than expected?
Contact your bank. Most cards have the standard number of digits for their network, so an unusual length could indicate a specialty card, a business card, or a card issued outside the United States. Your bank can confirm whether the card is legitimate and explain why it differs from the standard.
Does the Luhn algorithm protect me from fraud?
No. The Luhn check only catches typos and confirms the number follows the correct pattern. It does not verify that you own the card or that the account is active. Fraud protection comes from your bank's monitoring systems, your card's security features (like the CVV), and your own vigilance about where you use your card.
Why does American Express have 15 digits instead of 16?
American Express designed its card system independently and chose 15 digits as its standard. There was no universal rule, so each card network made its own choice. American Express has kept 15 digits for decades and has no reason to change it now.
Can someone use my card number if they only have the 16 digits?
They can attempt to, but most online merchants also require the expiration date and CVV (the three-digit security code on the back). In person, they would need the physical card. If you believe your card number has been compromised, contact your bank when ready and request a replacement card.