May 30, 2025·8 min read

Essential Date Calculations in Excel: DATEDIF, EDATE, NETWORKDAYS, and More

Master the key date functions for calculating age, months between dates, workdays, and other common date math.

Excel date calculations

Once you have dates in Excel, you need to do things with them — calculate age, find business days, determine months between events. Excel has functions for all of this, though some are better documented than others.

Days Between Two Dates

The simplest calculation: just subtract.

=B1-A1

This gives the number of days between two dates. Format the result as a Number, not a Date.

DATEDIF: The Undocumented Function

DATEDIF calculates the difference between dates in years, months, or days. Microsoft doesn't document it, but it works:

=DATEDIF(start_date, end_date, unit)

Units:

  • "Y" — Complete years
  • "M" — Complete months
  • "D" — Days
  • "YM" — Months after subtracting years
  • "MD" — Days after subtracting months

Example for age: =DATEDIF(A1,TODAY(),"Y") returns years of age.

EDATE and EOMONTH: Adding Months

Adding months isn't straightforward (months have different lengths). EDATE handles it:

=EDATE(start_date, months)

=EDATE("1/31/2025", 1) returns February 28, 2025 (adjusts for shorter month).

EOMONTH returns the last day of a month, n months away:

=EOMONTH(start_date, months)

NETWORKDAYS: Business Days Between Dates

NETWORKDAYS counts weekdays between two dates, optionally excluding holidays:

=NETWORKDAYS(start_date, end_date, [holidays])

The holidays argument is optional — a range containing holiday dates to exclude.

NETWORKDAYS.INTL allows specifying which days are weekends (for non-standard work weeks).

WORKDAY: Adding Business Days

Find the date that is n business days from a start date:

=WORKDAY(start_date, days, [holidays])

Perfect for calculating due dates, delivery dates, or deadlines that only count business days.

Extracting Date Parts

  • =YEAR(date) — Returns the year
  • =MONTH(date) — Returns the month (1-12)
  • =DAY(date) — Returns the day of month
  • =WEEKDAY(date) — Returns day of week (1-7)
  • =WEEKNUM(date) — Returns week number in year

Enter Dates Faster with a Real Date Picker

Excel doesn't have a built-in date picker. XLNavigator adds a calendar popup that makes date entry fast and error-free.

Try Date Picker Free

Related Reading

Official Resources

📧

Want more Excel tips like this?

Get our free guide: 10 Excel Shortcuts Microsoft Doesn't Tell You About
Join 3,000+ Excel users boosting their productivity.

By subscribing, you agree to receive the free guide and occasional emails with Excel tips and product updates. Unsubscribe anytime. We respect your privacy.