National Identification Number - Lithuania

Lithuania

In Lithuania Personal code (Lithuanian: Asmens kodas), like in Estonia, consists of 11 digits in the form GYYMMDDNNNC, where G is gender and century, YYMMDD is the birthday, NNN is birth serial number in that day, and C is checksum digit.

The first number (G) shows both the person's gender, and the first two digits of the birth year - odd for males, even for females. It is calculated adding 17 to even number divided by two, or adding one to odd number and dividing result by two.

females: 2 - 17+2/2=18yy 4 - 17+4/2=19yy 6 - 17+6/2=20yy 8 - 17+8/2=21yy males: 1 - 17+(1+1)/2=18yy 3 - 17+(3+1)/2=19yy 5 - 17+(5+1)/2=20yy 7 - 17+(7+1)/2=21yy

The checksum is calculated by using this formula (provided here as JavaScript code):

// code is zero-based // i.e. code is the first digit code = "3840915201"; // first 10 digits d = 0; e = 0; b = 1; c = 3; for (i = 0; i < 10; i++) { digit = code; d += digit * b; e += digit * c; b++; if (b == 10) b = 1; c++; if (c == 10) c = 1; } d = d % 11; e = e % 11; if (d == 10) { if (e == 10) checksum = 0; else checksum = e; } else { checksum = d; }

Read more about this topic:  National Identification Number