Share via

how can I compute years, months, and days between two dates

Anonymous
2024-08-26T01:13:08+00:00

Start = 1/20/2023

End = 2/21/2024

Compute difference = 1 Year, 1 Month, and 1 day

Stated differently what is the age of a person with indicated birth date and current date.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-08-26T06:38:26+00:00

    Hi, GeorgeGuild

    Thank you for using Microsoft products and posting them in the community.

    In Excel, you can use the DATEDIF function to calculate the year, month and day difference between two dates.

    Here are the steps:

    In cell A1 enter the start date, such as 1/20/2023.

    In cell B1, enter the end date, for example, 2/21/2024.

    Calculate the yearly difference.

    In cell C1 enter the formula: =DATEDIF(A1, B1, “Y”) which will return the number of years.

    Calculate Monthly Difference.

    In cell D1 enter the formula: =DATEDIF(A1, B1, “YM”), this will return the number of months (ignoring the number of years).

    Calculate Daily Difference.

    In cell E1 enter the formula: =DATEDIF(A1, B1, “MD”), this will return the number of days (ignoring the number of years and months).

    This will give you the year, month and day difference between the two dates.

    I hope the above information can help you. Feel free to send a message if you need further help.

    Best wishes

    Aiden.C - MSFT |Microsoft Community Support Specialist

    10+ people found this answer helpful.
    0 comments No comments