The UIC check digit or self-checking digit ensures that no errors occur when the UIC wagon number is read by machine.
To calculate the check digit using the Luhn algorithm, the individual digits of the wagon number are alternately multiplied by 2 and 1 from left to right. The sum of the digits is then calculated. The difference between the sum of the digits and the next highest multiple of ten is the self-check digit.
The self-check digit is added to the eleven-digit vehicle number with a hyphen.