Learning how to check valid credit card numbers is not as random as people may think. There is a mathematical formula involved. Most credit card numbers are sixteen digits with the exception of American Express. The math for checking valid credit card numbers is only for validation. For more information please check out this website http://www.beachnet.com/~hstiles/cardtype.html.