01(19): How to determine the last NRIC letter from the starting letter, and digits

Nicholas Loh Avatar

Have you ever wondered how the digits and letters within your NRIC relate to one another? The most recent news shrouding the NRIC concerns the nature of its collection, use, and disclosure. According to a Straits Times article published last August, it will be illegal for organisations to collect, use, or disclose NRIC numbers or make copies of the identity card, under stricter rules spelt out by the PDPC (Personal Data Protection Commission), from 1 September 2019.

Why are NRICs treated more highly than other personal particulars? Well, that’s because the NRIC number is a “permanent and irreplaceable identifier which can be used to unlock large amounts of information relating to an individual” (quoted from the Channel NewsAsia article).

The structure of the NRIC number is as follows: there is a prefix (which can be either S, T, F, G), followed by 7 digits (each ranging from 0-9), and a suffix (which can be one of many possible letters, as we shall we shortly). The following information regarding the structure of the NRIC number has been adapted from the relevant Wikipedia article:

The structure of the NRIC number/FIN is #0000000@, where:

A. # is a letter, the prefix, that can be “S”, “T”, “F” or “G” depending on the status of the holder.

1) Singapore citizens and permanent residents born before 1 January 2000 are assigned the letter “S“.
2) Singapore citizens and permanent residents born on or after 1 January 2000 are assigned the letter “T”.
3) Foreigners holding long-term passes issued before 1 January 2000 are assigned the letter “F”.
4) Foreigners holding long-term passes issued on or after 1 January 2000 are assigned the letter “G”.

Fun fact: Before 1 January 2000, it was commonly thought that “S” stood for Singapore” and “F” for Foreign. In 2000, the “T” and “G” ranges (which are one letter after “S” and “F” respectively) were introduced to avoid conflicts with previously issued numbers. As “S” is the 19th letter of the alphabet, it was reinterpreted as denoting that the person was born or registered in the 1900s (1900–1999), “T” is the 20th letter of the alphabet, denoting that the person was born in the years 2000 to 2099.

B. 0000000 is a 7-digit serial number assigned to the document holder.

For Singapore citizens and permanent residents born on or after 1 January 1968, their NRIC number will start with their year of birth e.g. 71xxxxx#. For those born on or before 31 December 1967, the NRIC number does not relate to year of birth, and commonly begins with 0 or 1. Non-native Singaporeans who were born before 1 January 1967 are assigned the heading numbers 2 or 3 upon attaining permanent residency or citizenship. They are randomly assigned according to the issuance number. Subsequent numbers are only for people attaining permanent residency or citizenship after 2008 (“4” or “5”).

C. @ is the checksum letter calculated with respect to # and 0000000.

Fun fact: Special NRIC numbers that are numerically significant have been issued to notable people:

S0000001I (Yusof bin Ishak, first President of Singapore, deceased November 1970)
S0000002G (first Chief Justice of Singapore Wee Chong Jin, deceased June 2005)
S0000003E (first Prime Minister of Singapore Lee Kuan Yew, deceased March 2015)
S0000004C (Kwa Geok Choo, wife of Lee Kuan Yew, deceased October 2010)
S0000005A (first Deputy Prime Minister of Singapore Toh Chin Chye, deceased February 2012)
S0000006Z (second Deputy Prime Minister of Singapore Goh Keng Swee, deceased May 2010)
S0000007H (first Minister for Culture S Rajaratnam, deceased February 2006)

I quote from the Channel NewsAsia article yet again: “The NRIC algorithm was never meant to be an impenetrable cipher, but a check for input errors,” Mr Lee said. “With a large enough data set, any budding cryptoanalyst would be able to solve this algorithm.”

Indeed, some people have reverse-engineered the algorithm. See references [5] and [6] for more information. All information below has been obtained from reference [6]. Now, we get to the part which you have been waiting for.

Consider the following random IC: S1234567@, where @ is the valid letter that we shall determine.

Step 1) You take the 1st number and multiply it by 9, then take the 2nd number and multiply it by 4, take the 3rd number and multiply it by 5, take the 4th number and multiply it by 6, and carry on until you take the 7th number and multiply it by 9. Now, take the sum of all these products. In the case of our example, the number will be 202.

Step 2) Divide the sum by 11 and determine the remainder. In other words, 202 mod 11 = 4. This remainder value is known as the checksum.

The above two steps are illustrated in the image below:

Step 3) Look-up the corresponding suffix letter from the following checksum table.

Since the original NRIC (S1234567@) has a prefix letter of ‘S’, we shall consider the first row of values. We see that the checksum value of 4 corresponds to the suffix letter of D. Hence, given the prefix and seven digits of S1234567, we can deduce that the valid NRIC must be S1234567D.

I hope you have found this insightful.

Yours faithfully,
Nic Loh
28 February 2019

1. https://www.channelnewsasia.com/news/singapore/online-nric-generators-cause-for-concern-cybersecurity-experts-10693588
2. https://www.straitstimes.com/singapore/collecting-nric-numbers-and-making-copies-of-the-identity-card-will-be-illegal-from-sept-1
3. https://en.wikipedia.org/wiki/National_Registration_Identity_Card#Structure_of_the_NRIC_number.2FFIN
4. http://www.ngiam.net/NRIC/ppframe.htm
5. http://www.ngiam.net/NRIC/
6. https://www.youtube.com/watch?v=XOOFoKmHR1w

2 responses

  1. Ys

    How do we find a person Month with NRIC

    1. Nic Loh

      Hi Ys! Thanks for your comment. From a person’s NRIC alone, one would not be able to determine the birth month with 100% certainty. Nevertheless, in relatively recent NRICs, you can use the trailing string of digits to determine the ordinal position of the birth in that particular year. For example, in the following NRIC (which isn’t necessarily valid; I just used a random checksum letter Y) S9927628Y, this baby was the 27628th baby to be born in the year. While you cannot directly infer the month from this information alone, you can nevertheless determine the person’s birth month with a reasonable with other pieces of information which include: 1) the number of births that year; 2) NRICs of other people born that year whose birth months you know; 3) knowledge of the general distribution of birthdays in a typical year.

      Hope this helps!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: