# The VAT number check digit

In the UK, traders and businesses required to be registered for VAT purposes are issued with a VAT registration number by Her Majesty's Revenue and Customs (HMRC) in order to identify their registration. This number is not random or sequential, but actually includes a check digit1 to confirm that the number is genuine and correctly constructed. VAT numbers are issued in the form 123 4567 89. This however, is not a valid VAT number, so for the purposes of this Guide Entry the number 831 4958 16 will be used.

### The calculation

The check digit calculation appears quite complex, but is in fact surprisingly simple. The first seven digits of the VAT number are assigned a multiplier beginning with eight for the first digit and descending to two for the seventh.

8 3 1 4 9 5 8 (The first seven digits)

8 7 6 5 4 3 2 (The multiplier)

64 21 06 20 36 15 16 (The results)

After applying the multiplier, the results are totalled.

64+21+6+20+36+15+16 = 178

From the total, 97 is subtracted as many times as is necessary, until a negative, two digit number is produced.

178-97 = 81

81-97 = -16

This negative number becomes the check digit and relates to the last two digits of a valid VAT number.

1Although it is actually two digits