A few weeks ago we saw the meaning of numbers on a credit and debit card. Apart from other things, we also understood the concept of check digit in that article. Just to refresh, it is the last digit present on your card and is used to validate a card.
In this article we’ll see how a check digit is used to find if a card is fake or real. The process is quite simple. Using little bit of Math, and following the step by step instructions given below, you can easily find if a card (debit or credit) is authentic or not.
Let’s take the example of the card shown below. The card number is 4000 0012 3456 7899.
Steps To Identify If A Credit Card Is Fake or Authentic using Luhn Algorithm
The algorithm used to check the authenticity of a card is called the Luhn algorithm, after IBM scientist Hans Peter Luhn (1896-1964). He was given US Patent for this technique in 1960.
1) Note down the card number after removing check digit.
4 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
2) Starting from the first digit, multiply every alternate digit by 2.
Applying this on the digits below,
4×2 | 0 | 0x2 | 0 | 0x2 | 0 | 1×2 | 2 | 3×2 | 4 | 5×2 | 6 | 7×2 | 8 | 9×2 |
we get
8 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 6 | 4 | 10 | 6 | 14 | 8 | 18 |
3) If any of the number so obtained is 10 or greater than 10, subtract 9 from it. In other words, if it is a two digit number, subtract 9 from it.
So 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 have the answer as 51.
5) Add the check digit that was removed in first step, to the answer obtained above.
Check digit that we removed earlier is 9, and the answer obtained in last step is 51. Adding these two we get the final answer as 60.
6) If the final answer is divisible by 10, the card is valid.
Since our answer 60 is divisible by 10, so it seems that our card is valid.
But wait!!
This doesn’t mean that this is an authentic card for sure. It only means that this can be a possible card sequence. However, whether or not a company has issued a card with this sequence is a different case.
In the next article we’ll find out why the credit card numbers are so long.
Note: This holds true for debit card as well.
Why don’t you try this out with your card? Let me know if you face any problem understanding the steps.
If you are new here, please visit sitemap to see a list of articles published so far.
Wow that s a lot of awesome information.
Just a couple of questions. I know that both Visa and MasterCard use similar standards for security of cards because they use common Batching standards as far as I know. Does American Express use similar numbers based on the Luhn Algorithm? Because I do not think Amex had 16 digit numbers like Visa or MasterCard alteast upto some instances in Europe in 2005…
Luhn Algortithm does not depend on the number of digits. Not only Amex, but other cards like Maestro too do not have 16 digits. And old VISA cards had 13 digits, they later switched to 16 digit format.
But Luhn Algorithm is used for all card types, irrespective of the number of digits. Though I couldn't check it for Amex , I checked it for some Maestro cards having 19 digits and it worked fine.
Very interesting information. Never thought of doing this ! Keep sharing !
oh wow I'm actually mathematically challenged so this way to check if a credit card is fake or not will mean that I will have to harness all my math powers but thanks anyway i'd still like to try it
That was crazy. I didn’t know you could patent a mathematical equation. That is crazier!!!
nice post.. keep it up…………
wow! i am master of maths, i understand the whole steps and logic, so now i cant be cheat by anyone.
Thanks for sharing.It’s really informative to me.
this is quite interesting! Who would of thought that a simple algorithm would validate a credit card.
This tip is so simple and easy to do but really effective. We can apply it for all Visa, Master and Amex. Awesome post. Keep it up.
It is very interesting to know. I have already tried to my own visa credit card. It functioned. Great idea. Thanks again.
Thanks. Please consider using your name while commenting. Comments with name of business/website often get lost among spam comments. And anyway you are getting a do-follow link back to your site 🙂
Yeah it looks simple, but I'm sure it must have taken a hell lot of thinking to come up with this solution 🙂
Nice to hear that. 🙂 You can explain it to your friends too, so that they also benefit from it.
In practice this is not done manually. This is the logic used for developing programs to detect fraud cards. But just for fun you can try it on your card 🙂
Its not about patenting a math equation, but patenting the logic. It looks simple but I'm sure it must have taken a lot of brain storming to come up with this.
Thanks Amit 🙂
Glad that you found it useful 🙂
wow, really smart method:) Thanks for sharing it with us:)
Interesting! Thanks for the post…
sure anshul i will explain to my friends too,
Thanks for sharing,,, nice information. Now I know the way from you.
its quite funny and attractive as well i guess i try it on my card as well to check it. 😉