Check digit calculation

15th or the last number of the IMEI is a check digit calculated using the Luhn algorithm.

The Check Digit is calculated according to Luhn formula. The Check Digit is calculated of all other digits in the IMEI. The purpose of the Check Digit is to help guard against the possibility of incorrect entries to the CEIR and EIR equipment.

The check digit is validated in three steps:

  1. Starting from the right, double a digit every two digits (e.g., 7 → 14).
  2. Sum the digits (e.g., 14 → 1 + 4).
  3. Check if the sum is divisible by 10.

Conversely, one can calculate the IMEI by choosing the check digit that would give a sum divisible by 10. For the example IMEI 35 780502 398494 ?

IMEI number 3 5 7 8 0 5 0 2 3 9 8 4 9 4 ?
Double every other digit 3 10
7 16
0 10
0 4
3 18
8 8
9 8
?
Sum all digits 3 + (1 + 0) + 7 + (1+6) + 0 + (1+0)+ 0 + 4 + 3 + (1+8) + 8 + 8 + 9 + 8 + ? = 68 + ?

Sum of all digits is 68. We need to make it divisible by 10. We need to add 2 to our Sum of 68 and this addition is our check digit. Our complete IMEI is 35 780502 398494 2.