Skip to content
LeedyBox
Support

The Turkish Identity Number and Its Check Digits

Every Turkish citizen has an 11-digit T.C. Kimlik Numarası. The last two digits are check digits calculated from the first nine. NVİ, the authority that issues the number, confirms this but does not publish the formula. This guide explains the formula that is in general public use, what it catches, a property that follows from it, and what the number does not tell you.

What the Number Is

The T.C. Kimlik Numarası (Republic of Turkey identity number) is issued by NVİ, the General Directorate of Population and Citizenship Affairs. According to NVİ, a pool of numbers was created in 2000 and assigned to citizens in the order of their civil registry records (district, volume, family and individual sequence numbers). A person receives the number once, and it cannot be changed. It appears on the identity card and is used across public services, banks and many private forms.

NVİ describes the structure in a few sentences: the number has 11 digits, the last two are a verification number, and they are calculated from the first nine with an algorithm. NVİ adds that the algorithm only tells whether a number could be one it issued, and that it shares the algorithm with other public institutions so they can check numbers. The formula itself is not on NVİ's site.

The Formula in Public Use

The formula that circulates publicly, and that validators and libraries widely implement, has two steps. Number the digits d1 to d11 from the left.

  1. 10th digit: add the digits in odd positions (d1 + d3 + d5 + d7 + d9) and multiply by 7, then subtract the sum of the digits in even positions (d2 + d4 + d6 + d8). The last digit of the result (the result modulo 10, taken as a positive number) is d10.
  2. 11th digit: add the first ten digits, including d10. The last digit of the sum is d11.

In addition, the first digit is never 0.

Worked example: for the first nine digits 123456789, the odd positions add up to 1 + 3 + 5 + 7 + 9 = 25 and the even positions to 2 + 4 + 6 + 8 = 20. 25 × 7 − 20 = 155, so d10 = 5. The first ten digits add up to 45 + 5 = 50, so d11 = 0. The full number is 12345678950. This is an illustration, not a real person's number.

Because NVİ does not publish the formula, the LeedyBox validator says on the page that it uses the publicly known formula, and its review notes mark the formula as not confirmed by an official text.

Why the Last Digit Is Always Even

The two steps fit together in a way that is easy to miss. Write O for the sum of the odd-position digits and E for the sum of the even-position digits among the first nine. Then d10 ≡ 7O − E and d11 ≡ O + E + d10 ≡ O + E + 7O − E = 8O (all modulo 10). Eight times any whole number ends in 0, 2, 4, 6 or 8, so under this formula the 11th digit is always even. A number ending in 1, 3, 5, 7 or 9 can be rejected straight away.

What the Check Digits Catch

  • A single wrong digit is always caught. Changing an odd-position digit changes 7O by 7 times the change, and changing an even-position digit changes E; in both cases d10 no longer fits. A wrong d10 or d11 fails its own check.
  • Some swapped digits are not caught. Swapping a neighbouring odd and even digit changes 7O − E by 8 times their difference, which is a multiple of 10 when the digits differ by 5. For example, both 16000000018 and 61000000018 pass, although the first two digits are swapped.
  • The check says nothing about existence. Roughly one in a hundred 11-digit numbers that do not start with 0 has fitting check digits, which is many millions of numbers that were never issued.

What the Number Does Not Reveal

A common belief is that the digits encode the place of birth, the sex or the age. NVİ says the opposite: the number contains no meaningful information about who the person is, their sex, age, religion or place of birth, and a relative's identity details cannot be obtained from a person's number. The check digits are the only part with a rule anyone can calculate.

Using the Number in Software

  • Store the number as an 11-character string. It has no arithmetic meaning, and some systems pad or reformat numeric fields.
  • Run the check on input to catch typing mistakes, then rely on the official service you are integrated with, if any, to confirm identity. A passing check is not identity verification.
  • Treat real numbers as personal data. Keep them out of URLs, logs, error reports and analytics.
  • For test data, use generated numbers that pass the check. The validator makes them in the browser; they may coincide with a real person's number, so never use them as anyone's identity.

Frequently Asked Questions

Is the publicly known formula the official one?

NVİ confirms that the last two digits are calculated from the first nine and that it shares the algorithm with public institutions, but it does not publish the formula. The formula described here is the one in general public use; LeedyBox labels it as such.

Can a T.C. Kimlik Numarası start with 0?

No. In the publicly known rules the first digit is never 0, so an 11-digit number starting with 0 is rejected even if the check digits fit.

Is the last digit really always even?

Under the formula, yes: the 11th digit equals 8 times the sum of the odd-position digits, modulo 10, which is always even.

Can I find out whose number it is?

No. The check uses only the digits, the number carries no personal information according to NVİ, and the validator does not look numbers up anywhere.

Sources

Source: Nüfus ve Vatandaşlık İşleri Genel Müdürlüğü: T.C. Kimlik No İşlemleri · Last checked: