Excel stores dates as serial numbers, which makes adding and subtracting days straightforward. Months and years need date functions because not every month has the same number of days.
Does this affect you?
Use this for Excel for Microsoft 365, Excel 2021, and Excel 2019 on Windows or Mac when calculating due dates, deadlines, anniversaries, ages, or days between two dates.
Add or subtract a number of days
Whole days are the simplest case.
- Click an empty result cell.
- Use =A2+30 to add 30 days to the date in A2.
- Use =A2-30 to subtract 30 days.
- Press Enter.
- If the result appears as a serial number, format the cell as Date.
Add or subtract months with EDATE
Use EDATE so month lengths and leap years are handled correctly.
- Click an empty result cell.
- Use =EDATE(A2,3) to add three months.
- Use =EDATE(A2,-3) to subtract three months.
- Format the result as a date if needed.
EDATE handles dates like January 31 by landing on the last valid day of the target month when necessary.
Add or subtract years
Years can be treated as groups of 12 months.
- Use =EDATE(A2,12) to add one year.
- Use =EDATE(A2,-12) to subtract one year.
- Use =EDATE(A2,12*5) to add five years.
- For a more explicit calendar-year formula, use =DATE(YEAR(A2)+5,MONTH(A2),DAY(A2)).
More control
Skip weekends with WORKDAY
Use =WORKDAY(A2,10) to find the date 10 working days after A2. Add a holiday range, such as =WORKDAY(A2,10,D2:D10), to skip those dates too.
Calculate age with DATEDIF
Use =DATEDIF(A2,TODAY(),”Y”) for full years from a birth date. Use M for months or D for days. DATEDIF may not appear in autocomplete, but it still works.
Find days between dates
Use =A3-A2 when both cells contain real Excel dates. Format the result as a number if Excel displays it as a date.
Fix ##### results
A row of hash marks usually means the column is too narrow to show the date. AutoFit or widen the column.
Make sure source dates are real dates
If formulas error or behave strangely, the dates may be text. Re-enter them or convert imported text dates before calculating.
Sources
- Microsoft Support – Add or subtract dates (2025)
- Microsoft Support – EDATE function (2025)
- Microsoft Support – DATEDIF function (2025)
