NZ Check Digit Calculator
Who doesn't love a good check digit?
In NZ we have lots of fun* numbers which use check digits. This page provides a calculator for a few of them. If you want to see an explanation of them, have a look below. You can also look at the source of this page, the functions should be fairly self explanatory.
*depends heavily on what your definition of "fun" is.
Disclaimer: this page calculates check digits client-side. You should still take caution and read the source code before using it to ensure yourself of its safety if you are concerned. Don't trust this code as a reference implementation for these check digit algorithms, there may be errors. Please use the official sources if you're implementing one of these. See the source code of this page for terms of use. When using this page you must under no circumstance enter information you are not explicitly permitted and legally entitled to use.
How to use
You can check check digits here by entering them into the text box above and selecting either 'Calculate' or 'Verify'. The first takes an identifier like 'FT520' (for TMS) and generates the corresponding check digit (in this case it'd be 0). The second takes a full number like 'FT5200' and checks that it's valid (in this case it would be).
Because a lot of these check digits operate modulus 11, there are sometimes numbers for which there is no valid check digit. For example, no NHI beginning with 'ZZZ004' can exist, because the check digit would be invalid.
TMS
TMS means either 'Traffic Monitoring System' or 'Traffic Management System' depending on who you believe on the internet. The checksum is a part of the wider system, and serves about the purpose you'd expect (checking the validity of numbers).
NHI
NHI is the 'National Health Index' and an NHI is the identifying number that each person is given within that system. It is quite a simple check digit algorithm.
New NHI
New NHI is the new NHI number format that will be switched to in around 2025.
NSN
NSN is the 'National Student Number', an identifying number given to all students in New Zealand. Typically it should be somewhere between 2 and 9 digits long. The checksum algorithm is interesting however in that it allows for more than 9 digits, but just ignores any digits before the rightmost 9.