ToolActToolAct

ID Card Age Calculator

Batch parse ID card numbers, calculate ages and statistics

Enter ID Card Numbers

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

  1. Enter ID card numbers in the input box, one per line
  2. Click the "Calculate" button to start parsing
  3. View detailed information for each ID (birth date, age, gender, region)
  4. View statistics (average age, age distribution, etc.)
  5. 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

Extract age and profile fields from Chinese ID numbersPaste one or more 15- or 18-digit Chinese resident ID numbers to validate checksum, region code, birthday, age, and gender from the encoded fields. The 18-digit checksum follows ISO 7064:1983, MOD 11-2 with weights 7-9-10-5-8-4-2-1-6-3-7-9-10-5-8-4-2 and the mapping '10X98765432', and a 15-digit legacy number is internally promoted to its 18-digit form (with 19 as the century prefix) before checking. Use that knowledge to understand why a single digit flip in the body always invalidates the checksum row.
Analyze a batch for age and region distributionUse the summary statistics for total, valid, invalid, average age, min, max, median, gender counts, age bands, and province distribution when cleaning registration or survey data. The province prefix is the first six digits (administrative division code, GB/T 2260), so two IDs starting with 110108 and 110105 are both Beijing but different districts. Treat the regional roll-up as a planning snapshot, and confirm the final cut against the authoritative demographic table before publishing.
Keep ID parsing separate from identity verificationThe tool checks format and checksum logic, but it does not confirm that the person owns the ID, that the document is current, or that the extracted data is legally sufficient. A valid 18-digit string can still describe a revoked, deceased, or fictional identity, and the gender bit is set by the issuing window's parity rule, not by current self-identification. Treat the output as parsed reference data, not as identity verification.
Spot invalid or malformed entries in a pasted listPaste a list of ID numbers and read the invalid rows to catch typos, missing checksum digits, swapped region codes, or 15-digit legacy entries before the file is handed to HR, registration, or finance. The most common failures are transposed digits that still pass the date check, a region code that was retired after a 20xx administrative merger, and copy-pasted full-width characters that fail the digit filter. Catching them at this stage is cheaper than a reconciliation pass downstream.
Check eligibility thresholds against an age-band tableUse the age-band summary to quickly see how many entries fall under exam eligibility, membership tiers, discount thresholds, senior age rules, or insurance age bands without writing custom range-bucketing code on the extracted birth dates. The age is computed against the current date, so a person whose birthday is later in the year is reported one year younger than they will be next month, which matters for any threshold exactly on the cutoff. Run the batch again on the eligibility date itself if the band matters at the edge.

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: Capricorn

Batch 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 | Male

Age 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 = 36

Old 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 checksum

FAQ

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.