Luhn's algorithm determines whether or not a credit card number is valid. For a given credit card number: Double the value of every other digit from right to left, beginning with the second to last digit. Add the digits of the results of Step 1 to the remaining digits in the credit card checker.....
https://seotoolsystem.com/credit-card-validator/
To calculate the check digit, multiply every even-position digit (when counted from the right) in the number by two. If the result is a two digit number, then add these digits together to make a single digit (this is called the digital root).
The formula is widely used in validating credit card numbers, as well as other number sequences such as government Social Security Numbers (SSNs). Today, the Luhn Algorithm is an essential component in the electronics payments system and is used by all major credit cards.