Calculate individual taxpayer check digits.
Initialising algorithm engine for Brazilian CPF Check Digit Calculator...
How Brazilian CPF Check Digit Calculator Works?
The Brazilian CPF Check Digit Calculator works by computing 2 modulus 11 digits: the first with weights 10 down to 2 over 9 digits, and the second with weights 11 down to 2 over 10 digits.
- 1Enter the first 9 digits of the Cadastro de Pessoas Físicas (CPF).
- 2Multiply by 10, 9, … 2, sum, and take r = S mod 11; the first digit is 0 when r < 2, else 11 − r.
- 3Append the first digit.
- 4Multiply the 10 digits by 11, 10, … 2, sum, and apply the same rule for the second digit.
- 5Format as XXX.XXX.XXX-XX.
Brazilian CPF Check Digit Calculator Formula
The CPF formula is DVₖ = 0 if (Sₖ mod 11) < 2, else 11 − (Sₖ mod 11), applied twice.
S₁ = Σ dᵢ × (11 − i), i = 1…9 DV₁ = 0 if S₁ mod 11 < 2 else 11 − (S₁ mod 11) S₂ = Σ dᵢ × (12 − i), i = 1…10 (DV₁ included) DV₂ = 0 if S₂ mod 11 < 2 else 11 − (S₂ mod 11)
d₉shows the fiscal region that issued the CPF.
S₁ = 162, r = 8, DV₁ = 3 S₂ = 204, r = 6, DV₂ = 5 CPF = 111.444.777-35
Brazilian CPF Check Digit Calculator Conversion Table
The CPF conversion table lists sample bases with both check digits and the fiscal region digit.
| Base | 9th digit region | DV | CPF |
|---|---|---|---|
| 111444777 | 7 – RJ, ES | 35 | 111.444.777-35 |
| 123456789 | 9 – PR, SC | 09 | 123.456.789-09 |
| 529982247 | 7 – RJ, ES | 25 | 529.982.247-25 |
| 390533447 | 7 – RJ, ES | 05 | 390.533.447-05 |
| 000000001 | 1 – DF, GO, MS, MT, TO | 91 | 000.000.001-91 |
| 987654328 | 8 – SP | 86 | 987.654.328-86 |
What is Brazilian CPF Check Digit Calculator?
A Brazilian CPF Check Digit Calculator is a tool that computes the 2 check digits of an 11-digit Brazilian individual taxpayer number. The Receita Federal issues the CPF.
Sequences of 1 repeated digit (such as 111.111.111-11) pass the formula but are not valid CPFs, so validators reject them separately.
What are the uses of Brazilian CPF Check Digit Calculator?
There are 3 main uses of the Brazilian CPF Check Digit Calculator, including e-commerce checkout, Pix registration, and invoicing.
- E-commerce checkout: Brazilian stores require a CPF for invoices (NF-e).
- Pix keys: Banks validate CPFs registered as Pix keys.
- Invoicing: Companies check CPFs on electronic invoices.