How Medicare Number Validation Works
The Australian Medicare card number carries a built-in check digit. Here's exactly how the checksum works — with diagrams you can reference.
What is a Medicare number?
A Medicare card number is a 10-digit identifier issued by Services Australia. It is structured, not random:
- Digits 1–8 — the base card number.
- Digit 9 — the check digit, calculated from the first eight.
- Digit 10 — the issue number, which increments each time a card is reissued.
Each person listed on the card also has a single-digit Individual Reference Number (IRN) printed beside their name. The IRN is not part of the card number and is not used in the checksum. Medicare numbers are classified as sensitive health-related identifiers under the Australian Privacy Act 1988.
The Validation Algorithm
Validation has two independent checks: the first digit must fall in the valid issuing range (2–6), and the first eight digits must produce the ninth digit via a weighted checksum modulo 10. Together these reject typos and random 10-digit numbers.
Step-by-Step Example
Let's validate the Medicare number 2950 33617 1. The check digit is the 9th digit (7); the 10th digit (1) is the issue number and is not part of the checksum:
| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| Digit | 2 | 9 | 5 | 0 | 3 | 3 | 6 | 1 |
| Weight | x1 | x3 | x7 | x9 | x1 | x3 | x7 | x9 |
| Product | 2 | 27 | 35 | 0 | 3 | 9 | 42 | 9 |
Sum: 2 + 27 + 35 + 0 + 3 + 9 + 42 + 9 = 127
Check: 127 mod 10 = 7, which equals the 9th digit (7) → Valid Medicare number
Prefix: first digit is 2, inside the valid 2–6 range. ✓
Why This Matters for PII Detection
Without the check digit, any 10-digit number could be flagged as a Medicare number — phone numbers, account numbers, reference IDs. The checksum plus the prefix range collapse the false positive rate dramatically.
The Weights
How WorkLens Uses This
WorkLens applies the Medicare prefix and check-digit test as Layer 10 (Validators) in its 15-layer detection pipeline. When a regex pattern matches a 10-digit number, the validator runs the prefix check and the weighted checksum. If both pass, confidence is boosted to 0.95+ (Critical severity). If either fails, the detection is suppressed — preventing false positives from phone numbers, account numbers, and random digit sequences.
The same checksum-before-flagging approach is used for TFN (mod-11 weighted checksum), ABN (mod-89 weighted checksum), and credit cards (the Luhn algorithm). Validation runs entirely on your machine — no number ever leaves the browser.
Try it on your own data
Drop a CSV or XLSX file — WorkLens detects and validates PII in seconds. No signup required.
Start ScanningSign up for early access to:
Diagrams on this page are original to WorkLens. You may embed them with attribution: link back to theworklens.com.