Greece AFM Tax Number Validator

Validate a Greek taxpayer number (ΑΦΜ) with the modulus-11 check

Ad placeholder (leaderboard)

The Greek AFM (Arithmos Forologikou Mitroou) is the nine-digit tax registration number every individual and business in Greece holds. It appears on invoices, employment contracts, and public-service forms, and the same digits form the EL VAT number. Before trusting an AFM, you can confirm it is internally well-formed using the official modulus-11 check, run here entirely in your browser.

How it works

The ninth digit of an AFM is a check digit derived from the first eight:

  1. Take the first eight digits d1 ... d8.
  2. Weight them by descending powers of two: d1 x 256, d2 x 128, d3 x 64, d4 x 32, d5 x 16, d6 x 8, d7 x 4, d8 x 2.
  3. Sum the eight products.
  4. Compute (sum mod 11) mod 10.
  5. That value must equal the ninth digit.

The double reduction handles the case where sum mod 11 equals 10: the extra mod 10 maps it back to 0.

Example

Validate 090000045 with first eight digits 0 9 0 0 0 0 0 4.

Weighted sum: (0x256)+(9x128)+(0x64)+(0x32)+(0x16)+(0x8)+(0x4)+(4x2) = 1152 + 8 = 1160. 1160 mod 11 = 5, and 5 mod 10 = 5. The ninth digit is 5, so the AFM is valid.

Notes

A valid check digit confirms structure, not active registration. Everything runs locally, so the AFM never leaves your device.

Ad placeholder (rectangle)