Portuguese NIF Number: Format, Digits and Check Digit

5 min read · Updated 21 October 2026 · Reviewed by Ícaro Couto · Ordem dos Advogados n.º 67883F

Start my application

Forms in Portugal ask for your NIF as a nine-digit number, and systems reject a number that fails a simple check. This guide explains how the format works, what the first digits usually mean, and how the check digit is calculated. It is an explanation of the format, not a way to obtain a valid number: only the Tax Authority issues real NIFs.

In short

  • A Portuguese NIF has nine digits; the ninth is a check digit.
  • The first digit generally shows the type of taxpayer: individuals commonly begin with 1, 2 or 3, non-resident individuals with 45, and companies with 5.
  • A number that passes the check is only well formed. It is not proof that the NIF exists or belongs to you: only the Tax Authority issues real NIFs.

The nine digits

The NIF (Número de Identificação Fiscal) is the Portuguese tax identification number. It is permanent and does not change. For the meaning of the letters see What Does NIF Stand For?, and for the full picture What Is a Portuguese NIF?

What the first digit usually means

Starts withTypically issued to
1, 2 or 3Individuals (natural persons)
45Non-resident individuals
5Companies and other legal entities (the NIPC)

Other prefixes exist for public bodies and special entities. If you are unsure whether a number is personal or for a company, see NIPC vs NIF.

How the check digit works

The ninth digit is calculated from the first eight, which lets systems catch typing mistakes:

  1. Multiply the first eight digits by 9, 8, 7, 6, 5, 4, 3 and 2, in that order, and add the results.
  2. Divide the total by 11 and take the remainder.
  3. If the remainder is 0 or 1, the check digit is 0. Otherwise, the check digit is 11 minus the remainder.

If the ninth digit of your number does not match, there is a typo. If it matches, the number is well formed, nothing more.

Lost or unsure of your NIF?

Your NIF never changes, so you can always recover it. See How to Find or Recover Your Portuguese NIF.

Getting a real NIF

Only the Portuguese Tax Authority issues NIFs. If you live abroad, you can apply remotely: typically the NIF is issued in 5–14 business days once your signed documents are received, and, because the Tax Authority can require a non-resident to appoint a fiscal representative once a tax relationship with Portugal arises, NIF Express includes the first year of one. The Tax Authority itself charges nothing; the price covers preparation, the power of attorney, filing support and fiscal representation. After the first year, representation renews every twelve months at the same amount as the period that has just ended, with an email at least 30 days before each charge. See How Much Does a Portuguese NIF Cost? and our terms.

NIF Express is a private consultancy, not a government service: we help you prepare and file, and the Portuguese Tax Authority issues the NIF. See the NIF online service — adult €49.99, minor €74.99.

Check a Portuguese NIF number

Type a nine-digit number to see whether it has a valid NIF format and check digit.

Nine digits. Spaces and dots are ignored.

Passing the check does not mean the NIF exists or who it belongs to. Only the Portuguese Tax Authority (AT) can confirm that.

The check runs in your browser. The number is not sent anywhere or stored.

Frequently asked questions

How many digits does a Portuguese NIF have?

Nine. The last digit is a check digit calculated from the first eight.

What does the first digit of a NIF mean?

It generally shows the type of taxpayer: individuals commonly start with 1, 2 or 3, non-resident individuals with 45 and companies with 5. Other prefixes exist for public bodies and special entities.

How is the NIF check digit calculated?

The first eight digits are multiplied by 9, 8, 7, 6, 5, 4, 3 and 2 and added up. The total is divided by 11; if the remainder is 0 or 1 the check digit is 0, otherwise it is 11 minus the remainder.

Does a number that passes the check exist?

Not necessarily. Passing the check only means the number is well formed. Only the Tax Authority issues real NIFs.

How do I get a real NIF from abroad?

You can apply remotely with a power of attorney and document upload. NIF Express costs €49.99 for an adult and €74.99 for a minor, with the first year of fiscal representation included.

Is NIF Express a government service?

No. It is a private consultancy and the online service of Blue Ocean Immigration. We prepare and file the application; the Portuguese Tax Authority issues the NIF.

Keep reading

Replies and opening hours

Support is open Monday to Friday, 10:00 to 17:00 (Lisbon time).

Once you upload your documents, we review them within 1 business day.

Ready to get your Portuguese NIF?

Five minutes to apply. We handle everything else.

Start my application

See the NIF online service →

The NIF Express app, home screen

Also in the NIF Express app: guided form, secure payment, real-time tracking, 8 languages.

Available on the App Store Get it on Google Play

€49.99 Usually 5–14 business days

Start my application