How this calculator works
Age is not a single number: it is a calendar interval measured in completed years, then whole months, then leftover days. To reverse it, the years and months are subtracted from the reference date on the calendar, the leftover days are subtracted as exact days, and the result is checked against the forward calculation. The check matters because month lengths differ: subtracting 30 days and subtracting one month are not the same operation, and a date near a month end can otherwise land a day early or late.
Formula
Forward: years and months are stepped back from the reference date with end-of-month clamping, then days are subtracted. The date qualifies when ageParts(candidate, reference) returns exactly the requested years, months and days. Reverse: age = completed years, then whole months from the last birthday, then days from the last monthly anniversary.
Worked example
An age of 30 years, 5 months and 12 days on 2026-11-01 gives a date of birth of 1996-05-20. Going the other way, a birth date of 1990-05-20 measured on 2026-11-01 gives 36 years, 5 months and 12 days, or 13,314 days in total.
Advertisement
Frequently asked questions
Why can a combination of years, months and days fail?
A month is not a fixed number of days, so not every combination matches a real interval ending on the chosen date. If the calculator rejects a value, move the day part by one and check the resulting date against the birthday you expect.
How is a February 29 birth handled?
The anniversary is placed on February 28 in common years, so the years and months advance there. If you need the March 1 convention used by some documents, adjust the day part by one.
Does the time of day matter?
No. Both directions work in whole days with no clock time and no time zone. A birth certificate time would only shift the answer by less than a day, which does not change the date.
Is this the same as the age calculator?
The age calculator goes from a birth date to an age. This page also reverses the direction so you can recover a birth date from an age, which is useful for genealogy, forms and eligibility checks.