VIN Check Digit: How to Calculate the 9th Digit

The VIN check digit is the 9th character, calculated from the other 16 with weights and mod 11. Full worked example, a code snippet and what a pass proves.

The VIN check digit is the 9th character of a 17-character VIN, and it is calculated from the other 16 characters so that a mistyped VIN can be caught. To calculate it, turn each letter into a number, multiply each character by a fixed weight for its position, add everything up and divide by 11: the remainder is the check digit, and a remainder of 10 is written as X.

That is the whole idea. The rest of this guide shows the exact rule from federal regulations, a full calculation on a real-pattern VIN, a short code snippet you can reuse, and what a passing or failing check digit actually tells you.

If you are new to VINs, start with our guide to how to read a VIN, which covers all 17 positions. This post stays on position 9.

What the VIN check digit is

Part 565 defines a check digit as "a single number or the letter X used to verify the accuracy of the transcription of the vehicle identification number." In plain terms, it is a checksum. The manufacturer picks the other 16 characters first, then runs them through a formula, and the result goes in position 9.

When anyone later types or copies the VIN, they can run the same formula. If the answer does not match the 9th character, at least one character is wrong.

Under 49 CFR 565.13(c), the check digit has to appear in position 9 both on the vehicle and on the transfer documents the manufacturer prepares for the first owner. So the check digit you see on the VIN plate at the base of the windshield should match the one on the original paperwork.

The 9th digit carries no information about the vehicle itself. It does not tell you the engine, plant, or year. Those live in other positions; for example, the 10th character is the model year.

The rule in 49 CFR 565.15(c)

The calculation is set out in 49 CFR 565.15(c). It has four steps.

Step 1: give every character a number. Digits keep their own value. Letters get the value in Table III of the regulation:

LettersValue
A, J1
B, K, S2
C, L, T3
D, M, U4
E, N, V5
F, W6
G, P, X7
H, Y8
R, Z9

There are no values for I, O or Q. Section 565.13(g) only allows the letters ABCDEFGHJKLMNPRSTUVWXYZ and the digits 0–9 in a VIN, so those three letters never appear.

Step 2: multiply each value by the weight for its position (Table IV):

Position1234567891011121314151617
Weight876543210098765432

Position 9 has a weight of 0, so the check digit does not count toward its own calculation.

Step 3: add the 17 products and divide by 11.

Step 4: the remainder is the check digit. Table V lists the remainders 0 through 10 (also written as fractions such as 4/11, or decimals such as 0.364). Remainders 0–9 give check digits 0–9, and a remainder of 10 gives X.

Canada uses the same scheme. Standard 115 of the Canadian Motor Vehicle Safety Regulations says the ninth character "shall be the check digit," so vehicles built for the Canadian market carry one too.

Worked example: calculating a check digit step by step

We built a sample VIN on a real 2023 Toyota Camry pattern, 4T1G11AK9PU123456, and calculated position 9 by hand. The serial number (123456) is made up, so this is not a real car.

PositionCharacterAssigned valueWeightProduct
144832
2T3721
31166
4G7535
51144
61133
7A122
8K21020
99(check digit)00
10P7963
11U4832
121177
1322612
1433515
1544416
1655315
1766212
Total295

Now divide: 295 ÷ 11 = 26, remainder 9 (26 × 11 = 286, and 295 − 286 = 9). The 9th character of the VIN is 9, so the check digit is valid.

We confirmed this with the NHTSA vPIC API in October 2026. vPIC decoded 4T1G11AK9PU123456 as a 2023 Toyota Camry SE with a 2.5L engine, built in Georgetown, and returned "0 - VIN decoded clean. Check Digit (9th position) is correct."

Then we changed one thing at a time:

VIN testedChangeCheck digit the math expectsvPIC result
4T1G11AK9PU123456None9Check digit correct
4T1G11AK9PU123465Last two digits swappedX"Check Digit (9th position) does not calculate properly"
4T1G11AK9PU128456One digit mistyped (3 to 8)1"Check Digit (9th position) does not calculate properly"
4T1G11AK9PU12345OLast digit typed as the letter On/aCheck digit error plus "Invalid Characters Present"

Note that vPIC still returned "2023 Toyota Camry" for the broken VINs, because the year and model come from other positions. A decoder that shows a make and model is not proof the VIN was typed right. You have to look at the check digit result too.

Notepad, pencil and calculator on a car dashboard while working out a VIN check digit by hand

When the check digit is X

When the remainder is 10, the VIN has an X in position 9. That is not a typo. Here is a real-pattern example on a 2023 Ford F-150: 1FTFW1E5XPF123456.

The weighted products add up to 373. 373 ÷ 11 = 33, remainder 10, so the check digit is X. vPIC decoded it as a 2023 Ford F-150 SuperCrew with a 5.0L engine and reported the check digit as correct.

If you are checking a VIN by hand and get a remainder of 10, write X, not 10. The Ford engine code by VIN guide explains what the 5 in position 8 of that VIN means.

Check digit calculator in Python

The rule is simple enough to code in a few lines. This version follows Tables III and IV of Part 565 and rejects I, O and Q:

VALUES = {**{str(d): d for d in range(10)},
          "A": 1, "B": 2, "C": 3, "D": 4, "E": 5, "F": 6, "G": 7, "H": 8,
          "J": 1, "K": 2, "L": 3, "M": 4, "N": 5, "P": 7, "R": 9,
          "S": 2, "T": 3, "U": 4, "V": 5, "W": 6, "X": 7, "Y": 8, "Z": 9}
WEIGHTS = [8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2]

def check_digit(vin: str) -> str:
    vin = vin.upper()
    if len(vin) != 17 or any(c not in VALUES for c in vin):
        raise ValueError("VIN must be 17 characters with no I, O or Q")
    remainder = sum(VALUES[c] * w for c, w in zip(vin, WEIGHTS)) % 11
    return "X" if remainder == 10 else str(remainder)

def is_valid(vin: str) -> bool:
    return check_digit(vin) == vin.upper()[8]

print(check_digit("4T1G11AK9PU123456"))  # 9
print(is_valid("1FTFW1E5XPF123456"))     # True

If you do not want to run code, paste the VIN into our free VIN decoder. It calculates the check digit automatically and shows "Check digit valid" or a mismatch warning next to the decoded year, make, model and plant. For a fuller decode from the federal database, see our guide to the NHTSA VIN decoder, which also reports check digit errors.

Why a VIN fails the check digit test

When a VIN fails, the cause is usually boring. These are the usual suspects:

1. A misread character. The most common slip is reading a 0 as the letter O, or a 1 as the letter I. Since I, O and Q are not allowed in a modern VIN, any VIN containing them is wrong before you even do the math. Other easy mix-ups on worn plates are 8 and B, 5 and S, 2 and Z, and 6 and G.

2. A typo or swapped pair. Typing ...123465 instead of ...123456 changed the expected check digit from 9 to X in our test. Because neighboring positions have different weights, swapping two different characters usually changes the total.

3. A pre-1981 vehicle. The 17-character format with a check digit came in with the 1980s VIN standard. NHTSA says its vPIC decoder "is intended for use on Model Years 1981 and forward," and older vehicles are not included. A classic car's serial number is often shorter than 17 characters and was never built to pass this test.

4. A vehicle built for another market. The check digit rule comes from US (49 CFR 565) and Canadian (Standard 115) regulations. A vehicle made only for sale elsewhere does not have to follow them, and its 9th character may be a filler or a manufacturer code rather than a calculated digit. For example, a made-up VIN in a common European Volkswagen pattern, WVWZZZ1KZ6W123456, failed the vPIC check digit test. Part 565 also exempts certain nonconforming vehicles brought in through a registered importer under 49 CFR 591.5(f) from the 565.15 content requirements, so a grey-market import can carry its original foreign VIN.

5. A VIN that was made up or altered. Someone inventing a VIN, or changing one character to disguise a vehicle, will often get position 9 wrong. This is why a failed check digit on a 1981 or newer US-market vehicle deserves a closer look.

If you get a failure, read the VIN again from the vehicle, not from an ad or a photo. Compare the windshield plate, the driver door label and the title. If all three agree and the VIN still fails on a recent US-market car, treat that as a red flag.

What a valid check digit does not prove

A passing check digit tells you the 17 characters are consistent with each other. That is all. It does not prove:

  • That the VIN belongs to this vehicle. A cloned VIN is copied from a real, legally registered car, so it passes the check perfectly. Cloners put that VIN on a stolen car of the same make and model. Our NICB VIN check guide explains how to screen for theft and salvage records.
  • That the VIN exists. A random VIN has roughly a one in eleven chance of passing by luck. vPIC's answer for our sample Camry VIN was "decoded clean," even though we invented its serial number.
  • That every character is right. Letters that share a value cannot be told apart by the math. A and J are both 1, so 4T1G11JK9PU123456 gives exactly the same check digit as the Camry above. vPIC still flagged it, but because J did not match Toyota's pattern for position 7, not because of the check digit.
  • Anything about the vehicle's history. Title brands, flood damage, odometer rollbacks and open recalls all need separate checks, such as a free VIN check and a title history report.

Use the check digit as a first filter. It catches honest copying mistakes in seconds. Then do the real verification: match the VIN in every location on the vehicle, check that the decoded year, make and model match what you see, and run a theft check before you pay.

Frequently asked questions

What is the 9th digit of a VIN?

The 9th digit of a VIN is the check digit. It is a number from 0 to 9 or the letter X, calculated from the other 16 characters using the formula in 49 CFR 565.15(c), so that copying errors can be caught.

How do you calculate a VIN check digit?

Convert each letter to its assigned number (A=1, B=2 ... with J=1, S=2 and so on), multiply every character by its position weight (8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2), add the 17 products and divide by 11. The remainder is the check digit; a remainder of 10 becomes X.

Why does my VIN say the check digit is invalid?

Usually because one character was misread or mistyped, often a letter O or I typed in place of 0 or 1, or two characters swapped. Recheck the VIN on the vehicle itself. Pre-1981 vehicles and vehicles built for other markets can also fail because the US check digit rule did not apply to them.

Does a valid check digit mean the VIN is real?

No. It only means the 17 characters are consistent with each other. A cloned VIN copied from a real vehicle passes, and some made-up VINs pass by chance. Compare the VIN on the dash, door label and title, and run a theft check.

Is the letter X allowed in a VIN check digit?

Yes. When the remainder after dividing by 11 is 10, the regulation says the letter X is used in position 9. X is the only letter that can appear there.

Sources & official references

  1. eCFR: 49 CFR Part 565, Vehicle Identification Number (VIN) Requirementsecfr.gov

    Sections 565.12, 565.13(c) and (g), and 565.15(c) Tables III to VI: check digit definition, assigned values, weights and remainder table

  2. NHTSA vPIC: Product Information Catalog and Vehicle Listingvpic.nhtsa.dot.gov

    States vPIC is intended for model years 1981 and forward

  3. NHTSA vPIC Vehicle APIvpic.nhtsa.dot.gov

    DecodeVinValues endpoint used to confirm the worked example and error codes, queried October 2026

  4. Canada Motor Vehicle Safety Regulations (C.R.C., c. 1038), Standard 115laws-lois.justice.gc.ca

    Section 115(3)(c): the ninth character shall be the check digit