Spreadsheet Practice

How to get the same date last year in Excel

Formula (Excel and Google Sheets)

=EDATE(A2,-12)

Go back 12 months with EDATE: =EDATE(A2,-12). February 29 becomes February 28.

Result on the example
one result per row in B2, filled down to B6
Works in
Every current version
Google Sheets
Same formula

See it work

The formula is already in B2, filled down to B6. Change any input and the result updates, or edit the formula to experiment.

How it works

EDATE moves a date by whole months, so -12 is exactly one year back. When the day doesn't exist it stops at the month end: February 29, 2028 goes back to February 28, 2027.

=EDATE(A2,-12)

Result3/15/2025 (45731)

  1. A23/15/2026

    The value in A2.

  2. -12-12

    Makes the value negative.

  3. EDATE(A2,-12)3/15/2025 (45731)

    EDATE: Date a number of months before or after.

    • start_dateA23/15/2026
    • months-12-12

In Google Sheets

The same formula works in Google Sheets: =EDATE(A2,-12). We ran it in Google Sheets mode on the same data and it returns the same results.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=DATE(YEAR(A2)-1,MONTH(A2),DAY(A2))3/15/2025, 1/31/2025, 3/1/2027…Different resultBuilds the date with the year minus one. February 29 rolls to March 1. February 29, 2028 becomes March 1, 2027.
=A2-3643/16/2025, 2/1/2025, 3/2/2027…Different resultThe same weekday 52 weeks earlier, which retailers use to compare like-for-like days. Same weekday, not the same date.

Common mistakes

  • =A2-365 is off by a day whenever a February 29 falls in between.
  • For daily sales, a same-date comparison often pits a Saturday against a Friday. Use the 364-day version for weekday-sensitive data.

Try it yourself

Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.

Get the same date last year

In B2, return the same date one year earlier, and fill down to B6.

Questions

How do I get the same period last year for a date range?

Apply EDATE to both ends, =EDATE(start,-12) and =EDATE(end,-12), then use them in SUMIFS.

How do I get the same date next year?

=EDATE(A2,12).

Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.