Explained4 min read

    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.

    Published May 2026 by WorkLens

    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.

    Medicare Number Validation Flowchart
    YesNoYesNoYesNoReceive a 10-digit numbere.g. 2950 33617 1Strip spaces & punctuation→ 2950336171Is it 10 digits?8 base + check + issueNot a Medicare numberWrong lengthIs the first digit 2–6?Valid issuing rangeInvalid Medicare numberPrefix out of rangeMultiply first 8 digits by weightWeights: 1, 3, 7, 9, 1, 3, 7, 9Sum the productse.g. 2×1 + 9×3 + 5×7 + ...Does sum mod 10 equal digit 9?sum % 10 === check digitValid Medicare numberChecksum passedInvalid Medicare numberChecksum failed

    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:

    Position12345678
    Digit29503361
    Weightx1x3x7x9x1x3x7x9
    Product22735039429

    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.

    Detection With vs Without Checksum
    Feature
    Regex Only
    Regex + Checksum
    Detects valid Medicare numbers
    Rejects 10-digit phone numbers
    Rejects account / reference IDs
    False positive rate
    ~30%
    <2%
    Confidence level
    0.70
    0.95+

    The Weights

    Medicare Check-Digit Weights (first 8 digits)
    ×1
    Position 1
    Multiply by 1
    ×3
    Position 2
    Multiply by 3
    ×7
    Position 3
    Multiply by 7
    ×9
    Position 4
    Multiply by 9
    ×1
    Position 5
    Multiply by 1
    ×3
    Position 6
    Multiply by 3
    ×7
    Position 7
    Multiply by 7
    ×9
    Position 8
    Multiply by 9
    Important: A valid checksum does not guarantee a Medicare number is real or currently active — it only confirms the number follows the correct mathematical pattern and prefix range. Services Australia does not publish a public registry. WorkLens validates the format, not the issuance, and never transmits the number anywhere.

    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 Scanning

    Sign up for early access to:

    Deterministic morphingRealistic & token modesFormat-preserving encryption (FF1)Reversible with device keyCompliance packs

    Diagrams on this page are original to WorkLens. You may embed them with attribution: link back to theworklens.com.