AFM / ΑΦΜ
Generator
Generate properly formatted Greek AFM / ΑΦΜ tax numbers that pass the official Module 11 checksum — for software development and QA testing, entirely in your browser.
About Greek AFM / ΑΦΜ (Tax Identification Number)
The AFM (Arithmos Forologikou Mitroou — Αριθμός Φορολογικού Μητρώου) is the single taxpayer identification number for individuals and corporations in Greece, administered by the Independent Authority for Public Revenue (AADE / IAPR).
It contains exactly 9 decimal digits. The first 8 digits form the base sequential number, and the 9th digit is a check digit calculated using a Module 11 algorithm weighted by decreasing powers of 2.
Check Digit Calculation Algorithm
| Step | Description |
|---|---|
| 1. Weight the first 8 digits | Multiply the first 8 digits by decreasing powers of 2: d1×256, d2×128, d3×64, d4×32, d5×16, d6×8, d7×4, d8×2. |
| 2. Sum the weighted products | Add all 8 weighted multiplication results together. |
| 3. Reduce modulo 11 | Calculate the remainder of the sum divided by 11 (Sum % 11). |
| 4. Reduce modulo 10 | The check digit is the remainder modulo 10 (Remainder % 10). If the remainder is 10, the check digit is 0. |
Frequently Asked Questions & Technical Guidelines
How does AFM integrate into Greece's myDATA platform?
Every invoice submitted to AADE's myDATA platform carries the supplier's (and often the customer's) AFM so the transaction can be matched to the correct taxpayer's digital books. AADE checks the AFM's checksum and registration status before accepting a myDATA submission.
How do I convert an AFM to the European VAT (VIES) format?
Prefix the 9-digit AFM with the country code "EL" — for example, AFM 123456789 becomes EL123456789 — to get Greece's VIES-format VAT number, used for cross-border EU VAT validation.
Are the generated numbers official or real?
No. These are synthetic numbers generated purely to satisfy the AFM checksum formula for software testing and QA. They are not issued by AADE, not linked to any real taxpayer, and must never be used on real invoices, tax filings, or official documents.