How to Tell if a Credit Card Number is a Fake

Have you ever taken all of your credit cards, spread them out on a coffee table and noticed patterns in the 16 digit numbers?  Well, neither have I. But believe it or not, there is a way to verify if the credit cards you hold in your wallet are the real deal or phony bologna.

Hans Peter Luhn patented an algorithm in 1954 which would forever be known as the Luhn algorithm. For those not familiar with the term, an algorithm is just a series of instructions used in mathematical applications to complete a task or problem.  Anyway, the Luhn algorithm is particularly fun because every credit card and debit card number in the US follows this set of rules.  The reason that every credit card Issuer uses this algorithm is not to prevent fraud or identity theft, but rather to identify accidental errors in manufacturing and distributing credit cards.

Using the credit card example below, let’s take a look at how the Luhn algorithm works.

University of Missouri-St. Louis Alumni Association

Here we have a basic credit card with a 16 digit number (note that the last four digits, 9123, are a little difficult to see).  In order to see if this card’s number is real, we need to follow a few easy steps. First we identify the check digit, which is always the last digit on the credit card.  In this instance, the check digit is 3.  Then we double every other number, starting first with the number to the left of the check digit, which in the example above is 2 . Our new credit card number is as follows:

(10)4(2)2   (14)5(6)4   (10)6(14)8   (18)1(4)3

Any double digit number needs to have it’s single digits added together to create it’s own single digit number.  After completing this step we have a new number which reads:

1422   5564   1658   9143

If we add up all of these single digits, and the total is divisible by 10 (without a remainder) we have ourselves a valid credit card number.  Unfortunately for all you fraudsters out there, the number we have adds up to 66, which is not divisible by 10, making the credit card above, a fake.

Topics: Credit Cards

11 Responses to “How to Tell if a Credit Card Number is a Fake”

  1. That was too cool! 🙂

    Lucky for me I only had two fake cards in my wallet.

    Maybe if somebody had told Tom Hanks at the beginning of the Da Vinci Code about the Luhn algorithm, he might have had a much easier time unlocking the secrets of the Knights Templar. Or not.

    Oh, never mind.

    Len Penzo dot Com

  2. That’s pretty cool. Of course, like the others, I had to try it and see if it worked with one of my “real” cards.

    I also remember reading a blog post somewhere that said the numbers also indicate the bank issuing the card, the type of card (Visa, MC, Amex, etc). I don’t remember which set of numbers indicate which.

    • Kevin Beck

      All American Express cards start with 3; all Visa cards start with 4; all MasterCard cards start with 5; and all Discover cards start wtih 6. The first four digits of a card number are unique to the bank issuing the card, and the second set of digits are also unique to the card issuer.

      • in fact the first 6 digits indicate the bank, and there’s a LOT more info embedded too, depending on the issuer. is surprisingly accurate, though see the ‘talk’ section too. also has a useful article.

        enjoy, and have a happy ny

  3. Then, I googled for the algorithm. I read the instruction too fast. Mine add to 50, 60, 70. So , yes they are all valid.

    You double only every 2nd digit starting from the 2nd digit on the right.

    If 16 digits, it is the same as the 1st, 3rd, 5th, etc.

    Thanks DR.

Leave a Reply