Skip to main content

HomeAll guides

How Many Digits Are on a Credit Card Number

Credit card numbers are 13 to 19 digits long, depending on the card type

A credit card number is not a single standard length. Most cards you encounter fall into a predictable range: Visa cards have 16 digits, Mastercard has 16, American Express has 15, and Discover has 16. But the industry standard allows anywhere from 13 to 19 digits, which is why you may see variation if you use cards from smaller issuers or international networks.

The digits themselves are not random. They follow a structure called the Luhn algorithm, a mathematical check that validates whether a number is real or fake. The first digit identifies the card network (Visa starts with 4, Mastercard with 5, American Express with 3, Discover with 6). The next several digits identify your bank. The remaining digits are your unique account number. The last digit is a check digit — a number calculated from all the others to catch typos and fraud.

Understanding this structure matters because it explains why a card number that looks right might still be declined, and why you cannot straightforward guess a valid number. It also shows why you should never share your full card number with anyone except a merchant you trust or a payment processor you initiated contact with.

Key Takeaways

  • Visa, Mastercard, and Discover cards have 16 digits; American Express has 15 digits.
  • The first digit identifies the card network, and the last digit is a check digit that validates the entire number.
  • Credit card numbers follow the Luhn algorithm, a mathematical formula that makes random guessing impractical.
  • The middle digits encode your bank and your account number, which is why two cards from the same bank will share the same opening digits.

Why the length varies by card type

Card networks set their own standards, and those standards have held steady for decades. Visa, Mastercard, and Discover settled on 16 digits as a balance between having enough unique numbers to serve millions of customers and keeping the number short enough to print and remember. American Express chose 15 digits and uses a different security code format (four digits instead of three), which is why American Express cards look noticeably different from other cards.

Smaller card networks and some regional or specialty cards may use different lengths. A card from a credit union, a store card, or an international network might have 13, 14, or even 19 digits. When you enter a card number online, the payment processor checks the length and the Luhn algorithm to catch obvious errors before sending the transaction to the bank.

The structure of the digits

The first digit is the Major Industry Identifier (MII). It tells you what type of institution issued the card. Visa always starts with 4. Mastercard always starts with 5. American Express always starts with 3. Discover always starts with 6. This is why you can often tell what card someone has just by looking at the first digit.

The next five to seven digits are the issuer identification number (IIN), also called the bank identification number (BIN). These digits identify which bank or credit union issued the card. Two Visa cards from the same bank will have the same IIN. Payment processors use the IIN to route transactions to the correct bank and to check whether a card is active.

The remaining digits (before the last one) are your account number. This is the unique identifier for your specific account at that bank. No two cards from the same bank will have the same account number, even if they are linked to the same person or business.

The final digit is the check digit. It is calculated using the Luhn algorithm applied to all the preceding digits. If you change even one digit in a valid card number, the check digit will no longer match, and the number will fail validation. This is why typos are caught when ready and why randomly guessing a valid card number is mathematically impractical.

How the Luhn algorithm protects against errors

The Luhn algorithm is a straightforward mathematical formula that works like a fingerprint for the number. Starting from the rightmost digit (excluding the check digit itself), you double every second digit. If any doubled digit is larger than 9, you subtract 9 from it. You then add all the digits together. If the sum is divisible by 10, the number is valid.

This system catches about 99 percent of single-digit errors and most transposition errors (when two adjacent digits are swapped). It does not prevent fraud — a criminal with a valid card number can still use it — but it does prevent accidental typos from being processed. When you enter a card number on a website and it is rejected when ready, the Luhn check often caught the error before the transaction even reached your bank.

What the security code is and why it is separate

The three-digit or four-digit security code on the back of your card (or front, for American Express) is not part of the card number itself. It is called the Card Verification Value (CVV) on Visa and Mastercard, the Card Identification (CID) on American Express, or the Card Security Code (CSC) on Discover. This code is printed on the card but not stored in the magnetic stripe or chip, which is why a merchant who only has your card number cannot process a transaction without it.

The security code serves as proof that you physically have the card in your hand. Online merchants ask for it to reduce fraud, because a criminal who has stolen your card number but not the physical card cannot complete a purchase. Never share your security code with anyone, and never enter it on a website unless you initiated the transaction yourself.

Why card number length matters when you are shopping online

When you enter your card number on a website, the payment form often validates the length before you submit. If you type 15 digits into a form that expects 16, the form may reject it or warn you. This is a feature, not a bug — it catches typos and prevents you from accidentally submitting a transaction with a wrong number.

Some older payment systems or international websites may not validate length correctly, which can cause confusion. If a form rejects your card number and you are certain it is correct, try a different browser or contact the merchant directly. The card number itself is almost certainly fine; the issue is usually with how the website is processing it.

Frequently Asked Questions

Why does American Express have 15 digits when other cards have 16?

American Express chose a different standard when it designed its card network. The 15-digit format has been sufficient for their customer base, and changing it now would require reissuing millions of cards. The difference does not affect how the card works or how find it is.

Can I tell if a card number is real just by looking at it?

You can tell if it follows the correct format for its network (Visa starts with 4, Mastercard with 5, and so on) and whether it passes the Luhn algorithm. But you cannot tell whether the card is active, has a balance, or belongs to a real person without contacting the bank. A number that looks valid mathematically might still be declined.

What happens if I type one digit wrong when I enter my card number?

The payment processor will catch it. The Luhn algorithm will detect the error, and the form will reject the number before it is sent to your bank. You will be asked to re-enter it. This is why typos rarely result in charges to the wrong account.

Is the card number the same as my account number?

No. Your account number is part of your card number, but they are not the same thing. The card number includes the network identifier, the bank identifier, your account number, and a check digit. If you close a card and open a new one with the same bank, you will get a new card number but may keep the same underlying account.

Why should I care how many digits my card has?

Knowing the standard length for your card type helps you catch errors when you are entering it online. It also helps you understand why some older payment systems might reject your card — they may have been programmed to expect only 16 digits and fail when they encounter a 15-digit American Express card.

This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.