· Built around the ID number calculator
Photo: photoGraph on Pexels (free licence)
Every second form in South Africa asks for a date or an ID number: a UIF claim, a retirement annuity, a learner's licence, a leave form. Three small sums sit behind them - your exact age, the number of working days between two dates, and whether an ID number is even well formed. This post works each through the age, days between dates and ID number calculators, with the working shown.
Run your own numbers
The ID number checker starts on the sample number 8001015009087 - a number in the right format that is not a real person's. Type any 13-digit number; nothing you type leaves your browser.
Checked against a published example
- Age: born 5 December 2000, on 15 January 2021 you are 20 years, 1 month and 10 days; born 4 March 2005, on 1 January 2050 you will be 44 years, 9 months and 28 days - Omni Calculator, How Old Am I, worked examples. Our age calculator gives both.
- Check digit: the payload 1789372997 takes the Luhn check digit 4, a total of 56 - Wikipedia, Luhn algorithm. Our ID number checker, given the same digits padded to 13 (0017893729974), also finds 4 correct.
- ID format: YYMMDD SSSS C A Z - date of birth, 0000-4999 female and 5000-9999 male, citizenship 0, 1 or 2, a legacy digit and a Luhn check digit - Wikipedia, South African identity card. Our checker reads all five parts the same way.
- Working days: the public holidays and the Sunday rule are from the Public Holidays Act 36 of 1994, already checked in an earlier CalcSA post; the days between dates calculator is unchanged.
One fix was needed. Our ID number checker treated a citizenship digit of 2 as an error. 2 means a refugee, so a well-formed refugee number showed "Not valid". It now reads "Refugee" and checks the rest of the number as normal.
Worked example 1: your exact age
- Count whole years, then whole months, then the days left over - the way an ID, a licence or a pension counts it (age calculator).
- Born Friday 15 June 1990, on 29 October 2026: 36 years to 15 June 2026, 4 months to 15 October, then 14 days.
- That is 13 285 days, 1 897 weeks and 6 days, or 436 months and 14 days.
- When the day of the month has not come round yet, borrow the days of the previous month: 4 March 2005 to 1 January 2050 borrows December's 31 days, so 1 - 4 + 31 = 28 days.
- The next birthday, 15 June 2027, is 229 days away.
- This person turns 65 on 15 June 2055, so the SARS secondary rebate applies for the whole 2055/56 tax year - you need to be 65 on the last day of the tax year, not on the first.
Worked example 2: working days to the end of the year
- 29 October to 31 December 2026, both days counted, is 64 calendar days (days between dates).
- 18 of them are Saturdays or Sundays.
- Two public holidays fall on weekdays: Day of Reconciliation, Wednesday 16 December, and Christmas, Friday 25 December.
- The Day of Goodwill, 26 December, is a Saturday in 2026 - the Act moves only a Sunday holiday to the Monday, so there is no extra day off.
- 64 - 18 - 2 = 44 working days - the figure a 30-day notice period, a project deadline or leave pay is counted on.
- If Saturdays are working days for you, choose Monday to Saturday - the count goes up by the nine Saturdays, less the one that is a public holiday.
Photo: Leeloo The First on Pexels (free licence)
Worked example 3: reading an ID number
- 800101 is the date of birth, YYMMDD: 1 January 1980 (ID number checker). The century is not stored, so 20 January 2021 and 20 January 1921 look the same.
- 5009 is the sequence number - 5000 or more means male; 0000 to 4999 is female.
- 0 is citizenship: 0 is a South African citizen, 1 a permanent resident, 2 a refugee.
- 8 is the legacy digit - once used for race, it means nothing today.
- 7 is the check digit, worked in example 4.
- This person is 46 on 29 October 2026 - feed the date into the age calculator for years, months and days.
Worked example 4: the check digit by hand
- Add the digits in places 1, 3, 5, 7, 9 and 11: 8 + 0 + 0 + 5 + 0 + 0 = 13.
- Double the digits in places 2, 4, 6, 8, 10 and 12 - 0, 1, 1, 0, 9 and 8 - to 0, 2, 2, 0, 18 and 16.
- Two-digit results add their digits: 18 becomes 9 and 16 becomes 7, so the doubled places add to 0 + 2 + 2 + 0 + 9 + 7 = 20.
- 13 + 20 = 33. The check digit is 10 less the last digit: 10 - 3 = 7 - and the number ends in 7, so it is well formed.
- Mistype the last digit as 8 and the checker says "Wrong - should be 7". One wrong digit is always caught.
- One slip it cannot catch: swapping a 0 and 9 next to each other. 8001015090087 also adds to 33, so it passes - Luhn misses the 09-to-90 swap (Wikipedia, Luhn algorithm).
- A refugee version of the same sample, 8001015009285, also checks out - citizenship 2, check digit 5 - and now reads valid.
Not verified from a primary source: the ID number layout is from Wikipedia's South African identity card article, not from a Department of Home Affairs publication. "Valid" only means the number is well formed - it does not mean Home Affairs issued it, or issued it to the person in front of you. Use the Home Affairs verification channels for that. The Omni Calculator examples are a calculator's own published examples.
What to do this month
- Check the ID number on any form before you submit it - a typo stalls a UIF or SARS claim for weeks (ID number checker).
- Count the working days before a December deadline, with the holidays out (days between dates).
- Work out the tax year you turn 65 or 75, when the extra SARS rebates start (age calculator).
Sources
- Age worked examples: Omni Calculator, How Old Am I, read by CalcSA 16 October 2026.
- Luhn worked example and the 09/90 limitation: Wikipedia, Luhn algorithm, read 16 October 2026.
- ID number format: Wikipedia, South African identity card, read 16 October 2026.
- Public holidays: Public Holidays Act 36 of 1994, gov.za, Public holidays.
- Age rebates: Income Tax Act 58 of 1962, s6(2); SARS, Rates of tax for individuals.
Calculators used in this post
← All posts · Open the ID number calculator