Applies To
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web

Calculates the number of days, months, or years between two dates.

=DATEDIF(start_date, end_date, Unit)

start_date: the first date of a given period, end_date: the last date of a given period,Unit is "Y" for full years, "M" for full months, and "D" for full days. Explicit dates and units must be quoted in the formula. 

For example: =DATEDIF("10/24/23",E9,"D"), where D9 is start date, E9 is end date, and "D" is the number of full day between the two dates.

For more options, see DATEDIF function.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.