ID Card Age Calculator
Batch parse ID card numbers, calculate ages and statistics
What is ID Card Age Calculator?
The ID Age Calculator extracts the birth date encoded in a Chinese resident identity card number and calculates the corresponding age. It helps check form entries, membership records, eligibility thresholds, school or exam data, and demographic tables without manually reading the date segment from the ID. The tool only works from the information already present in the number; it is not an official identity verification service and should not encourage storing full ID numbers unnecessarily. For privacy-sensitive or legally binding checks, the original document and the organization’s verification process remain authoritative.
How to Use
How to use
- Enter ID card numbers in the input box, one per line
- Click the "Calculate" button to start parsing
- View detailed information for each ID (birth date, age, gender, region)
- View statistics (average age, age distribution, etc.)
- Optionally copy results or export as CSV file
Privacy and Validation Tips
- ID numbers are sensitive personal data. Process only data you are authorized to handle and avoid sharing exported results casually.
- Checksum validation can catch many typos, but it does not prove that a real person owns the ID number.
- For batch results, review invalid rows before using age distributions or gender statistics in reports.
Use Cases
Technical Principle
The 18-digit Chinese resident identity card defined in GB 11643-1999 packs five fields into a fixed-width string: digits 1-6 are the administrative division code from GB/T 2260, digits 7-14 are the birth date in YYYYMMDD form, digits 15-17 are the issuing sequence number, and digit 18 is an ISO 7064 MOD 11-2 check character. The 15-digit pre-1999 format omits the century prefix and the check digit, so upgrading it means inserting '19' before the YY block and then computing the trailing checksum. The checksum is the heart of validation. Each of the first 17 digits is multiplied by its weight from the sequence 7-9-10-5-8-4-2-1-6-3-7-9-10-5-8-4-2, the weighted sum is taken modulo 11, and the remainder is mapped through the table '1-0-X-9-8-7-6-5-4-3-2'. A remainder of 2 yields the literal character 'X' rather than a digit, which is why the last position must be parsed case-insensitively. Gender is decoded from the parity of digit 17 alone (odd is male, even is female), and the age is the difference of calendar years minus one if today is earlier in the year than the encoded birthday. What the algorithm cannot prove is whether a real person owns the number. A single transposition that keeps the checksum valid will still pass, retired region codes from administrative mergers may no longer resolve in GB/T 2260, and the parity-bit gender reflects the issuing window, not current self-identification. Treat the parse as cheap structural validation and defer real identity proofing to the issuing authority.
- Checksum: ISO 7064:1983 MOD 11-2 over the first 17 digits, with weights 7-9-10-5-8-4-2-1-6-3-7-9-10-5-8-4-2 and the remainder table '10X98765432'.
- Date field: digits 7-14 use YYYYMMDD; reject impossible calendar dates such as 19900230 even when the checksum still happens to compute.
- Region code: digits 1-6 follow GB/T 2260; codes for districts retired after administrative mergers will still pass the checksum but stop resolving to a real district name.
- Legacy 15-digit upgrade: splice '19' between position 6 and position 7, then recompute the MOD 11-2 check digit; this is why a 15-digit number alone has no checksum to verify.
- Gender bit: parity of digit 17, odd is male and even is female, set by the issuing window's sequence allocation and not by self-identification.
- Age boundary: subtract one year when (today's month, day) is earlier than (birth month, day), so a person whose birthday falls later in the year reads one year younger than they will be on their next birthday.
Examples
Parse a single Chinese ID number
Input: 11010119900101****
Region: 110101 → Beijing, Dongcheng District
Birth: 1990-01-01
Gender: digit 17 is odd → Male / even → Female
Age on 2026-06-10: 36 years old
Zodiac: 马 (Horse), Constellation: CapricornBatch processing (one per line)
Input (3 numbers):
11010119900101****
31010119851215****
44030120000628****
Output table:
Beijing | 1990-01-01 | 36 yrs | Male
Shanghai | 1985-12-15 | 40 yrs | Female
Shenzhen | 2000-06-28 | 25 yrs | MaleAge calculation rules (birthday this year?)
DOB: 1990-09-15, Today: 2026-06-10
Birthday this year: 2026-09-15 → hasn't arrived yet
Age = 2026 - 1990 - 1 = 35
DOB: 1990-03-20, Today: 2026-06-10
Birthday already passed in 2026
Age = 2026 - 1990 = 36Old 15-digit ID conversion to 18-digit
Old (15-digit, pre-1999): 110101900101001
Insert century: 110101 + 19 + 900101 + 001 = 110101199001010 01
Append checksum digit (ISO 7064 MOD 11-2 algorithm): X
Final 18-digit: 11010119900101001X
The tool restores the missing 19 century prefix and recomputes
the checksum so the legacy number can be validated.Privacy note — all processing stays local
Pasted IDs are never sent to a server. The page parses the
string in the browser using these positions:
digits 1-6 → administrative region code (GB/T 2260)
digits 7-14 → YYYYMMDD birth date
digits 15-17 → sequence number (odd=male, even=female)
digit 18 → ISO 7064 MOD 11-2 checksumFAQ
Which ID formats are supported?
Mainland China 18-digit and 15-digit citizen ID numbers (居民身份证号). The 15-digit older format is internally upgraded to 18-digit before parsing. The page also displays gender, region of issue (from the area code), and birth date.
How is age computed from the ID?
Digits 7-14 of the 18-digit ID encode the birth date as YYYYMMDD. The page computes age from that date to today, using the legal-age convention (you turn N only after your birthday in the current year).
How is gender derived?
Digit 17 (the second-to-last) encodes gender: odd = male, even = female. The page reads it directly. No external API call.
What does the area code mean?
The first 6 digits encode the registration area at the time of issue: province (1-2), city (3-4), county/district (5-6). Note that this is the place of registration, not necessarily current residence; people often retain ID from their place of household registration (户籍).
How is the checksum digit computed?
The 18th digit (final character) is a Mod-11-2 checksum of the first 17 digits weighted by [7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2]. Result modulo 11 maps to digits 0-9 or X. The page validates this; an invalid check digit means the ID is fake or mistyped.
Is the ID number sent to a server?
No. Parsing and validation run entirely in your browser. The ID does not leave your device. Treat ID numbers as sensitive personal information regardless - do not paste them into any unfamiliar tool.
Why does the page warn me about old 15-digit IDs?
15-digit IDs were issued before 1999 (no century in the year, no checksum). The page upgrades them to 18-digit by inserting '19' as century and computing the checksum, but this assumes the holder was born in the 1900s. People born after 1999 always have 18-digit IDs.