If you would rather not write the formula, pick what you want to do in the Excel date formula generator and copy the result. Below are the twelve date formulas people use most, with the answer each gives for a real example. The start date is 2 November 2026, typed with DATE(2026,11,2) so it does not depend on your regional settings.

Why date formulas work

Excel and Google Sheets store a date as a number: the count of days from a starting date. 2 November 2026 is stored as 46328. A formatted cell shows it as a date, but under the hood it is a plain number, which is why you can add and subtract dates. If a result looks like 46328, format the cell as a date. If a date shows as a number such as 305, format it as a number.

Add or subtract days, months and years

Task Formula Result for 2 Nov 2026
Add 30 days =A1+30 2 December 2026
Subtract 90 days =A1-90 4 August 2026
Add 3 months =EDATE(A1,3) 2 February 2027
Add 1 year =EDATE(A1,12) 2 November 2027
Today plus 90 days =TODAY()+90 90 days from today

Days are plain addition. For months, use EDATE, not A1+90, because months have different lengths. EDATE keeps the same day of the month and stops at the end of a shorter month: =EDATE(DATE(2026,1,31),1) gives 28 February 2026, and =EDATE(DATE(2028,2,29),12) gives 28 February 2029.

Last and first day of a month

Task Formula Result for 2 Nov 2026
Last day of the month =EOMONTH(A1,0) 30 November 2026
Last day of next month =EOMONTH(A1,1) 31 December 2026
First day of the month =EOMONTH(A1,-1)+1 1 November 2026
Number of days in the month =DAY(EOMONTH(A1,0)) 30

EOMONTH knows about leap years, so =DAY(EOMONTH(DATE(2028,2,1),0)) returns 29.

Working days: WORKDAY and NETWORKDAYS

Task Formula Result
30 working days after a date =WORKDAY(A1,30) Monday 14 December 2026
Same, skipping listed holidays =WORKDAY(A1,30,H2:H10) Later, if any holiday falls in the range
Working days between two dates =NETWORKDAYS(A1,DATE(2026,11,30)) 21
Same, skipping listed holidays =NETWORKDAYS(A1,B1,H2:H10) Fewer than without holidays

WORKDAY does not count the start day. NETWORKDAYS counts both the start and the end day, so 2 to 30 November 2026 gives 21. List holidays as dates in a range, because the formulas do not know them. See business days explained for the rules behind this.

Days between two dates and age

Task Formula Example result
Days between =B1-A1 or =DAYS(B1,A1) 305 days from 1 Jan 2026 to 2 Nov 2026
Complete years (age) =DATEDIF(A1,B1,"y") 36 for 20 May 1990 to 2 Nov 2026
Months left over after years =DATEDIF(A1,B1,"ym") 5
Days left over after months =DATEDIF(A1,B1,"md") 13

Putting the last three together gives 36 years, 5 months and 13 days. DATEDIF works in both programs but Excel does not list it in its function menu, so you have to type it. Microsoft warns that the "md" option can return wrong results in some cases, so check it against the age calculator for important dates.

Day of the week and week number

Task Formula Result for 2 Nov 2026
Day of the week, Monday = 1 =WEEKDAY(A1,2) 1
Day name =TEXT(A1,"dddd") Monday
ISO week number =ISOWEEKNUM(A1) 45

The plain =WEEKNUM(A1) uses a different rule and may give another number. For the ISO rule, use ISOWEEKNUM, as explained in ISO week numbers.

Common mistakes

  • A date turns into a number or the other way round. Change the cell format; the stored value is right.
  • A date typed as text. If it is left-aligned and =A1+1 gives an error, it is text. Rebuild it with DATE(year, month, day).
  • Day first or month first. 3/4/2027 is read according to your regional settings. DATE avoids the problem; see date formats.
  • Counting both ends by accident. Subtracting two dates excludes the start day or the end day, depending on how you think about it, so decide whether the answer should include both.