Skip to main content
Check Digit Calculator
Government

Portuguese NIF Check Digit Calculator

Calculate a Portuguese NIF control digit with weights from 9 to 2. Follow the Modulus 11 remainder and the zero-mapping rule.

Last updated:

Government & Identity Numbers

Check tax identifier control digits.

Length: 10 chars
Calculated Check Character / Checksum
--Ready
Complete Validated Sequence:
--
Arithmetic Steps & Mathematical Specification

Initialising algorithm engine for Portuguese NIF Check Digit Calculator...

How Portuguese NIF Check Digit Calculator Works?

The Portuguese NIF Check Digit Calculator works by multiplying the first 8 digits by weights 9 down to 2, dividing the sum by 11, and subtracting the remainder from 11. Remainders of 0 and 1 give a check digit of 0.

  1. 1Enter the first 8 digits of the 9-digit Número de Identificação Fiscal (NIF).
  2. 2Multiply the digits by 9, 8, 7, 6, 5, 4, 3, and 2.
  3. 3Add the products and compute the remainder modulo 11.
  4. 4Use 0 when the remainder is 0 or 1; otherwise use 11 − remainder.

Portuguese NIF Check Digit Calculator Formula

The Portuguese NIF formula is Check = 0 if r < 2, else 11 − r, where r = Σ (10 − i)·dᵢ mod 11.

S = 9·d₁ + 8·d₂ + 7·d₃ + 6·d₄ + 5·d₅ + 4·d₆ + 3·d₇ + 2·d₈
r = S mod 11
Check = 0 if r ∈ {0, 1} else 11 − r
  • d₁ shows the taxpayer type.
Worked example: 12345678?
S = 156
r = 2
Check = 9
NIF = 123456789

Portuguese NIF Check Digit Calculator Conversion Table

The Portuguese NIF conversion table lists first-digit types and sample NIFs.

First digitTaxpayer typeSample baseCheckNIF
1Individual123456789123456789
2Individual234567899234567899
4Individual (non-resident)456789014456789014
5Company500000000500000000
6Public body600123456600123456
8Sole trader800000005800000005
9Irregular entity901234567901234567

What is Portuguese NIF Check Digit Calculator?

A Portuguese NIF Check Digit Calculator is a tool that computes the 9th digit of a Portuguese tax identification number issued by the Autoridade Tributária e Aduaneira.

The first digit shows the taxpayer type: 1–3 individuals, 5 companies, 6 public bodies, 8 sole traders, and 9 irregular entities.

What are the uses of Portuguese NIF Check Digit Calculator?

There are 3 main uses of the Portuguese NIF Check Digit Calculator, including invoicing, e-commerce checkout, and supplier records.

  • Invoicing: Portuguese invoices carry the customer NIF on request.
  • E-commerce checkout: Online stores validate NIFs for tax invoices.
  • Supplier records: Procurement teams check supplier NIFs.