calc-hub logocalc-hub.net
DatesAgeBirthdaysEveryday MathCalculators

How to Calculate Age From a Date of Birth in Years, Months and Days

T. Krause

Subtract the date of birth from today: days, then months, then years. Born July 19, 1988, you are 38 years, 4 months and 12 days old on December 1, 2026.

To calculate age from a date of birth, subtract the birth date from today's date one part at a time: the days, then the months, then the years. When a part comes out negative, borrow from the part to its left. Someone born on July 19, 1988 is 38 years, 4 months and 12 days old on December 1, 2026.

For age in whole years only, there is a shortcut, covered first below. The full subtraction has two rules to watch. You borrow the days of the right month, and a birthday on the 29th, 30th or 31st needs care in short months. Every age below matches the age calculator run with the same two dates.

How to Calculate Age From a Date of Birth in Years, Months and Days

Age in whole years

Subtract the birth year from the current year. If this year's birthday hasn't come yet, take away 1.

  • Born July 19, 1988, on December 1, 2026: 2026 − 1988 = 38. The birthday in July has passed, so the age is 38.
  • Born October 27, 1995, on March 14, 2026: 2026 − 1995 = 31. The birthday in October is still ahead, so the age is 31 − 1 = 30.

For months and days as well, use the subtraction below.

Age in years, months and days

Write both dates as year, month and day, with the later date on top, and subtract from right to left.

Example 1. Born July 19, 1988, on December 1, 2026.

YearMonthDay
Today2026121
Birth1988719
  1. Days: 1 − 19 is negative, so borrow one month. The month before December is November, which has 30 days. The day becomes 1 + 30 = 31 and the month drops from 12 to 11. Now 31 − 19 = 12 days.
  2. Months: 11 − 7 = 4 months.
  3. Years: 2026 − 1988 = 38 years.

The age is 38 years, 4 months and 12 days. To check, the 38th birthday was July 19, 2026. Four more months end on November 19, 2026, and December 1 is 12 days after that.

Example 2. Born October 27, 1995, on March 14, 2026. This one borrows twice.

  1. Days: 14 − 27 is negative. The month before March is February 2026, which has 28 days. The day becomes 14 + 28 = 42 and the month drops from 3 to 2. Now 42 − 27 = 15 days.
  2. Months: 2 − 10 is negative, so borrow one year, which is 12 months. The month becomes 2 + 12 = 14 and the year drops from 2026 to 2025. Now 14 − 10 = 4 months.
  3. Years: 2025 − 1995 = 30 years.

The age is 30 years, 4 months and 15 days.

Borrow the month before, not 30 days

The days you borrow are the length of the month just before the end date's month. In example 2 that's February, with 28 days. Borrowing a flat 30 would give 14 + 30 − 27 = 17 days, two too many. The age calculator does the same as the hand method. It counts whole calendar months and never divides days by 30 or 365.

Born on the 29th, 30th or 31st

Some months are shorter than the day you were born on. The age calculator then counts the month as complete on that month's last day. To get the same result by hand, use your birth day as it falls in each month. In a month with at least as many days as your birth day, it's your birth day. In a shorter month, it's that month's last day. Born on the 31st, your day in November is the 30th, and your day in February 2026 is the 28th.

The day step then works like this:

  1. Compare the end date's day with your day in the end date's month. If the end day is the same or later, subtract your day in that month. You don't borrow.
  2. If the end day is earlier, borrow the month before. Add that month's length to the end day and subtract your day in the borrowed month.

So a short end month changes the answer only when the end date is that month's last day. On any earlier day of it you borrow, and the month you borrow decides.

Born May 31, 2000, on November 30, 2026. November has 30 days, so your day in November is the 30th. The end day, 30, isn't earlier, so there's no borrow: 30 − 30 = 0 days, 11 − 5 = 6 months, and 2026 − 2000 = 26 years. The age is 26 years, 6 months and 0 days. Subtracting 31 instead would make you borrow October's 31 days and give 26 years, 5 months and 30 days, a month short on the last day of November.

Born May 31, 2000, on November 15, 2026. Your day in November is again the 30th, and 15 is earlier, so borrow October. October has 31 days, so your day in October is the 31st: 15 + 31 − 31 = 15 days. Then 10 − 5 = 5 months and 2026 − 2000 = 26 years. The age is 26 years, 5 months and 15 days. November's 30 days play no part here, so don't subtract 30.

Born January 31, 1996, on March 1, 2026. March has 31 days, so your day in March is the 31st, and 1 is earlier. Borrow February 2026, which has 28 days, so your day in February is the 28th: 1 + 28 − 28 = 1 day. Then 2 − 1 = 1 month and 2026 − 1996 = 30 years. The age is 30 years, 1 month and 1 day. Plain subtraction would give 1 + 28 − 31 = −2 days, which can't be right.

The same rule decides where you land when you add months to a date. How to count months and days forward or back from a date works through it with the date calculator.

Birthdays on February 29

Someone born on February 29 has a real birthday only in leap years. In the years between, the age calculator moves it to February 28. It follows the rule above, since February then has fewer days than 29.

For someone born on February 29, 2004:

  • On February 27, 2025, they are 20 years, 11 months and 29 days old.
  • On February 28, 2025, they turn 21. The calculator shows 21 years, 0 months and 0 days.
  • On March 1, 2025, they are 21 years, 0 months and 1 day old.
  • On February 29, 2028, a leap year, they turn 24 on the day itself.

The Next Birthday In box counts to February 28 in a common year and to February 29 in a leap year.

Laws don't all agree on this. For a legal age, some places treat February 28 as the birthday in a common year and others March 1, and the rule can differ between laws in the same country. If the date matters for a driver's license, a contract or a benefit, check the rule of the place and the authority involved. The calculator gives the calendar answer only.

Total days lived

The age calculator also shows the total days from the birth date to the second date. For July 19, 1988 to December 1, 2026 that's 14,014 days. It gets the hours and minutes from the days, 14,014 × 24 = 336,336 hours and 14,014 × 1,440 = 20,180,160 minutes, because the form takes dates without a time of day.

Counting days by hand across 38 years is slow and easy to get wrong. To count the days between any two dates, use the day counter.

Age in Excel or Google Sheets

Both Excel and Google Sheets have DATEDIF(start_date, end_date, unit). With the date of birth in cell A2:

  • Whole years: =DATEDIF(A2, TODAY(), "Y")
  • Months after the whole years: =DATEDIF(A2, TODAY(), "YM")
  • Days after the whole months: =DATEDIF(A2, TODAY(), "MD")

To show all three in one cell:

=DATEDIF(A2, TODAY(), "Y") & " years, " & DATEDIF(A2, TODAY(), "YM") & " months, " & DATEDIF(A2, TODAY(), "MD") & " days"

Replace TODAY() with a cell reference to measure the age on another date.

Check two things before you rely on it. Microsoft's DATEDIF page says Excel has the function to support older Lotus 1-2-3 workbooks, and that the "MD" unit "may result in a negative number, a zero, or an inaccurate result." Google's DATEDIF page says months and years "are only counted if they are equal to or go past the 'day'". By that rule, someone born on September 30, 2014 gets 4 whole months on February 28, 2015, where the age calculator shows 5 months and 0 days. By the same rule, a February 29 birthday adds a year on March 1 in a common year, not February 28. For a birth date on the 29th, 30th or 31st, compare the spreadsheet with the calculator.

For age as a decimal number of years, use YEARFRAC with the basis set to 1: =YEARFRAC(A2, TODAY(), 1). Leave the basis out and both programs use their default, US (NASD) 30/360, which treats every month as 30 days. Basis 1 is actual/actual and counts the real days.

Use the calculator

In the age calculator, pick the date of birth. Under Age As Of, today's date is already filled in. Change it to find the age on another date, for example on a deadline or a future birthday. Press Calculate Age. You get the age in years, months and days, the total days, hours and minutes lived, and the days until the next birthday. The calculator works on calendar dates, so the answer is the same in every time zone.

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.