Skip to article content

How Sri Lanka's NIC Number Works — Format, DOB & Gender Explained

Every Sri Lankan citizen receives a National Identity Card (NIC) number from the Department for Registration of Persons (DRP). The number is not random — it encodes the holder's date of birth, gender, and voter status using a compact numeric structure defined by DRP. This page explains exactly how it works, covering both the old 9-digit format and the new 12-digit format introduced around 2016.

1. The Two NIC Formats at a Glance

Old format (10 characters: 9 digits + V/X)

Example old NIC: 906731234V
90Year (YY)
673DOY + gender
1234Serial
VVoter
  • Positions 1–2 (YY): Last two digits of birth year. Add 1900. So "90" → 1990.
  • Positions 3–5 (DOY): Day-of-year code (1–366 for males; 501–866 for females). "673" → female, day 673 − 500 = 173 → 22 June.
  • Positions 6–9: 4-digit serial number unique within that year and DOY group.
  • Position 10 (V/X): V = voter-registered; X = not registered or exempted.

New format (12 digits, issued from ~2016)

Example new NIC: 199006731234
1990Full year
673DOY + gender
01230 + serial
4Check digit
  • Positions 1–4 (YYYY): Full 4-digit birth year. No ambiguity — works for anyone born in 2000 or later.
  • Positions 5–7 (DOY): Same day-of-year encoding as old format.
  • Positions 8–11: A leading 0 followed by the 4-digit serial. The leading 0 was inserted to expand the serial space.
  • Position 12: Check digit (numeric). Voter status (V/X) is no longer encoded.

2. How Date of Birth Is Encoded (Day-of-Year)

Instead of storing month and day separately, DRP stores the day-of-year (DOY) — a number from 1 to 366 counting from January 1.

Birth date DOY (male) DOY code (female)
January 1 001 501
January 31 031 531
February 28 059 559
February 29 (leap year) 060 560
June 22 173 673
December 31 365 / 366 865 / 866

To decode: if DOY > 500, subtract 500 to get the real DOY and mark gender as female. Then convert DOY to a calendar date by walking through month lengths, accounting for leap years.

3. Gender Encoding

The DRP uses a binary encoding in the DOY field:

  • DOY 001–366 → Male
  • DOY 501–866 → Female (actual DOY = encoded − 500)

There is no third option in the official DRP encoding scheme. The NIC number does not explicitly mention gender anywhere; it is implied entirely by whether the DOY field is above or below 500.

4. Voter Status (Old Format Only)

The final character of an old-format NIC is either V or X:

  • V — Voter: the person is registered on the electoral roll.
  • X — Non-voter: not registered, or has a DRP-recognised exemption (e.g., diplomats, certain disabilities).

New 12-digit NICs do not encode voter status. V/X was dropped when the format was redesigned because voter registration is now maintained separately by the Elections Commission.

5. Converting Old NIC to New NIC

The conversion formula is straightforward:

Old: YYDDD NNNN V
New: 19YY DDD 0NNNN ? (? = check digit, computed separately)
  1. Prepend 19 to the 2-digit year (assumes all old NICs are 1900s births).
  2. Keep the 3-digit DOY unchanged.
  3. Insert a 0 before the 4-digit serial.
  4. Drop the V/X suffix.
  5. Append the check digit (the DRP compute this; for online decoding it is usually just provided as-is by the citizen).
Worked example 1: 855420159V → new NIC YY = 85 → 1985 · DOY = 542 (female, day 42 = February 11) · Serial = 0159
New: 198554200159
Worked example 2: 906731234V → new NIC YY = 90 → 1990 · DOY = 673 (female, day 173 = June 22) · Serial = 1234
New: 199006730123 (last digit varies by actual DRP record)

Note: NICs for people born in 2000 or later were always issued in the 12-digit format.

6. Leap Year Handling

A year is a leap year if:

  • It is divisible by 4, and
  • It is not divisible by 100, unless
  • It is also divisible by 400.

Examples: 1984, 1988, 2000, 2004, 2024 are leap years. 1900, 2100 are not. If DOY = 060 and the year is not a leap year, that is an edge-case in the original DRP record — NIC Info will still attempt to decode it gracefully.

7. The Check Digit (New Format)

The 12th digit of a new-format NIC is a check digit. DRP has not published the official checksum algorithm publicly, but community analysis and cross-referencing with DRP data suggests it uses a weighted modulo scheme similar to Luhn. For the purposes of decoding DOB and gender, the check digit is not needed — only digits 1–11 matter.

8. What the NIC Does NOT Tell You

  • Full name or address — not encoded.
  • Province or district of birth — not encoded (sometimes confused with serial range, but DRP has not published a definitive mapping).
  • Current voter status — the V/X in old NICs reflects registration at the time of issue, not current status.
  • Religion, ethnicity, or marital status — none of these are in the number.

9. Frequently Asked Questions

Can two people have the same NIC number?

No. The DRP assigns a unique 4-digit serial within each year + DOY group, ensuring no two valid NICs are identical. Duplicate NICs that appear in the wild are fraudulent records.

Why does the new NIC have a 0 before the serial?

When the old 4-digit serial space was expanded into 5 positions in the new format, a leading 0 was inserted to pad existing serials. This retains backward compatibility while reserving non-zero values for future expansion.

Why do some online tools give wrong DOB for old NICs?

Most bugs come from: (1) not handling leap years correctly, (2) assuming 2-digit year is always 1900s (some NICs issued for late-1990s births round ambiguously), or (3) off-by-one errors when converting DOY 365/366. NIC Info accounts for all three.

Is this tool official?

No. This is an independent, unofficial tool by Pubudu Tharanga. For official NIC verification or reissuance, visit drp.gov.lk.

Try the live decoder — paste any Sri Lankan NIC and get the full breakdown instantly.

Open NIC to DOB Decoder →

More NIC Tools

References

This article is provided for educational purposes. NIC Info is not affiliated with DRP or any government body.