Australian Medicare Number Validation

Check whether an Australian Medicare number is valid using the official checksum algorithm published by Services Australia. Enter the 11-digit number from your Medicare card -- including the identifier, issue number, and Individual Reference Number (IRN) -- and this tool validates its format and check digit instantly. Used in production by Doccy for Australian telehealth patient verification.

Validate Medicare Number

9-digit card number

1 digit

1 digit

Testing Examples

Not real Medicare numbers. Click to populate.

Result

Enter a Medicare number and click Validate to see results.

ComponentDigitsDescription
Medicare Number98-digit identifier + 1-digit checksum. First digit 2-6.
Issue Number1Card reissue count (must not be zero)
IRN1Identifies the individual on the card

The IRN is essential for Medicare claim forms.

Where to Find Each Component on Your Card

Medicare card showing the location of the 9-digit Medicare number

Medicare Number

8-digit identifier + 1-digit checksum displayed as the main number on the card.

Medicare card highlighting the expiry date location

Expiry Date

Displayed in MM/YYYY format in the bottom right area.

Medicare card showing the issue number location

Issue Number

A single digit after the Medicare number indicating reissue count.

Medicare card showing the IRN location

Individual Reference Number (IRN)

Appears to the left of each person's name on the card.

How the Australian Medicare Checksum Algorithm Works

The Medicare check digit is calculated by multiplying each of the first 8 digits of the identifier by a corresponding weight, summing the products, and taking the remainder when divided by 10. The result must equal the 9th digit (the check digit). Additionally, the issue number (10th digit) must not be zero.

Worked Example

Using identifier 29518731 from 2951 87312 5 1:

PosDigitWeightProduct
1212
29327
35735
4199
5818
67321
73721
8199
Sum =132
Mod 10 =2

The 9th digit is 2, matching the check digit. Validation passes.

First Digit: State or Territory of Issue

DigitState / Territory
2New South Wales (NSW)
3Victoria (VIC)
4Queensland (QLD)
5South Australia (SA)
6Western Australia (WA), Tasmania (TAS), Northern Territory (NT), Australian Capital Territory (ACT)

Validate Medicare Numbers in Code

Code snippets for validating Australian Medicare numbers in TypeScript and Python, plus a regex for format checks. Full implementation available as an open-source GitHub Gist.

Regex Pattern (Format Check Only)

Does not verify the checksum -- use the algorithm for full validation.

// Raw 11-digit format
/^[2-6]\d{10}$/

// Matches: 29518731251
// Rejects: 19518731251 (first digit must be 2-6)
// Rejects: 2951873125  (must be exactly 11 digits)
Code Samples (TypeScript & Python)

TypeScript

const WEIGHTS = [1, 3, 7, 9, 1, 3, 7, 9] as const;

function validateMedicareNumber(input: string): boolean {
  const digits = input.replace(/\D/g, "");
  if (digits.length !== 11) return false;

  const firstDigit = parseInt(digits[0], 10);
  if (firstDigit < 2 || firstDigit > 6) return false;

  // Checksum: weighted sum of first 8 digits mod 10 = 9th digit
  let sum = 0;
  for (let i = 0; i < 8; i++) {
    sum += parseInt(digits[i], 10) * WEIGHTS[i];
  }
  if (sum % 10 !== parseInt(digits[8], 10)) return false;

  // Issue number (10th digit) must not be zero
  if (digits[9] === "0") return false;

  return true;
}

Python

def validate_medicare_number(medicare_number: str) -> bool:
    """Validate an Australian Medicare number using the official checksum algorithm."""
    digits = "".join(c for c in medicare_number if c.isdigit())
    if len(digits) != 11:
        return False

    if not (2 <= int(digits[0]) <= 6):
        return False

    # Checksum: weighted sum of first 8 digits mod 10 = 9th digit
    weights = [1, 3, 7, 9, 1, 3, 7, 9]
    total = sum(int(digits[i]) * weights[i] for i in range(8))
    if total % 10 != int(digits[8]):
        return False

    # Issue number (10th digit) must not be zero
    if digits[9] == "0":
        return False

    return True

Frequently Asked Questions

How many digits is an Australian Medicare number?

An Australian Medicare card displays 11 digits in total. This consists of a 9-digit Medicare number (8-digit identifier plus 1-digit checksum), a 1-digit issue number, and a 1-digit Individual Reference Number (IRN). The Medicare number is typically displayed in the format: 1234 56789 0/1.

What is the IRN on a Medicare card?

The IRN (Individual Reference Number) is a single digit that appears to the left of each person's name on a Medicare card. It identifies which family member on the card is receiving treatment or claiming benefits. For example, if you're listed as '1' on the card, your IRN is 1. The IRN must be included when making Medicare claims.

What is the issue number on a Medicare card?

The issue number is a single digit that appears after the 9-digit Medicare number. It indicates how many times your Medicare card has been issued or replaced. Each time you receive a new card (due to expiry, loss, or adding/removing family members), the issue number increases by one.

What does the first digit of a Medicare number mean?

The first digit of an Australian Medicare number must be between 2 and 6. This digit indicates the state or territory where the Medicare card was originally issued: 2 for NSW, 3 for VIC, 4 for QLD, 5 for SA, and 6 for WA, TAS, NT, and ACT. Numbers starting with 0, 1, 7, 8, or 9 are invalid.

How do I validate a Medicare number?

A Medicare number can be validated using a checksum algorithm. The first 8 digits are multiplied by weights (1, 3, 7, 9, 1, 3, 7, 9) and summed. The checksum (9th digit) should equal the sum modulo 10. Additionally, the first digit must be between 2-6. Our free tool above performs this validation automatically.

Where do I find my Medicare number?

Your Medicare number is printed on the front of your green Medicare card. It's the 10-digit number displayed prominently in the format 1234 56789 0. You can also find your Medicare number in your myGov account by linking to Medicare, or by calling Services Australia on 132 011.

When does a Medicare card expire?

Medicare cards in Australia typically expire every 5 years. The expiry date is printed on the front of the card in MM/YYYY format. You'll receive a new card automatically before your current one expires. If you need a replacement sooner, you can request one through myGov or by contacting Services Australia.

Can I use an expired Medicare card?

An expired Medicare card can sometimes still be used for claiming benefits if your Medicare eligibility is still valid, as the card number remains the same. However, healthcare providers may request a valid card. It's best to update your card through myGov or Services Australia to avoid issues.

How do I get a replacement Medicare card?

You can get a replacement Medicare card through several methods: online via your myGov account linked to Medicare, using the Express Plus Medicare app, calling Services Australia on 132 011, or visiting a Services Australia centre. Replacement cards are free and typically arrive within 14 days.

Do I need to include the IRN when filling out medical forms?

Yes, you should always include your IRN (Individual Reference Number) when filling out Medicare claim forms or providing your Medicare details to healthcare providers. The IRN identifies you specifically on the card, which is essential for processing claims correctly when multiple family members share the same Medicare card.

What is the regex for Australian Medicare numbers?

A basic regex to validate the format of an 11-digit Australian Medicare number is: /^[2-6]\d{10}$/. This checks that the first digit is between 2 and 6 and the total length is 11 digits. For full validation, you should also verify the checksum using the weighted sum algorithm (weights 1, 3, 7, 9, 1, 3, 7, 9) and confirm the issue number (10th digit) is not zero. A regex alone cannot verify the checksum -- use it for preliminary format checks, then apply the algorithm for full validation.

How do I validate a Medicare number in Python?

You can validate an Australian Medicare number in Python using the official checksum algorithm. Strip non-digit characters, check the number is 11 digits long, verify the first digit is between 2 and 6, then calculate the weighted sum of the first 8 digits using weights [1, 3, 7, 9, 1, 3, 7, 9]. The sum modulo 10 should equal the 9th digit. Finally, confirm the 10th digit (issue number) is not zero. Example: def validate_medicare(number): digits = number; weights = [1,3,7,9,1,3,7,9]; total = sum(int(digits[i]) * weights[i] for i in range(8)); return total % 10 == int(digits[8]).

What are Medicare Provider and Prescriber Numbers?

Medicare Provider and Prescriber Numbers are unique identifiers issued to healthcare professionals in Australia. A Provider Number allows doctors, specialists, and allied health practitioners to bill patients through the Medicare Benefits Scheme (MBS). A Prescriber Number enables doctors to prescribe medications subsidised under the Pharmaceutical Benefits Scheme (PBS). These numbers are different from the Medicare card number that patients use. Learn more about how to obtain a Medicare Provider Number or read our guide on Medicare Provider and Prescriber Numbers.