# How to get the same date last year in Excel

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

**Excel:** `=EDATE(A2,-12)` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B |
| --- | --- |
| Date | Same date last year |
| 2026-03-15 |  |
| 2026-01-31 |  |
| 2028-02-29 |  |
| 2026-12-25 |  |
| 2026-07-04 |  |

Formula in B2, filled to B6: `=EDATE(A2,-12)`

Result: 3/15/2025; 1/31/2025; 2/28/2027; 12/25/2025; 7/4/2025

## 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.

## Other ways

- `=DATE(YEAR(A2)-1,MONTH(A2),DAY(A2))`: Builds the date with the year minus one. February 29 rolls to March 1. (February 29, 2028 becomes March 1, 2027.)
- `=A2-364`: The 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.

## 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)`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/same-date-last-year
