Every CPF submission in Singapore lives or dies on one tiny detail: the NRIC check digit. Get one digit wrong, mistype one letter, or transpose two numbers, and your entire CPF EZPay upload will be rejected. The CPF Board’s system uses the check digit to verify that every NRIC and FIN on your spreadsheet is structurally valid before it accepts the submission.
This article explains what the NRIC check digit is, why it matters for payroll, and how to validate NRICs in your spreadsheet without paying for specialised software. There is also a free tool at the end if you would rather skip the formula entirely.
Validate NRICs automatically with our free /build tool →
What Is the NRIC Check Digit?
Every Singapore NRIC and FIN follows the format @xxxxxxx#:
@(prefix): One letter.SorTfor citizens and PRs,ForGfor foreigners holding long-term passes. (A newerMprefix also exists for some passes.)xxxxxxx(digits): Seven numeric digits.#(check digit): One letter, calculated from the prefix and digits using a published algorithm.
The check digit is not random. It is a checksum: a mathematical function of the seven digits that lets any system verify the NRIC was entered correctly. If even one digit is mistyped, the check digit will not match, and the validator knows the NRIC is corrupt.
This is why CPF EZPay rejects malformed NRICs without human review. The check is deterministic, fast, and unforgiving.
Why This Matters for Payroll
A single bad NRIC in your payroll spreadsheet will block the entire CPF submission. CPF EZPay does not partially accept files. Either every row passes validation, or the whole file bounces back. That means:
- One typo can delay your CPF submission past the deadline
- Late CPF submissions incur interest at 18% per annum
- You have to find the bad row, fix it, regenerate the DTL file, and re-upload
The fix is simple in theory: validate every NRIC before you submit. In practice, most SME owners do not know the algorithm and have no easy way to check.
The NRIC Check Digit Algorithm
The algorithm is publicly documented and straightforward. Here is how it works.
Step 1: Multiply each digit by its weight
For all four prefix types, the weight vector is the same: 2, 7, 6, 5, 4, 3, 2. Multiply each of the seven digits by the corresponding weight.
Example for digits 1, 2, 3, 4, 5, 6, 7:
1×2 = 2
2×7 = 14
3×6 = 18
4×5 = 20
5×4 = 20
6×3 = 18
7×2 = 14
Step 2: Sum the products
Add them up:
2 + 14 + 18 + 20 + 20 + 18 + 14 = 106
Step 3: Apply the prefix offset
The offset depends on the prefix:
- S: add 0
- T: add 4
- F: add 0
- G: add 4
For our example with an S prefix: 106 + 0 = 106.
Step 4: Find the remainder mod 11
106 mod 11 = 7
Step 5: Map to the check letter
The letter map differs between NRIC and FIN:
- For S and T prefix: index
10 - remainderintoJ, Z, I, H, G, F, E, D, C, B, A - For F and G prefix: index
10 - remainderintoX, W, U, T, R, Q, P, N, M, L, K
For our example (S prefix, remainder 7): index 10 - 7 = 3, so the check letter is H.
The valid NRIC would be S1234567H.
An Excel Formula for NRIC Validation
If you maintain your own payroll spreadsheet, you can validate NRICs with a single (long) Excel formula. Assuming the NRIC is in cell A2, paste this into B2:
=IF(LEN(A2)<>9, "Invalid length",
IF(ISERROR(MID(A2,2,7)*1), "Non-numeric digits",
LET(
prefix, UPPER(LEFT(A2,1)),
digits, MID(A2,2,7),
weights, {2,7,6,5,4,3,2},
offset, IF(OR(prefix="T",prefix="G"), 4, 0),
weightedSum, SUM(MID(digits,SEQUENCE(7),1)*weights) + offset,
remainder, MOD(weightedSum, 11),
idx, 10 - remainder,
expectedLetter, IF(OR(prefix="S",prefix="T"),
MID("JZIHGFEDCBA", idx+1, 1),
MID("XWUTRQPNMLK", idx+1, 1)),
IF(UPPER(RIGHT(A2,1)) = expectedLetter, "Valid", "Invalid check digit")
)
)
)
This requires Excel 365 or Excel 2021 (for the LET and SEQUENCE functions). For older Excel versions, you would need to split the formula across helper columns.
Google Sheets supports the same formula structure with ARRAYFORMULA instead of LET in some cases.
Common NRIC Mistakes in Payroll Spreadsheets
Mistake 1: Treating NRIC as a number
Excel will happily store 1234567 as a number, losing both the leading prefix letter and the trailing check letter. Format NRIC columns as Text before pasting data.
Mistake 2: Lowercase letters
S1234567H and s1234567h are the same to humans but may differ to strict validators. CPF EZPay expects uppercase. Use =UPPER(A2) to normalise.
Mistake 3: Spaces and dashes
S123 4567 H and S123-4567-H will fail length validation. Strip whitespace with TRIM and remove dashes with SUBSTITUTE.
Mistake 4: Confusing FIN and NRIC
Foreign employees have FINs (F or G prefix), not NRICs (S or T prefix). CPF EZPay accepts both but applies the correct algorithm per prefix. The validation logic must know which map to use.
Mistake 5: Trusting copy-pasted NRICs
A common source of bad NRICs is a copy-paste from a PDF or email where the digits silently changed during transit. Always validate after pasting.
The Easy Path: Let a Tool Validate NRICs for You
Hand-validating NRICs is the kind of work that should not exist in 2026. Our free /build tool validates every NRIC as you type, applies the correct algorithm per prefix, and refuses to produce a CPF submission file if any row fails validation.
The form:
- Accepts NRICs and FINs with any case
- Strips spaces and dashes automatically
- Runs the check digit algorithm in real time
- Shows you exactly which row failed and why
- Generates a CPF-ready spreadsheet only when every NRIC passes
No Excel formulas to debug. No “why is my CPF file being rejected” rabbit holes. Free, no login required.
Validate NRICs free with /build →
Frequently Asked Questions
Is the NRIC check digit algorithm secret? No. It has been publicly documented for years and is widely published. The algorithm itself is not sensitive; what is sensitive is the actual NRIC numbers it operates on, which is why Singapore’s PDPA restricts how organisations collect and store them.
Will my existing NRICs from HR software pass validation? If they came from a legitimate source (the employee’s NRIC card, MOM’s work pass system, or established HR software), they will pass. If they were hand-typed from memory or copied from a fuzzy scan, validate them before relying on them.
What about the new M prefix?
The M prefix is used for some newer employment passes. It uses the same algorithm as F and G (the FIN letter map) with offset 4 if memory serves, but check the latest ICA documentation if you have employees with this prefix.
Does CPF EZPay validate the check digit before accepting my file? Yes. CPF EZPay validates every NRIC and FIN in your DTL file. A single bad row will bounce the entire submission.
What is the penalty for a late CPF submission due to NRIC errors? CPF late payment interest is 18% per annum on the unpaid amount, calculated daily. The longer the delay, the more it costs. Getting NRICs right upfront is the cheapest defence.
Get NRICs Right, Every Time
NRIC check digit validation is one of those small payroll hygiene practices that pays for itself the first time it prevents a rejected CPF submission. Whether you implement the Excel formula above, use a dedicated validator, or build your spreadsheet free with /build, the goal is the same: never let a typo reach CPF Board.
Validate NRICs free with /build →
This article was written by Sarah Tan, Communications Specialist at PayGoSG. Visit paygosg.com to learn more about our simple payroll solutions for Singapore businesses.