A standard credit card has 16 digits, but the number varies by card type
Most credit cards issued in the United States have 16 digits printed on the front. However, American Express cards have 15 digits, and some specialty cards or international cards may have a different count. The digits are arranged in groups of four for readability, but they form one continuous number that identifies your account and issuer.
The length matters because payment systems use it to verify the card is real before processing a transaction. If you enter a number with the wrong digit count, the system will reject it automatically — even if every individual digit is correct.
Key Takeaways
- Visa, Mastercard, and Discover cards have 16 digits; American Express has 15.
- Each digit position serves a specific purpose: the first digit identifies the card network, digits 2–6 identify the bank, and the last digit is a check digit that validates the entire number.
- The card number itself is different from the CVV (the three- or four-digit security code on the back), which is a separate piece of security information.
- The digit count is one reason why you cannot straightforward guess or randomly generate a valid card number — the system checks the mathematical relationship between all the digits.
What each digit position tells you
The first digit identifies the card network. Visa cards start with 4, Mastercard with 5, American Express with 3, and Discover with 6. This single digit tells payment processors which company to route the transaction to.
Digits 2 through 6 identify the bank or financial institution that issued the card. Different banks have different ranges within this block, so two Visa cards from different banks will have different digits in these positions even though both start with 4.
Digits 7 through 15 (or 14 for American Express) are your account number — the unique identifier for your specific account at that bank. This is the part that ties the card to your checking or savings account.
The final digit is called the check digit. It is calculated using a mathematical formula called the Luhn algorithm, which runs all the previous digits through a specific set of operations. Payment systems use this check digit to verify that the number is mathematically valid before they even contact your bank. If someone types in a card number with a typo, the check digit will not match, and the transaction will fail when ready.
Why American Express is different
American Express cards have 15 digits instead of 16 because the company designed its numbering system differently when it was founded. The first digit is still 3, but the structure of the remaining digits follows a different pattern than Visa or Mastercard.
This difference means American Express cards are when ready recognizable to payment systems. When you enter a 15-digit number starting with 3, the system knows it is American Express before it checks anything else. Merchants and online retailers use this information to route the transaction to the correct processor.
The card number is not the same as the security code
The 16 digits on the front of your card are separate from the CVV (Card Verification Value), which appears on the back. Visa and Mastercard use a three-digit CVV, while American Express prints a four-digit code on the front.
The CVV is not part of the card number itself and is not stored in the magnetic stripe or chip. It exists only on the physical card, which is why online retailers ask for it — it proves you have the card in your hand. The card number alone is not enough to complete an online purchase; you need the CVV as well.
How the Luhn algorithm protects against errors
The check digit at the end of your card number is calculated using the Luhn algorithm, a mathematical formula that catches most typos automatically. Here is how it works: the system doubles every second digit (starting from the right), subtracts 9 from any result over 9, adds all the digits together, and checks whether the sum is divisible by 10.
If you mistype even one digit, the sum will not be divisible by 10, and the payment system will reject the number before it ever contacts your bank. This means you cannot accidentally charge someone else's card by typing a number wrong — the system catches it first. It also means you cannot generate a valid card number by guessing, because the check digit has to match the mathematical formula.
This protection is one reason why card fraud requires either stealing the physical card, stealing the full number through a data breach, or using a card number that was already validated in a previous transaction.
What happens when you enter a card number online
When you type your 16 digits into a payment form, the system first checks the digit count — if it is not 16 (or 15 for American Express), it rejects the entry when ready. Next, it runs the Luhn algorithm to verify the check digit. Only after both checks pass does the system send the number to your bank for authorization.
This two-step verification happens in milliseconds and is invisible to you. It is why you sometimes see an error message saying "invalid card number" before you even finish entering the CVV — the system already knows the number cannot be real.
Frequently Asked Questions
Why do credit card numbers have different lengths?
Different card networks designed their numbering systems at different times and for different purposes. Visa, Mastercard, and Discover settled on 16 digits as a standard, while American Express chose 15. The length is part of how payment systems when ready identify which network to route a transaction to.
Can I use just part of my card number for a purchase?
No. Payment systems require the full card number, the expiration date, and the CVV. Entering only some of the digits will fail the check digit validation and be rejected. This is intentional — it prevents partial numbers from being used fraudulently.
Does the card number change if I get a replacement card?
Usually not. If your bank sends you a replacement card because the old one was damaged or lost, the new card typically has the same 16-digit number. The expiration date and CVV will be different, but the account number stays the same so your recurring payments and stored payment methods do not break.
What if I accidentally shared my full card number online?
Contact your bank or card issuer when ready. They can cancel the card and issue a replacement with a new number. The sooner you report it, the sooner they can monitor for unauthorized charges. Most card issuers offer fraud protection that limits your liability for unauthorized transactions.
Is it safe to write down my card number?
Writing down your full card number and keeping it somewhere accessible is riskier than memorizing it or storing it securely in a password manager. If someone finds the written number, they have everything they need except the CVV. If you must write it down, store it in a locked drawer or safe, not in a wallet or on a sticky note.