Australia Medicare check digit
For the base digits 21234567 the Medicare check digit is 0: the eight digits are multiplied by 1, 3, 7, 9, 1, 3, 7 and 9, the products add up to 170, and 170 modulo 10 leaves 0. Validate mode checks a full card number. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Number
- 21234567
- Calculation mode
- Compute
- Input
- 21234567
- Base
- 21234567
- Check digit
- 0
A single mistyped digit on a clinic form, practice-management import, or patient portal creates failed claims and support tickets. This capability implements the published Services Australia / Digital Health Agency rule: multiply the first eight digits by the fixed weights one, three, seven, nine, one, three, seven, and nine, sum the products, and take the result modulo ten as the check digit that must equal the ninth position. The first digit must fall in the published range two through six.
How the Medicare check digit is calculated
A Medicare card number is ten digits when written without spaces. The first eight digits identify the cardholder record; the ninth is a check digit derived only from those eight; the tenth is the issue number printed on the physical card and is not part of the checksum. To compute the check digit, walk the eight base digits from left to right and multiply each by its positional weight from the official series one, three, seven, nine, one, three, seven, nine.
Add those eight products into a single weighted sum, then take the remainder when that sum is divided by ten. The remainder is a single digit zero through nine and must equal the ninth digit of a well-formed card number. The algorithm never contacts Services Australia, never looks up entitlement status, and never uses a clock or random source—it only proves that the digit string is well formed under the official weights.
A passing check does not mean the card is currently active, that the patient is eligible for a rebate, or that the name on the form matches My Health Record; it only means the ninth digit satisfies the modulo-ten identity. Compared with general Luhn card validators, the search intent here is specific: people who need the Medicare weighting over the first eight digits, not a payment-card checksum.
Where a Medicare check digit earns its keep in real workflows
Clinic and hospital registration desks validate ten-digit Medicare numbers at form submit so a single transposition does not create a phantom patient and a rejected bulk-bill claim. Telehealth and patient-portal onboarding walk every Medicare column in a CSV export, call this capability, and quarantine rows where valid is false—catching both human edits and off-by-one bugs in generators. Support macros use the structured fields when a patient insists their card is correct: agents can show that the ninth digit does not match the recomputed check without opening a spreadsheet of weights.
Do not treat a passing Medicare check as proof of active entitlement, current address, or IRN identity for a family member; it only proves the weighted sum modulo ten matches the ninth digit under the official weights. Pair the checksum with an entitlement or registry lookup when clinical or billing compliance requires live status, and keep this lightweight validator on the hot path where latency and determinism matter most.
What you can do with it
Clinic and hospital registration forms
Validate the nine- or ten-digit Medicare number at submit time and block save when valid is false, reducing failed bulk-bill claims from single-digit typos.
Practice-management and pathology imports
Run compute or validate when completing incomplete card numbers or auditing CSV patient files so structurally invalid Medicare digits never reach the billing queue.
FAQ
How is the Australian Medicare check digit calculated?
Multiply the first eight digits by the weights 1,3,7,9,1,3,7,9, sum the products, and take the result modulo 10. That remainder is the ninth digit of a well-formed card number.
What input format does the Medicare validator accept?
Optional spaces and hyphens are stripped. Compute needs exactly eight base digits; validate needs nine (base+check) or ten (base+check+issue). First digit must be 2-6.
Does a valid check digit mean the card is active?
No. This tool only proves the digits satisfy the published weighted modulo-10 rule. Active entitlement, patient identity, and IRN status require a Services Australia or practice system lookup.
What does the Australia Medicare check digit tool cost?
The browser tool is free and runs locally.
What is the tenth digit on a Medicare card?
It is the issue number printed on the physical card, and it plays no part in the check digit, which comes only from the first eight digits. An issue number of zero is refused as invalid.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/enc/medicare-australia \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"number":"21234567"}'const res = await fetch("https://api.kit.forhosting.com/enc/medicare-australia", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"number": "21234567"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/medicare-australia",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"number": "21234567"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/medicare-australia", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"number":"21234567"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"number":"21234567"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/medicare-australia", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"number": "21234567"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.medicare_australia",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Australian Medicare cards carry a ten-digit number: eight base digits, one check digit, and one issue number. Non-numeric input, wrong lengths, and a zero issue number fail with invalid_input instead of a silent false. The same pure arithmetic powers the free browser tool and the API path at $0.002 per successful call.
Input contract, modes, and error behaviour
Digits zero through nine are required; optional spaces and hyphens are stripped so common display forms such as two-one-two-three space four-five-six-seven-zero space one are accepted and normalised. Mode validate accepts exactly nine digits (base plus check) or ten digits (base plus check plus issue number). Wrong length is an explicit error that names the mode and the length you sent. Empty strings, missing number, and invalid mode values fail before any weighted sum runs and are not billed. POST a JSON body with a required number field holding the Medicare digits. Letters, decimal points, slashes, and other punctuation are rejected as non-numeric input with invalid_input so a half-cleaned value never reaches storage. Mode compute is the default: the engine requires exactly eight base digits, enforces that the first digit is in the published range two through six, returns check_digit as a one-character string, with_check as the nine-digit base-plus-check string, and weighted_sum as the integer sum before the modulo. For ten-digit input the issue number must not be zero; a zero issue fails with invalid_input before any soft validity flag is returned. On success validate reports valid true when the ninth digit matches the recomputed expected_check_digit, and always includes base, check_digit, expected_check_digit, weighted_sum, length, and algorithm medicare-mod10. When the string is well formed but fails the checksum, the call still succeeds with valid false—so data-quality jobs can quarantine rows without treating a mistyped card as a transport error. Alias keys such as digits, medicare, card, and code map to the same payload field so integrations that already speak medicare do not need a rename. Because the path is pure parse with no clock or network, the same JSON body always yields the same JSON result on the free browser tool and on the API at $0.002 per successful request.
Where a Medicare check digit earns its keep in real workflows
Practice-management and pathology systems recompute the modulo-ten remainder client-side or via API and block save when valid is false, showing expected_check_digit so staff can correct a mistyped last digit of the body without re-entering the whole card.
Integration use cases
Telehealth and portal KYC checks
Recompute the check digit before enabling claims or bookings and show expected_check_digit when a patient pastes a mistyped ninth digit.
Technical questions
What does a successful response look like?
Compute returns check_digit, with_check, weighted_sum, and algorithm medicare-mod10. Validate returns valid, base, check_digit, expected_check_digit, and weighted_sum. Checksum failures return valid false without throwing.