Building the check digit
Treat the final position as the check digit. Moving left from it, double every second digit. If a doubled value is greater than 9, subtract 9. Add those transformed values, the untouched values, and the check digit. The generator selects a check digit from 0 through 9 that makes the complete sum a multiple of 10.