# Others Letter DNI how is it calculated and what is it for? The DNI or National Identity Document is a document issued …

The DNI or National Identity Document is a document issued by the Ministry of the Interior through the National Police stations and whose objective is to identify all people who have Spanish nationality. This document is made up of several elements, but one of the ones that raises the most doubts is the DNI letter.

## What is the DNI letter?

The Letter DNI appears in this document since 1995, just after the identification number. It is not added randomly, but rather a mathematical formula is followed to see which is the letter that corresponds to each identification number. Once assigned, the letter is forever.

The objective that this letter fulfills is verify that the number that contains the DNI is a correct number, thus proving that it is not a forgery.

## How is the DNI letter calculated?

The Royal Decree 1553/2005, of December 23, is the one that collects the calculation algorithm that must be followed to determine which letter corresponds to each DNI number.

To determine which is the letter of a specific DNI number divide that number by 23 and the remainder is replaced by a letter which is determined according to the following values:

• Rest 0 corresponds to the letter T
• Rest 1 corresponds to the letter R
• Rest 2 corresponds to the letter W
• Rest 3 corresponds to the letter A
• Rest 4 corresponds to the letter G
• Rest 5 corresponds to the letter M
• Rest 6 corresponds to the letter Y
• Rest 7 corresponds to the letter F
• Rest 8 corresponds to the letter P
• Rest 9 corresponds to the letter D
• Rest 10 corresponds to the letter X
• Rest 11 corresponds to the letter B
• Rest 12 corresponds to the letter N
• Rest 13 corresponds to the letter J
• Rest 14 corresponds to the letter Z
• Rest 15 corresponds to the letter S
• Rest 16 corresponds to the letter Q
• Rest 17 corresponds to the letter V
• Remainder 18 corresponds to the letter H
• Rest 19 corresponds to the letter L
• Remainder 20 corresponds to the letter C
• Remainder 21 corresponds to the letter K
• Rest 22 corresponds to the letter E

In the case of NIE of foreigners residing in Spain, this document consists of a letter that can be X, Y, Z, a total of 7 numbers and a control digit. In this case to calculate the check digit X is replaced by 0, Y by 1 and Z by 2, applying the same algorithm as for the DNI.

## Calculate the DNI letter online

Nowadays it is very easy to know the letter of the DNI that corresponds to each number. There are websites like Calculate letter or Lyricsnif In which, by entering the Tax Identification Number (NIF), it is indicated which is the corresponding letter.

The DNI is a mandatory document. In recent years some changes have been made and now we have the Electronic DNI, with which in addition to identifying ourselves we can do some more procedures to be able to use it as an electronic signature.