Explanation
What this measures
Age in completed years counts the birthdays that have already happened. It is calendar arithmetic, not a number of days divided by 365.
How to use it
Enter a date of birth and the date you want the age on, both as YYYY-MM-DD. The age-on date can be in the past or the future but cannot come before the birth. A February 29 birthday counts as reached on March 1 in a non-leap year.
A = y − b − k
| A | age in completed years |
|---|---|
| b | year of birth |
| y | year of the age-on date |
| k | 1 if the birthday has not yet come round in year y, otherwise 0 |
A leap-day birthday
| Date of birth | Feb 29, 2000 |
|---|---|
| Age on | Feb 29, 2024 |
| Result | 24 years |
2000-02-29 to 2024-02-29 spans 8,766 days and 24 birthdays, so the age is 24 completed years.
The day before a birthday
| Date of birth | Oct 20, 2000 |
|---|---|
| Age on | Oct 19, 2024 |
| Result | 23 years |
2000-10-20 to 2024-10-19 spans 8,765 days and 23 birthdays, so the age is 23 completed years.
On the day of birth
| Date of birth | Jan 1, 2020 |
|---|---|
| Age on | Jan 1, 2020 |
| Result | 0 years |
2020-01-01 to 2020-01-01 spans 0 days and 0 birthdays, so the age is 0 completed years.
Diagram of this result
The diagram draws a timeline from the date of birth to the age-on date, marks round birthdays along it, and states the completed years and the total days.
A text summary gives the same two dates, the completed years and the elapsed days.
Common mistakes
Dividing elapsed days by 365 goes wrong around leap years and birthdays. Check the age-on date instead of assuming today. The leap-day convention here is mathematical and may differ from a legal age rule.
Limits and assumptions
Gregorian calendar dates from 0001 through 9999. No clock, timezone or legal adulthood rules. February 29 birthdays count as reached on March 1 in non-leap years.
Sources
Gregorian leap-year rule and civil date arithmetic. Independent checks include a leap-day birthday and the day before a birthday.
Why ask for an age-on date?
An explicit date makes the result reproducible and lets you find an age at a past or future event without relying on your device clock.