How the VIN check digit is calculated, worked through
The ninth character of a vehicle identification number is not about the car. It is arithmetic on the other sixteen, there to catch a mistyped VIN before it reaches a registration, an insurance policy or a parts order.
Written · Updated
Turn each of the 17 characters into a number (digits as themselves, letters by a fixed table), multiply each by the weight for its position, add the 17 products, and divide by 11. The remainder is the check digit, written as X when it is 10. A VIN whose ninth character does not match was mistyped, or is not a valid North American VIN. The rule is set out in the United States’ 49 CFR Part 565 and is used in Canada too; the international standard, ISO 3779, does not require a check digit, so a European or Japanese VIN may fail the check and be perfectly genuine. CHECKDIGIT checks a VIN, or a pasted column of them, in the browser tab.
The letter values
I, O and Q are never used in a VIN, so they cannot be confused with 1 and 0. The other letters take these values:
| Letters | Values |
|---|---|
| A B C D E F G H | 1 2 3 4 5 6 7 8 |
| J K L M N | 1 2 3 4 5 |
| P | 7 |
| R | 9 |
| S T U V W X Y Z | 2 3 4 5 6 7 8 9 |
It looks irregular because it follows the old punched-card codes for letters, which numbered A to I, J to R and S to Z each from the start, with gaps where I, O and Q would be: there is no 9 among A to H because I is gone, and no 6 or 8 among J to R because O and Q are.
The weights
Position by position, from the first character to the seventeenth:
8 7 6 5 4 3 2 10 0 9 8 7 6 5 4 3 2
Position 9, the check digit itself, has a weight of 0, so it takes no part in its own calculation.
A worked example
Take 1M8GDM9AXKP042788, the example VIN used in many references.
| Position | Character | Value | Weight | Product |
|---|---|---|---|---|
| 1 | 1 | 1 | 8 | 8 |
| 2 | M | 4 | 7 | 28 |
| 3 | 8 | 8 | 6 | 48 |
| 4 | G | 7 | 5 | 35 |
| 5 | D | 4 | 4 | 16 |
| 6 | M | 4 | 3 | 12 |
| 7 | 9 | 9 | 2 | 18 |
| 8 | A | 1 | 10 | 10 |
| 9 | X | (check) | 0 | 0 |
| 10 | K | 2 | 9 | 18 |
| 11 | P | 7 | 8 | 56 |
| 12 | 0 | 0 | 7 | 0 |
| 13 | 4 | 4 | 6 | 24 |
| 14 | 2 | 2 | 5 | 10 |
| 15 | 7 | 7 | 4 | 28 |
| 16 | 8 | 8 | 3 | 24 |
| 17 | 8 | 8 | 2 | 16 |
The products add up to 351. 351 ÷ 11 is 31 remainder 10, and a remainder of 10 is written X, which is the ninth character. The VIN passes.
What the check catches, and what it does not
Dividing by 11, a prime, with weights that differ from position to position means that changing any single character to a different value changes the remainder, so any one mistyped character is caught, with one exception: two characters that share a value, such as A and J (both 1) or E and 5, can be swapped for each other without changing the sum. Most transpositions of two neighbouring characters are caught too, but not all.
Passing the check says the VIN was copied correctly, or was made up by someone who knew the arithmetic. It says nothing about whether the vehicle exists, whether it is the car in front of you, or whether it has been stolen or written off. A cloned car usually carries a real, valid VIN copied from another vehicle, and passes the check perfectly. For history, use the official services: in the US, NHTSA’s VIN decoder and recall lookup and an NMVTIS report; in the UK, the DVLA’s vehicle enquiry service and a private history check.
When the VIN is not North American
ISO 3779, the international VIN standard, fixes the structure (a world manufacturer identifier, a descriptor section, an indicator section) but leaves the check digit optional. Vehicles built for North America carry one; so do vehicles for China, which adopted the same rule. Many European and Japanese vehicles have a ninth character that is not a check digit. A failed check on a non-North American VIN is not evidence of anything.
Checking one in the browser
CHECKDIGIT checks a VIN against position 9, and says what the digit should have been when it fails, which usually points straight at the mistyped character. Paste a column of VINs from a spreadsheet to check a fleet list at once and save the results as CSV. It also checks card numbers, IBANs, ISBNs, barcodes, UK VAT numbers, US routing numbers, ISSNs and IMEIs by their own rules. Nothing is looked up and nothing typed leaves the tab. Checking is free; saving the results is part of OBSCURA Pro.
Questions people ask about How the VIN check digit is calculated, worked through
How is the VIN check digit calculated?
Convert each character to a number (letters by a fixed table), multiply by the weights 8 7 6 5 4 3 2 10 0 9 8 7 6 5 4 3 2, add the products and divide by 11. The remainder is the ninth character, or X if it is 10.
What is the ninth digit of a VIN?
On a North American VIN it is a check digit worked out from the other sixteen characters, used to catch mistyped VINs. It says nothing about the vehicle.
What are the letter values for a VIN check digit?
A to H are 1 to 8, J to N are 1 to 5, P is 7, R is 9, and S to Z are 2 to 9. I, O and Q are not used in VINs.
Why does a European VIN fail the check digit?
ISO 3779, the international standard, does not require a check digit. Vehicles built for North America and China have one; many others do not, so their ninth character need not pass.
Does a valid VIN check digit mean the car is genuine?
No. It means the VIN was written correctly. A cloned vehicle usually carries a real VIN copied from another car and passes. Use an official history check.
What does X mean in a VIN?
In position 9, X stands for a remainder of 10 in the check digit calculation. Elsewhere it is an ordinary character with the value 7.
Related
- Why a bar chart has to start at zeroA bar says “this much” by its length, so a cut axis draws a different number.
- When the mean is the wrong averageThe mean is a balance point, so one large value drags it. Four ways to tell when it is misleading, and the one property only the mean has.
- Benford's law, and when it tells you nothingThe most misapplied result in auditing. Which columns the leading-digit test holds for, the five kinds it never will, the tests that need no assumption at all, and the threshold test that catches real splitting.
- Why a random sample needs a seed“Randomly” is unfalsifiable in both directions. A seed turns the draw into something anybody can reproduce and check.
- What “days between” actually meansMonday to Wednesday is two days or three, and clear days makes it one. Plus why adding a month to the 31st has two defensible answers.
A letter, now and then
An occasional letter when there is something worth reading: the new guides and what changed in the tools. Never more than once a month and nothing else, and you can leave at any time on the unsubscribe page.