Excel Guide

Excel Date Functions: Due Dates, Month Ends and Working Days

Invoices, contracts, payroll and leave all run on dates. Once you know that Excel stores a date as a number, a handful of functions cover almost everything work throws at you.

Dates are numbers underneath

Excel counts days from the start of 1900, so 15 March 2026 is stored as 46096 and just displayed as a date. That's why you can subtract two dates to get the days between them, or add 30 to get a due date:

=B2-A2 // days between a start date (A2) and an end date (B2) =A2+30 // 30 days after the invoice date in A2

DATE builds a real date from separate parts, and YEAR, MONTH and DAY take one apart again:

=DATE(2026, 3, 15) // 15 Mar 2026 =DATE(YEAR(A2), MONTH(A2), 1) // first day of A2's month

EDATE and EOMONTH: whole months and month ends

Months have different lengths, so adding 30 days isn't "one month". EDATE moves a date by whole months, and EOMONTH jumps to the last day of a month:

=EDATE(A2, 12) // same date next year (contract end) =EOMONTH(A2, 0) // last day of A2's month =EOMONTH(A2, 1) // "end of following month" payment terms =EOMONTH(A2, 0)+1 // first day of next month

EDATE also handles short months: one month after 31 January is 28 February, not 3 March.

WORKDAY and NETWORKDAYS: skipping weekends and holidays

For delivery dates and deadlines in working days, WORKDAY counts forward (or back) and skips Saturdays and Sundays. NETWORKDAYS counts the working days between two dates, including both. Both take an optional range of holiday dates:

=WORKDAY(A2, 5) // 5 working days after A2 =WORKDAY(A2, -1) // the previous working day =NETWORKDAYS(A2, B2, E2:E10) // working days, leaving out the holidays in E2:E10

WEEKDAY tells you the day of the week as a number. Give it a second argument of 2 and Monday is 1, so anything above 5 is a weekend:

=IF(WEEKDAY(A2, 2)>5, "Weekend", "Weekday")

DATEDIF: ages and length of service

DATEDIF counts complete years, months or days between two dates, which is how ages and tenure work. It doesn't appear in Excel's function list, but it works:

=DATEDIF(A2, B2, "Y") // complete years (age) =DATEDIF(A2, B2, "M") // complete months of service =DATEDIF(A2, B2, "YM") // months left over after whole years

TODAY: formulas that stay current

TODAY returns today's date and updates every time the file recalculates, so countdowns and overdue flags never need editing:

=A2-TODAY() // days until the deadline in A2 =IF(A2<TODAY(), "Overdue", "Open") =DATEDIF(A2, TODAY(), "Y") // age today

Counting and totalling by month

To count or total the rows in one month, give COUNTIFS or SUMIFS a start and an end condition on the date column. Using "before the 1st of next month" catches every date, including the 31st:

=SUMIFS(B2:B100, A2:A100, ">="&DATE(2026,3,1), A2:A100, "<"&DATE(2026,4,1))
Common mistake: dates typed as text, often from CSV exports, look like dates but don't behave like them: they won't subtract and SUMIFS ignores them. If a date sits on the left of its cell and the maths fails, it's text.

Try it yourself

Practise these formulas on real spreadsheet tasks with instant feedback. The first 3 tasks in every module are free.

Start practising date functions →