Did you know that you can easily tell whether a credit card/debit card number is correct or not by doing some quick calculations? While it’s highly unlikely that you will find yourself in a situation where you have to manually verify the authenticity of a card, nonetheless it is an interesting trick to know.
The process to find if a card number is fake is based on an algorithm developed by an IBM scientist Hans Peter Luhn (1896-1964), and is called Luhn algorithm. He was awarded US patent for that in 1960.
Using a little bit of Math, and following the instructions given below, you can easily apply Luhn algorithm manually to find if a card (debit or credit) is authentic or not.
Let’s take the example of this card that I picked from Google Images.
The card number is 4000 0012 3456 7899. The last digit on the card is called the ‘check digit’ and plays a very important role as we will see.
Steps To Identify If A Credit Card Is Fake or Authentic using Luhn Algorithm
1) Note down the card number after removing the check digit
In our example card, we’ll remove the last digit and note down the remaining numbers.
4 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
2) Multiply the digits in the odd-places by 2
Multiply the 1st digit, 3rd digit, 5th digit, and so on
4 x 2 | 0 | 0 x 2 | 0 | 0 x 2 | 0 | 1 x 2 | 2 | 3 x 2 | 4 | 5 x 2 | 6 | 7 x 2 | 8 | 9 x 2 |
This is what we get
8 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 6 | 4 | 10 | 6 | 14 | 8 | 18 |
3) If any of the numbers so obtained is 10 or greater than 10, subtract 9 from it
Subtracting 9 from all the two-digit numbers obtained in the previous step, we get:
8 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 6 | 4 | 1 | 6 | 5 | 8 | 9 |
4) Add all the digits together
Adding all the digits obtained in step 3, we get 51.
5) Add the check digit that was removed in the first step, to the answer obtained above.
Check digit that we removed in Step 1 is 9, and the answer obtained in the previous step is 51. Adding these two we get the final answer as 60.
6) If the final answer is divisible by 10, the card number is valid
Since our answer, 60, is divisible by 10, our card number is valid.
But wait!!
This doesn’t necessarily mean that this is an authentic card. It only means that this can be a possible card sequence. However, whether or not the bank has issued a card with this sequence is a different case.
What’s The Practical Use Of Luhn Algorithm?
While Luhns Algorithm is not about security anymore, it was an important feature earlier when credit cards could not be quickly verified online.
Even today, it’s a fantastic way of catching typos and can catch most of the transcription mistakes. If you see an error message when you incorrectly type your card number online, it is probably because the backend is using Luhn algorithm as the first line of defense.
CRED: An App That Rewards You For Paying Credit Card Bills
This holds true for all debit and credit cards, including Visa, Master, Amex, RuPay etc
Isn’t this interesting? Why don’t you try this out with your card?
Check this list of other articles before you leave.
Join Our Growing Community
Whatsapp Broadcast
Get notified when a new article is published |
Fb Page
Show some love by joining our Facebook page |
Youtube
Subscribe to watch our videos on Youtube |
When not writing blogs, Anshul could be found working on interesting data analytics problems at Uber. Though he does not have a degree in finance – he holds a B.Tech degree from NIT Jaipur – his interest in the field has made him learn the nuances of personal finance management, which he shares through this platform.