Skip to main content
Check Digit Calculator
Brazil

Brazilian CPF Check Digit Calculator

Calculate both Brazilian CPF check digits with successive Modulus 11 sums. Follow the changing weights and extended payload.

Last updated:

Government & Identity Numbers

Calculate individual taxpayer check digits.

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

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.

  1. 1Enter the first 9 digits of the Cadastro de Pessoas Físicas (CPF).
  2. 2Multiply by 10, 9, … 2, sum, and take r = S mod 11; the first digit is 0 when r < 2, else 11 − r.
  3. 3Append the first digit.
  4. 4Multiply the 10 digits by 11, 10, … 2, sum, and apply the same rule for the second digit.
  5. 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.
Worked example: 111.444.777-??
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.

Base9th digit regionDVCPF
1114447777 – RJ, ES35111.444.777-35
1234567899 – PR, SC09123.456.789-09
5299822477 – RJ, ES25529.982.247-25
3905334477 – RJ, ES05390.533.447-05
0000000011 – DF, GO, MS, MT, TO91000.000.001-91
9876543288 – SP86987.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.