How this calculator works
A month is complete when the same day number has been reached in a later month, or when the last day of a shorter month has been reached. That end-of-month rule is why January 31 to February 28 counts as one month. The remaining days are measured from the last complete monthly anniversary, so the month count and the leftover days always add back up to the calendar.
Formula
months = the largest m such that addMonths(date of birth, m) is not after the as-of date, where addMonths clamps the day to the target month's length. leftover days = O(as-of) - O(addMonths(date of birth, months)).
Worked example
Born 1990-05-20 and measured on 2026-11-01, you are 437 whole months and 12 days old. That is 36 years and 5 months, with 12 days after the October anniversary.
Advertisement
Frequently asked questions
Why not divide the days by 30?
Months are 28 to 31 days, so a 30-day average drifts by several days a year. The calendar rule moves month by month on the actual dates, which is what paediatric charts and contracts mean by a month.
What happens for a February 29 birth?
In a common year the anniversary is February 28, so the month count advances there. This matches the age page and most administrative conventions; a few jurisdictions use March 1 instead.
Are the leftover days part of a month?
No. The answer is deliberately split into whole months plus a remainder of zero to thirty days. The years, months and days breakdown converts the whole months into years and months.
Can I use this for a baby's age?
Yes, and it is the usual way to quote an infant's age before two years. The baby age page adds weeks and developmental milestones if you need those.