In the check digit vs format validation question for TINs, format validation is the only local option. US Social Security numbers, EINs and ITINs carry no check digit, so no formula can catch a mistyped digit. Format validation still rejects impossible lengths, prefixes and ranges, and only IRS name and TIN matching confirms that a number belongs to a payee.
What is a check digit, and how does it catch typos?
A check digit is one extra digit computed from the other digits of a number and stored with it. When someone types the number again, software recomputes the digit and compares. If the two disagree, the number was copied wrong. The scheme catches most single-digit typos and many swaps of neighbouring digits.
The best-known method comes from Hans P. Luhn. His 1960 patent, US 2,950,048, "Computer for verifying numbers", describes a hand-operated device that doubles every second digit, adds the results, and picks a final digit that brings the total to a round figure. The patent says the aim was to catch copying errors, especially the common one of transposing two digits.
Here is the idea on a made-up ten-digit part number, 7992739871, which is not a tax ID. Double every second digit from the right, add the digits of any two-digit result, and sum everything. The sum is 67. The check digit is the amount needed to reach the next multiple of ten, so it is 3, and the full number is 79927398713. Type it later as 79927389713, with the 8 and 9 swapped, and the sum no longer ends in zero. The software flags it before anyone files anything.
A mod-11 scheme works the same way with weights. Each digit is multiplied by a different weight, the products are summed, and the check digit makes the sum divisible by 11. Weighted schemes catch every swap of two neighbouring digits, which the Luhn method misses in one case: doubling turns 0 into 0 and 9 into 9 (18 becomes 1 plus 8), so a swapped 09 and 90 give the same sum.
Neither method knows whether a number was ever issued or who it belongs to. A check digit only proves that the digits are consistent with each other. That limit matters later, because it is the same limit format validation has.
Why US TINs have no check digit
US taxpayer identification numbers (TINs), the nine-digit numbers the IRS uses to identify taxpayers, carry no check digit. The IRS describes SSNs, EINs and ITINs by their length, layout and a few meaningful digit positions. None of those published rules computes one digit from the others, so no formula can tell a mistyped TIN from a correct one.
Look at what the IRS does publish. The General Instructions for Certain Information Returns say SSNs, ITINs and ATINs have nine digits separated by two hyphens (000-00-0000), and EINs have nine digits separated by one hyphen (00-0000000). That is a layout, not a checksum.
For EINs, the IRS page on how EINs are assigned and valid EIN prefixes says the first two digits show the IRS campus that assigned the number, or that it was issued online. The page lists the valid prefixes by location. Andover uses 10 and 12, for example, and the Small Business Administration uses 31. The remaining seven digits have no published meaning and no published check.
For ITINs, IRS Publication 1915 gives a leading 9 and a set of allowed ranges for the fourth and fifth digits, listed in the post on the ITIN middle-digit ranges. Again, those are ranges, not a computed digit.
The practical result is simple. A TIN is either in a valid range or it is not. Within the valid ranges, every combination of digits looks equally plausible to software. The only party that knows which numbers were issued, and to whom, is the agency that issued them.
What format validation catches on TINs that a check digit would miss
Format validation on TINs tests a number against the published layout and ranges for its type: nine digits, the right hyphen pattern, a valid EIN prefix or ITIN range. It catches numbers that cannot exist, including ones a check digit would accept: a consistent number in a range the IRS never issues, or an SSN in an EIN field.
A check digit would only test internal consistency. Format validation tests the number against facts about the numbering system. Those catch different errors:
- Impossible ranges. The EIN prefix list has gaps. No campus or online prefix starts with 07, 70 or 97, for example. An EIN written as 70-XXXXXXX fails format validation even though nothing in the number is internally inconsistent.
- Wrong-type numbers. An ITIN must start with 9 and have a fourth and fifth digit in the published ranges. A number in an ITIN field with 49 in those positions fails, because 49 is in none of the ranges.
- Wrong layout for the field. A payer TIN on a 1099 written as three, two and four digits is shaped like an SSN, not an EIN. That is allowed for a sole proprietor, but on a corporation's form it is worth a second look.
- Length and characters. Eight digits, ten digits, a letter O where a zero belongs, or a stray space all fail before any range test runs.
Format rules are cheap, fast and run anywhere: in a spreadsheet, in a form field, or in an extraction pipeline. The full set of pattern tests, with the SSN and EIN rules spelled out, lives in the post on the pattern tests every tax ID validation should run. This post does not repeat them.
Which typos pass TIN format validation?
Many common typos pass TIN format validation. Any error that turns one valid number into another valid number goes through: a single wrong digit outside the prefix, two swapped digits that land in another valid range, or a whole TIN copied from the wrong payee. Without a check digit, nothing in the number reveals them.
A few examples with masked, made-up numbers show the pattern:
- One wrong digit in the body. An EIN typed as XX-XXX4512 instead of XX-XXX4518 still has a valid prefix and nine digits. It passes.
- A swap inside the prefix that stays valid. An EIN prefix of 12 typed as 21 passes, because 12 is an Andover prefix and 21 is a Brookhaven prefix on the IRS list.
- A swap that lands outside the range. The same swap on prefix 07 or 70 fails both ways, since neither is on the list. Format validation catches this one only by luck of the ranges.
- An ITIN with its middle digits swapped. 9XX-78-XXXX typed as 9XX-87-XXXX passes, because 78 and 87 both fall in the 70 to 88 range. A 9XX-94-XXXX typed as 9XX-49-XXXX fails, because 49 is in no range.
- The right number for the wrong person. A TIN copied from the row above in a spreadsheet passes every format test. It is a real, well-formed number. It just belongs to someone else.
The last case is the most common in practice and the hardest to catch. It is also the reason format validation is a first filter, not a verdict.
Layering TIN checks: format, cross-document match, then IRS matching
TIN checks work best in layers. Format validation runs first and rejects impossible numbers for free. A cross-document match comes second and compares the same payee's TIN across forms, W-9s and prior years. IRS name and TIN matching comes last and is the only step that confirms the pair against IRS records.
The comparison
| Method | What it catches | What it misses | What it costs |
|---|---|---|---|
| Check-digit validation | Most single-digit typos and many neighbour swaps | Issued or not, who owns the number; not available for US TINs at all | Nothing to run, but the number must be designed with a check digit |
| Format validation | Wrong length, wrong characters, impossible EIN prefixes, ITINs outside the ranges, wrong layout for the field | A wrong digit or swap that stays in range; the right number for the wrong payee | A few lines of code or a spreadsheet formula; runs offline |
| Cross-document match | A TIN that differs from the same payee's W-9, prior-year form or other forms | The same wrong TIN copied everywhere | Your own records; a lookup by payee name |
| IRS name and TIN matching | A name and TIN pair that does not match IRS records, or a TIN not currently issued | Address, identity, and anything about people who are not your payees | An IRS e-Services account; open only to eligible payers and their agents |
Applying the layers in order
Start with format, because it costs nothing and removes noise. A pipeline that extracts TINs from forms can test every value as it is read and route failures to a person.
Then compare across documents. If one payee's TIN on this year's 1099-NEC ends in 4518 and last year's ends in 4512, one of them is wrong. A format check would have passed both.
Finish with IRS matching when you are a payer that qualifies. The IRS TIN matching tools page describes the program as a free e-Services tool for payers of reportable payments subject to backup withholding. The post on how IRS TIN Matching checks a name and TIN walks through the request and the result codes.
Schema Tax sits in the first layer only. It tests each extracted TIN against its pattern, such as the EIN's XX-XXXXXXX layout, flags anything that fails for review, and masks the number to its last four digits before storage, as the five-step overview shows. It does not query the IRS.
When not to rely on TIN format validation alone
Do not rely on TIN format validation alone when a wrong number has a cost: backup withholding decisions, information returns you file with the IRS, and any decision about a person's identity or credit. In each case a well-formed TIN can still be the wrong TIN, and only a name match or a document from the payee closes that gap.
Backup withholding. IRS Publication 1281 sets the backup withholding rate at 24% and explains the CP2100 notices the IRS sends payers about missing and incorrect name and TIN combinations. It says a combination is incorrect if it does not match, or cannot be found on, IRS or SSA files. A format check cannot tell you whether a number is on those files.
Information returns. The General Instructions for Certain Information Returns list TIN Matching among the tools that let a payer check a name and TIN before filing, and say payers who do so should receive fewer CP2100 and penalty notices. A 1099 that passes format validation can still produce one of those notices.
Identity and lending decisions. A TIN pattern says nothing about whether the person in front of you is the person the number was issued to. Format validation is a data-quality check, not identity proof.
OCR output. A TIN read from a scan can pass format validation with one digit misread. When a TIN came from OCR, a person comparing it with the form image is often the next useful step. The post on which fields a person should check in OCR output covers how to route those values. For pipelines that pull TINs through an API, the tax form API category collects posts on handling extracted fields in code.
What format validation is good for. It is the right tool for stopping garbage early: a ten-digit EIN, a letter in an SSN, an ITIN that cannot exist. Use it on every value, then treat a pass as "not impossible", never as "correct".