We believe everyone should be able to make financial decisions with
confidence. While we don't cover every company or financial product on
the market, we work hard to share a wide range of offers and objective
editorial perspectives.
So how do we make money? Our partners compensate us for advertisements that
appear on our site. This compensation helps us provide tools and services -
like free credit score access and monitoring. With the exception of
mortgage, home equity and other home-lending products or services, partner
compensation is one of several factors that may affect which products we
highlight and where they appear on our site. Other factors include your
credit profile, product availability and proprietary website methodologies.
However, these factors do not influence our editors' opinions or ratings, which are based on independent research and analysis. Our partners cannot
pay us to guarantee favorable reviews. Here is a list of our partners.
How to Make Sense of Your Credit Card Number
That long number isn't random, and it identifies more than just whose account the card belongs to.
Gregory Karp is a former NerdWallet writer and an expert in personal finance and credit cards. A journalist for more than 30 years, he has been a newspaper reporter and editor, authored two personal finance books and created the "Spending Smart" syndicated newspaper column. His awards include national recognition several times from the Society for Advancing Business Editing and Writing.
Kenley Young directs daily credit cards coverage for NerdWallet. Previously, he was a homepage editor and digital content producer for Fox Sports, and before that a front page editor for Yahoo. He has decades of experience in digital and print media, including stints as a copy desk chief, a wire editor and a metro editor for the McClatchy newspaper chain.
Published
How is this page expert verified?
NerdWallet's content is fact-checked for accuracy, timeliness and
relevance. It undergoes a thorough review process involving
writers and editors to ensure the information is as clear and
complete as possible.
Here’s a fun trick to entertain friends and win bar bets: Guess the first number on somebody’s credit card tucked away in their wallet.
You can do that because credit card numbers aren’t random. Using terms that sound like something out of a spy novel — such as MIIs and the Luhn algorithm — you can decode parts of a credit card number and even tell whether it’s fake or valid. That’s because credit card numbers follow patterns established by the International Organization for Standardization.
Credit card numbers don’t only identify your account. Like numbers on a paper check, they provide payment routing information so charges are processed correctly every time you swipe or dip a card into a checkout card reader or type your information into an online form.
Here’s how to decipher a credit card number.
Ready for a new credit card?
Create a NerdWallet account for insight on your credit score and personalized recommendations for the right card for you.
The first digit on a credit card is like an area code in a phone number. Instead of representing a general geography like 212 for New York City, it represents an industry type, like 4 for a financial institution.
Called an MII, or major industry identifier, the first digit of a credit card number from a major issuer in the U.S. will usually be a 3 through 6.
If it’s a Visa card, it will always start with a 4, while Mastercards generally start with a 5 — although in 2017 Mastercard started issuing some of its numbers starting with 2.
Here are starting numbers for major credit card issuers in the United States.
First digit
Credit card issuer
2
Mastercard (2017)
3
American Express
4
Visa
5
Mastercard
6
Discover
The other numbers are for all kinds of identification cards. For instance, 1 and 2 generally are for airlines (not airline credit cards, which are issued by banks); 7 is for petroleum companies; 8 represents telecommunications and health care; 9 is reserved for national numbering systems that a country might want to use.
Middle numbers
The first six digits, led by the first digit MII we already talked about, are collectively known as the issuer identification number — called bank identification numbers in the payments industry. They help identify the bank or institution that issued the card.
After that, the following numbers, excluding the last digit, represent the customer’s account, but that string usually isn’t the same as the person's bank account number.
Last number
When you swipe a credit card, the number is sent to the processor for verification, in part to determine whether the digits conform to the so-called Luhn algorithm. If they don’t, the number is invalid.
That’s why the last digit in the string is called the “check digit,” which completes the algorithm so it is divisible by 10. It can quickly identify mistakes when numbers are manually transcribed — for example, if you mistyped your credit card number during online shopping.
If you want to get really nerdy, check your own cards with the Luhn algorithm, which employs simple math but is a little tricky to explain:
For a card with 16 digits, which includes Visa, Mastercard and Discover cards:
Double every other digit, starting with the first digit, and write down the resulting series of numbers
Add together the individual digits that you wrote down. (If you have a two-digit number, combine those two digits before adding. For instance, say you doubled a 7 to get 14 — add the 1 and 4 to get 5, and then use that 5 in your total.)
Go back to your card number and add up the digits you ignored, including the last digit (no doubling)
Add the two sums
If the result ends in a zero, the card is valid.
If the card has 15 digits, namely an American Express card in the U.S., start with the second digit for doubling and use the same instructions.
'Guessing' numbers
Now that you understand the numbers, you can see how you might develop a party-trick routine of guessing the starting number of someone’s concealed credit card.
“Tell me what type of card you have, and I’ll guess the first number.” If it’s a Visa, it will be 4. If it’s Mastercard, guess 5, and if that’s wrong guess 2.
Or offer to guess the last digit, assuming they’re willing to give you all the others. Use an online calculator for the Luhn algorithm, such as one found here.
It may not make you the life of the party, but you might at least raise a few eyebrows.
Whether you want to pay less interest or earn more rewards, the right card's out there. Just answer a few questions and we'll narrow the search for you.