DATEDIF, EOMONTH & NETWORKDAYS in Google Sheets
DATEDIF(start, end, unit) measures the gap between two dates in whole units: "Y" for years (ages, tenure), "M" for months, "D" for days. The start date must come first.
EOMONTH(date, months) returns the last day of a month: 0 for the same month, 1 for next month, which is perfect for "due at end of month" terms. NETWORKDAYS(start, end, [holidays]) counts working days, Monday to Friday, including both dates, and can skip a list of holidays.
Syntax
=DATEDIF(start, end, "Y") · =EOMONTH(date, 0) · =NETWORKDAYS(start, end)
Example
=DATEDIF(B2, TODAY(), "Y")
Age or years of service from the date in B2.
Common mistakes
- Putting the later date first in DATEDIF, which returns #NUM!.
- Using EOMONTH(date, 1) when you mean this month (0).
- Forgetting NETWORKDAYS counts both the start and end date.
← Working with dates · VLOOKUP → · All lessons