Total Pageviews

Friday, March 18, 2011

Credit Card Algorythm

Most people don't know this, but not every 16 digit number can be a valid credit card number.  Here is how to tell if you have a valid credit card number. I should note that debit cards follow a different formula and this wont work for them...but anyway.  Take your credit card and write down all 16 numbers.  Below the first number, copy down the first number. On the second number, multiply that number by 2.  Finish the rest of the numbers in this pattern, multiplying every other number by two and copying down the others. The next step is to go through all the numbers and if the number is greater than 9, subtract 9 from it. (15-9=6) Now, total up all of the numbers on this last row you've created. This total number should evenly be dived by 10.  Therefore, if you changed one number on the card or transposed the number it would not be a valid card.

Enjoy :)