Excel Date Minus X Months: Formula and Examples

Formulas & functions · Updated December 2, 2026

To subtract a number of months from a date in Excel, use =EDATE(A2,-B2), where A2 contains the starting date and B2 contains the number of months. For example, if A2 is 15-May-2025 and B2 is 3, the result is 15-Feb-2025. EDATE handles month lengths and year changes for you.

How the EDATE formula works

EDATE returns the date a specified number of months before or after a starting date. Its syntax is EDATE(start_date,months). A positive month value moves forward; a negative value moves backward. The formula =EDATE(A2,-3) subtracts three months, while =EDATE(A2,3) adds three.

To make the number of months easy to change, put the date in A2 and the month count in B2, then enter =EDATE(A2,-B2) in C2. If B2 is 6, Excel subtracts six months. If B2 is 0, the result is the original date. This is useful for due-date schedules, reporting periods, subscription dates, and other calculations based on calendar months.

EDATE is available in Microsoft 365 Excel for Windows. It works with normal Excel dates, which are stored as serial numbers and displayed according to the cell’s number format. If the result appears as a number such as 45703, select the result cell and choose Home > Number Format, then select Short Date or another date format.

What happens at the end of a month

A calendar month does not have a fixed number of days, so subtracting one month is not the same as subtracting 30 days. EDATE aims for the corresponding day of the month. If that day does not exist in the destination month, it returns the last day of that month.

  • With 31-May-2025 in A2, =EDATE(A2,-1) returns 30-Apr-2025 because April has no 31st.
  • With 30-May-2025 in A2, =EDATE(A2,-1) returns 30-Apr-2025.
  • With 31-Mar-2025 in A2, =EDATE(A2,-1) returns 28-Feb-2025. In a leap year, the corresponding result can be 29-February.

This end-of-month behavior is intentional: Excel adjusts to a valid date instead of producing an error or moving into a different month. It can matter when setting recurring dates. For example, repeatedly subtracting one month from a month-end date may produce dates on the 28th, 29th, or 30th depending on the months involved.

Subtract months from today or another date

To calculate a date relative to today, use =EDATE(TODAY(),-3) for three months before the current date. TODAY updates when Excel recalculates the workbook, so the result is dynamic rather than fixed. To keep a historical calculation unchanged, use a date entered in a cell instead of TODAY.

If the starting date is in A2 and you always want to subtract a fixed number of months, replace the cell reference for the month count with that number: =EDATE(A2,-12) subtracts 12 months. For a variable count stored in B2, the sign can be included in the formula as =EDATE(A2,-B2). If B2 might contain a negative number, note that negating it will add months instead of subtracting them.

Enter a date as a date value, not as text. Excel may interpret an entry such as 5/6/2025 differently depending on regional date settings. A clearly written date such as 6-May-2025, or a date created with Excel’s DATE function, can reduce ambiguity. With year in A2, month in B2, and day in C2, the starting date can be built using =DATE(A2,B2,C2), then passed to EDATE.

EDATE compared with subtracting days

Use EDATE when the requirement is a number of calendar months. Subtracting a fixed number of days answers a different question. For example, =A2-90 subtracts exactly 90 days; it does not mean three calendar months. Depending on the dates involved, 90 days may land on a different day than EDATE does.

Similarly, YEARFRAC or a division by 30 is not a replacement for subtracting whole calendar months. Choose the calculation that matches the rule you need: calendar-month anniversaries, a fixed number of elapsed days, or a particular business convention. For recurring billing or contractual deadlines, confirm how the governing terms define a month-end date rather than assuming every system handles it identically.

Common errors and useful checks

  • #VALUE!: The starting date or month argument may be text or otherwise invalid. Check that A2 is a real Excel date and B2 is numeric.
  • Unexpected date: Verify the sign. EDATE with a negative month count moves backward; a positive count moves forward.
  • Serial number instead of a date: Change the result cell’s number format to a date. The underlying result can still be correct.
  • Unexpected result from text dates: Check regional date interpretation and convert the source values to real dates before calculating.

One subtle point: EDATE ignores time-of-day fractions in the starting value and returns a date serial for the resulting date. If the original cell contains both a date and a time and the time must be preserved, add the time portion separately. For example, with a date-time value in A2, a month count in B2, and the time portion to retain, use =EDATE(A2,-B2)+MOD(A2,1). The MOD portion extracts the fractional-day time. For ordinary date-only data, this extra step is unnecessary.

Frequently Asked Questions

What formula subtracts one month in Excel?
With the starting date in A2, use =EDATE(A2,-1). Excel returns the corresponding date in the previous month, adjusted to that month’s final day if needed.

How do I subtract months using a number in another cell?
Put the starting date in A2 and the number of months in B2, then use =EDATE(A2,-B2). A positive number in B2 is treated as months to subtract.

How do I subtract months from today’s date?
Use =EDATE(TODAY(),-3) to get the date three months before today. Because TODAY recalculates, the answer changes as the current date changes.

Does Excel subtract 30 days for each month?
No. EDATE works with calendar months, not a fixed 30-day interval. Use a formula such as =A2-30 only when you specifically mean 30 elapsed days.

Why does subtracting a month from the 31st return the 30th or 28th?
The destination month may not contain a 31st. EDATE returns that month’s last valid date, such as 30-April or 28-February, rather than an invalid date.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.