Sweden Personnummer Validator
Enter a Swedish personnummer to check its Luhn checksum and parse the birth date.
Result
How it is calculated
The tool removes every non-digit character, so dashes, plus signs and spaces are ignored. A 12-digit entry with the century has its first two digits set aside, and anything that is not 10 digits afterwards is reported as Invalid with no check digit. The first nine digits are multiplied by the weights 2, 1, 2, 1, 2, 1, 2, 1, 2 from the left; any product above 9 has 9 subtracted (the same as adding its two digits). The products are added to a sum S, and the expected check digit is (10 − S mod 10) mod 10. The result is Valid only if that equals the tenth digit you typed and the date part is a real date: month 1 to 12 and a day within that month, or day 61 to 91 for a samordningsnummer (the real day plus 60). 29 February is accepted only in a leap year; with a 12-digit entry the full year decides, with 10 digits any year divisible by 4 is accepted. The tool also shows the expected check digit and the first six digits as YY-MM-DD. It does not test whether the number was actually issued to anyone.
Worked example
Take 811218-9876. The nine digits are 8 1 1 2 1 8 9 8 7. Applying the weights 2,1,2,1,2,1,2,1,2 gives 16, 1, 2, 2, 2, 8, 18, 8, 14. Subtract 9 from every result above 9 to get 7, 1, 2, 2, 2, 8, 9, 8, 5. The sum is 44. The expected check digit is (10 − 4) mod 10 = 6. The number ends in 6 and 18 December 1981 is a real date, so it is reported as Valid, with the birth date part shown as 81-12-18. Changing the last digit to 7 would flag it as Invalid while still showing 6 as the expected check digit.
Common mistakes
- Assuming Valid means the person exists. The checksum and the calendar date are tested, but not whether Skatteverket ever issued the number.
- Typing a 12-digit number and expecting the century to be fully checked. The century is only used for the leap-year rule on 29 February (200002291235 is Valid, 190002291235 is Invalid); otherwise 1981 and 2081 give the same result.
- Entering a number with a digit missing or extra. Anything that is not 10 digits (or 12 with century) is marked Invalid without a check digit.
- Expecting the plus sign used for people over 100 to change the result. Separators are ignored, so + and - are treated the same.
- Reading Invalid as a problem with the person's record when it is usually a typo. A single wrong digit anywhere in the first nine changes the expected check digit, and a day or month that does not exist fails even when the check digit matches.
About this calculator
The Swedish personnummer is the national identity number issued by Skatteverket (the Tax Agency) at birth or on immigration, formatted as YYMMDD-NNNC (or with a plus sign once the holder turns 100): a six-digit birth date, a three-digit serial number, and a final check digit.
That check digit is computed with the Luhn algorithm (mod 10): starting from the rightmost of the first nine digits, alternating digits are doubled, the digits of any two-digit results are summed, all ten values are added together, and the check digit is chosen so the total is a multiple of 10 — the same checksum used to validate credit card numbers.
Because the number embeds a real birth date, it is used far beyond taxation — in banking, BankID authentication, healthcare records, and everyday identification across Sweden — so validating both its format and its Luhn checksum is a common first step before accepting one in a form.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Valid only means the check digit and the date shape fit; it does not tell you the number was ever issued to anyone, so it is useful for catching typos in a form but not for verifying identity. Coordination numbers are accepted too: 811278-9873 passes with a day field of 78, which is 18 plus 60. A 12-digit entry has its century dropped before checking. Are you validating form input or generating test data, and which format does your system store?