Money and Finance

UK VAT Numbers: The Modulus 97 and 9755 Checks Explained

How a UK VAT registration number is structured, how the check digits work, what GD and HA numbers are and how to catch a wrong number before you invoice.

Saizul Amin
Saizul Amin23 Oct 2026 · 3 min read
UK VAT Numbers: The Modulus 97 and 9755 Checks Explained

UK VAT Numbers and Their Check Digits

When you sell to another business, the invoice often needs the customer's VAT number. A mistake can cause problems with returns and reverse charge rules. The UK VAT Number Validator tests the format and the check digits.

The forms of a VAT number

The standard UK VAT number is GB followed by nine digits, often written in groups such as GB 980 7806 84. A business with branches can have a twelve-digit number, which is the nine digits followed by a three-digit branch code. There are two special forms: GD followed by three digits from 000 to 499 for government departments, and HA followed by three digits from 500 to 999 for health authorities.

The check digits

The last two digits of the nine are check digits. To test them, multiply the first seven digits by 8, 7, 6, 5, 4, 3 and 2 and add the products. Add the two check digits. If the total divides by 97 with no remainder, the number passes the original test. A second version of the test, known as 9755, adds 55 to the total before dividing by 97. This was introduced when HMRC began to issue numbers that need it. A number is accepted if either test works.

A worked example

Take 980780684. The products of the first seven digits are 72, 56, 0, 35, 32, 0 and 12, which total 207. Adding the check digits 84 gives 291. Since 291 is 3 times 97, the number passes the first test. The tool shows that the modulus 97 method worked. If the check digits were 85, the total of 292 would not divide by 97, and adding 55 would not help either, so the number would fail.

Using the validator

Paste one number per line. The prefix GB is optional and spaces are ignored. For standard and branch numbers the tool tests the digits and the check. For GD and HA numbers it tests the range. A valid number is shown with GB in front, and the type is named: standard, branch, government or health. A failed line says whether the length, the characters, the check or the range is wrong.

What the check does not show

A passing number could be an unregistered business or an old number. To confirm that a business is VAT registered, use the HMRC VAT number checking service, which tells you if the number is valid and gives the name and address linked to it. Keep a record of the check date for your own files.

Why it matters

Sales to VAT-registered businesses in some cases need the customer's number on the invoice, and wrong numbers can lead to disallowed claims. Online marketplaces and accounting software check the numbers when they are entered, and so should any custom system. Catching the typo at the time of entry is quicker than correcting an invoice later.

Northern Ireland and the EU

After Brexit, a Northern Ireland business that trades goods with the EU has a VAT number beginning with XI. Numbers from other countries have their own formats, which this tool does not cover.

Limits

This is a format and checksum test and not tax advice.

For online sellers

If you sell to businesses abroad or in the UK, ask for the VAT number at checkout and validate its form immediately, so the customer can fix a typo while still on the page. Then confirm it through the official service when you process the order, and keep the reference for the audit trail. For marketplace sales, follow the platform's own rules for VAT evidence.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages