Working with dates
Days between dates, workdays, and the end of a month.
A spreadsheet stores each date as a day number, so subtracting two dates gives the days between them. NETWORKDAYS(start, end) counts Monday-to-Friday days, counting both the start and end day. EOMONTH(date, months) gives the last day of the month that many months later; 0 means the same month.
Example: A2 is 3/2/2026 and B2 is 3/20/2026.
- =B2-A2 = 18 — Days between, start day not counted
- NETWORKDAYS(A2,B2) = 15 — Three full work weeks
- EOMONTH(A2,1) = 4/30/2026 — Last day of next month
Why it works: A sheet stores each date as a count of days, so subtracting two dates gives the days between them, and the calendar knows each month’s length for EOMONTH.
Tip: If a date difference shows as a date, change the cell format to Number.