(Carl Court / Staff / Getty Images)

If you go to register or insure a car, someone is bound to ask you for its VIN. Short for Vehicle Identification Number, the VIN is a 17-digit number – actually a series of numbers and letters that uniquely identify your car.

The VIN is also handy for tracking the history of any used car you might be thinking of buying. Services such as CarFax and AutoCheck track every record that a car has generated over its lifespan by using its VIN.

If 17 digits seems like a lot, it helps to understand that the VIN is a code that identifies not only your particular car, but where it was built, by whom, and many of the features and options it contains. It also includes a semi-secret code to help potential buyers (and lien holders and lawyers) to validate the accuracy of the VIN to deter counterfeiters.

VINs on cars built since 1981 will look something like this: 4Y1SL65848Z411439. (Except that decoding that one won’t pan out, since to protect anonymity we made it up – as you’ll see later.) That’s when the International Standards Organization (ISO) devised the code that all cars follow today and what each digit in each location means. Each digit will contain a numeral from zero to nine, or any letter of the English alphabet except “I,” “O,” or “Q” to save confusion with the numbers one and zero.

It’s helpful to parse out the various parts of the VIN, to help see what you’re looking at: 4Y1-SL658-4-8-Z-41-1439. We’ll take a look at each of the different sections below.

[Read: Which Car History Report Is Right for You?

Build Location

The first digit of all VINs (again, since 1981), denotes the country where the car was built. In these days of global manufacturing, there’s a lot of confusion about the country of origin of most cars. The National Highway Traffic Safety Administration (NHTSA) tracks what percentage of a car is built where, but that’s too granular for most people. To simplify matters, the first digit of the VIN simply signifies the country where final assembly takes place.

Most cars sold in the America come from the United States, Canada, Mexico, Japan, Korea, Germany, England, Sweden, and Italy. Each of those countries has its own designation to start of the VIN sequence. Some have several. Cars built in the U.S. will have VINs starting with one, four, or five. Canada is two. Mexico three. Cars built in Japan start with “J.” Germany is “W” (a holdover from West Germany.)

Some countries need two letters to start off, because they share a first digit with their neighbors. Thus, Korean cars start with the letters “KL,” “KM,” “KN,” “KP” (remember there’s no “O” or “Q”), or “KR.” Cars from Italy range from “ZA” to “ZR.” British cars start with an “S,” followed by any letter from A-M.

Manufacturer

(Georges DeKeerle / Contributor / Getty Images)

When the second digit isn’t needed to further specify the country of origin, it is used to denote the manufacturer. So, for example, a VIN that starts with 1G, is a General Motors car built in the United States. General Motors uses the third digit to denote each of its individual brands, such as the number one for Chevrolet cars, the number four for Buicks, and “C” for Chevrolet trucks.

In cases where the country of origin takes up the first two digits, the third can be used to designate the manufacturer. In some cases, the number nine is used as a placeholder in the third digit for manufacturers who make fewer than 2,000 cars a year in North America (or fewer than 500 in Europe.)

[Read: 10 Things to Look for When Buying a Used Car]

Type of Car and Features

Digits four through eight signify particular attributes of the car. For example, whether it’s an SUV or a car and how many doors it has. They may also denote the trim level. Critically, these digits are also used to denote certain safety equipment in the car, such as air bags and electronic stability control, which can help accident investigators identify the factors that contributed to accidents or injuries.

Also, these digits will generally enumerate what engine and transmission are in the car and, for example, whether it’s all-wheel drive or two-wheel drive. For most manufacturers, the eighth digit signifies the engine. These digits are also invaluable for the car collecting and insurance industries as a record of how the car was built from the factory to show whether any owners have modified it along the way.

Check Digit

The ninth position of a North American VINs is known as the check digit. It can be any number from zero to nine, or it can be an “X” which denotes 10. The check digit helps investigators verify that the VIN is valid, by using a coded mathematical equation adding up, multiplying, and dividing all the digits in the VIN according to a coded chart.

We’ll learn more about how to use the check digit later

Model Year

(tomeng / Getty Images)

The tenth digit denotes the model year of the car, as designated by the manufacturer. We’ve found it an important tool when shopping for a used car. Registrations should match up with this model-year designation, but we’ve found they don’t always when a new car is sold very early or late in the model year. The actual model year designation from the manufacturer can determine what safety or emissions equipment, for example, came on the car.

The model year will be designated by a number from one to nine, or any letter of the English alphabet except “I,” “O,” or “Q.” The year 1980 starts with “A,” and the sequence essentially repeats every 30 years. Conveniently for buyers of late-model cars, 2001 is designated with a 1, 2002 with a 2, etc., through 2009. 2010 starts over with “A;” 2016s are “G,” 2017s “H;” 2018s will skip to “J.”

Build Factory

In North America, the 11th digit usually designates what factory built the car. High volume sellers such as the Ford F-150 may be built at multiple factories. In that case, different factories often build different versions of the truck; for example, long-bed F-150’s with the optional Payload Package are built exclusively at Ford’s Kansas City, Mo. factory (alongside other versions.) The Dearborn, Mich. factory that also builds F-150s doesn’t build that version.

[Read: Your Guide to Buying a Car Out of State

Serial Number

The last six digits of the VIN are the only part of a serial number that existed 50 years ago: a six-digit number that’s essentially sequential to differentiate, say, your blue Quad Cab Ford F-150 V8 from the other one in the mall parking lot.

Some automakers will also include designations for other options here, such as turbocharged engine upgrades or paint colors. That works especially well for lower-volume automakers who aren’t likely to build a million of any particular model.

Decoding a VIN

(zenstock / Getty Images)

Decoding a VIN requires a table to transliterate letters to numbers, one to nine. The table starts simply enough, with “A” equal to the number one, “B” equal to the number two, etc., through “H,” which is equal to the number eight. Since there’s no “I” in VINs, “J” goes back to the number one. The letter “O” would be the number six, but it gets skipped; “P” is the number seven. “Q” (8) is skipped, and “R” is the number nine. “S” doesn’t start over at the number one, but gets the number two instead, through “Z,” being the number nine. So far, so good.

Once you’ve transposed all the VIN’s digits to numbers, each digit also gets a weight. The first digit gets an eight, and the weights drop by one through the seventh digit, which gets a two. The eighth digit goes back up to 10; the ninth (the check digit), a zero. After that each digit again drops by one (from the eighth digit’s 10), so the tenth gets a nine, all the way to a two at the 17th digit.

Multiply each digit’s number from the table by its weight, and add the products up across each digit. Take the sum and divide by 11. The remainder should match the check digit.

Let’s use the VIN we provided in the intro as an example: 4Y1SL65848Z411439. Transliterating to just numbers, it becomes: 48123658489411439. Multiplying those digits by the correct weight for each gives us: 32, 56, 6, 10, 12, 18, 10, 80, 0 (the check digit), 72, 72, 28, 6, 5, 16, 9, 18. Adding those together gives us 450. Divided by 11, that equals 40 with a remainder of 10. Since the (ninth) check digit in the original VIN was 4, the VIN is invalid. (Remember, we said we made up that VIN, so the math works.)

What We’ve Learned

Revisiting our example VIN again, 4Y1SL65848Z411439, we can see that it should be a car built in America by Toyota. We don’t know exactly what equipment it has, because the codes embedded in the next five digits are proprietary. We didn’t fork over the money to decode them, but you could, and they would show the trim, the platform, the engine and transmission, and whether the car was all-wheel drive or two-wheel drive, for instance. We might also see what brand name it sold under (Toyota or Scion, for example.)

The number four is the check digit, which we falsified from a real VIN for anonymity (and part of the reason the VIN doesn’t check out.)

The number eight indicates the car is from the 2008 model year.

The factory where it was built is shown by the Z, which would indicate the former GM-Toyota joint-venture NUMMI facility in Fremont, Calif., where Teslas are now built.

The rest is simply the serial number of the car (again, falsified.)

Bonus points and an imaginary prize to any reader who can guess the actual make and model that the original VIN referred to.