The Danish CPR Number: Structure, Century Rule and the Old Mod 11 Check
How the Danish CPR number encodes date of birth, century and sex, why the mod 11 check is no longer reliable and how to validate CPR numbers correctly.

The Danish CPR Number: Structure, Century Rule and the Old Mod 11 Check
Every person registered in Denmark has a CPR number, and almost every system in Danish society uses it. A surprising number of systems still validate it with a check that has not been reliable since 2007, and wrongly reject real numbers. The Denmark CPR Number Validator decodes numbers correctly; this guide explains how.
What the CPR number is
The Civil Registration System (CPR) assigns a personnummer to everyone born in Denmark or registering residence there. It is used for tax, health care, banking with MitID, schools, voting and public services.
The structure
A CPR number is written DDMMYY-SSSS:
- DDMMYY: date of birth.
- First S: combined with the year, it gives the century.
- Middle digits: serial.
- Last S: odd for men, even for women.
The century rule
The two-digit year needs the seventh digit to tell the century:
- seventh digit 0, 1, 2 or 3: 1900-1999,
- seventh digit 4 or 9: 2000-2036 if the year is 00-36, otherwise 1937-1999,
- seventh digit 5, 6, 7 or 8: 2000-2057 if the year is 00-57, otherwise 1858-1899.
So 070761-4285 belongs to someone born in 1961, while 070720-4285 would belong to someone born in 2020.
The old modulus 11 check
For decades, all CPR numbers satisfied a modulus 11 check: multiply the digits by 4, 3, 2, 7, 6, 5, 4, 3, 2, 1, and the sum is divisible by 11. In 2007, numbers for some popular birth dates ran out, and the CPR office began issuing numbers without this property. Today, a number that fails the check may be perfectly valid.
That means:
- Never reject a CPR number only because it fails mod 11.
- You can still check the date of birth and the length.
- The mod 11 result can be shown as information, for example to warn of a possible typo in older numbers.
Gender in the number
The last digit shows the legal sex at the time of assignment. Since 2014, people who change their legal sex receive a new CPR number with a matching last digit.
Newcomers
People moving to Denmark register their address with the municipality, often through International Citizen Service centres, and receive a CPR number and a yellow health insurance card. Without a CPR number, they cannot open a bank account, see a doctor or get MitID.
Privacy
The CPR number is personal data, and the full number is treated as confidential. Danish law limits its use to cases with a legal basis. Avoid sending it by unencrypted email and limit access to lists. The validator does not upload anything.
Validating correctly
A good validation:
- checks that there are ten digits,
- checks that the date of birth is a real date with the correct century,
- reads the sex from the last digit,
- optionally shows the mod 11 status without rejecting on it.
Worked example
070761-4285: born 7 July 1961, the seventh digit is 4 and the year 61, so the 1900s; the last digit 5 is odd, so male; the number also satisfies the old mod 11 check.
Using the validator
Paste CPR numbers one per line. Each line shows the date of birth, sex and mod 11 status, or why the number is invalid. Export as CSV.
Software checklist
Developers updating CPR validation should remove any hard rejection on mod 11, accept numbers with any seventh digit, compute the century with the rule above and treat the last digit only as the registered legal sex at issue.
Limits
A plausible number does not prove that it was issued or belongs to the person. The CPR register is the authority. This guide is general information.



