Excel Date Functions
Excel stores every date as a serial number (days since January 1, 1900), which means date math is just arithmetic plus a handful of functions: TODAY for the current date, EOMONTH for month ends, NETWORKDAYS for business days, DATEDIF for ages, and EDATE for shifting by months.
How Do Excel Date Serial Numbers Work?
A date is an integer count of days โ January 1, 2026 is serial 46023 โ so subtracting two dates gives days between them, and adding 7 to a date gives next week.
=B2-A2 ' Days between two dates: plain subtraction
=A2+7 ' Same day next week
=TEXT(A2,"yyyy-mm-dd") ' Format a serial as text
If a formula shows a number like 46023 instead of a date, the value is fine โ only the cell format is wrong. Apply a date format.
What Do TODAY and EDATE Do?
TODAY() returns the current date and recalculates every day the file opens; EDATE shifts a date by whole months, handling month lengths for you.
=TODAY() ' 2026-07-31 (recalculates daily)
=EDATE(A2, 3) ' 3 months after A2
=EDATE(A2, -12) ' 1 year before A2
=EDATE("2026-01-31", 1) ' 2026-02-28: clamps to real month end
How Do You Get the Month End With EOMONTH?
EOMONTH returns the last day of the month a given number of months away, which makes it the standard tool for reporting periods and due dates.
=EOMONTH(TODAY(), 0) ' Last day of this month
=EOMONTH(TODAY(), -1) ' Last day of last month
=EOMONTH(TODAY(), -1)+1 ' FIRST day of this month
=EOMONTH(A2, 1) ' Invoice due: end of next month
How Do You Count Business Days With NETWORKDAYS?
NETWORKDAYS counts weekdays between two dates inclusive, with an optional range of holiday dates to skip.
=NETWORKDAYS(A2, B2) ' Weekdays from A2 to B2
=NETWORKDAYS(A2, B2, $H$2:$H$10) ' Excluding listed holidays
=WORKDAY(A2, 10, $H$2:$H$10) ' Date 10 business days AFTER A2
What Is DATEDIF and Why Is It Hidden?
DATEDIF returns the gap between two dates in complete years, months, or days โ it's undocumented in the function wizard but works in every Excel version and is the cleanest way to compute ages and tenure.
=DATEDIF(A2, TODAY(), "y") ' Complete years (age, tenure)
=DATEDIF(A2, TODAY(), "m") ' Complete months
=DATEDIF(A2, TODAY(), "ym") ' Months left over after years
' "34 years, 5 months":
=DATEDIF(A2,TODAY(),"y")&" years, "&DATEDIF(A2,TODAY(),"ym")&" months"
Common Pitfalls
- Text that looks like a date: imported "dates" stored as text won't sort or subtract. Use
=DATEVALUE(A2)or check with=ISNUMBER(A2). - TODAY() is volatile: it recalculates constantly. Never use it for a fixed "date entered" stamp โ press Ctrl+; instead.
- DATEDIF argument order: start date must come first or you get
#NUM!. - NETWORKDAYS counts both endpoints: Monday to Friday of the same week returns 5, not 4.
- Adding 30 for "next month": use
EDATE(A2,1), notA2+30โ months aren't all 30 days.
Pro Tip: To highlight rows due within 7 days, use conditional formatting with the formula =AND(A2>=TODAY(), A2<=TODAY()+7) โ date serials make the comparison plain arithmetic.