To return the prior year's end date (31 December of last year) in Excel, use =DATE(YEAR(TODAY())-1,12,31). If your fiscal year ends on a different date, or you need the prior year end relative to some other date in a cell, use =DATE(YEAR(A2)-1,MONTH(your_year_end),DAY(your_year_end)) instead. Both formulas return a real date serial number, which means you can format it, subtract from it and compare it like any other date. This guide walks through building the formula, adapting it to fiscal years and leap years, and fixing the errors people hit most often.
What You'll Need
- A copy of Excel for Microsoft 365, Excel 2021, Excel 2019 or Excel for Mac. The DATE, YEAR, TODAY, EDATE and EOMONTH functions used here are available in all modern versions.
- A cell to hold the result, ideally one formatted as a date rather than General.
- Optionally, a cell containing a reference date (such as a transaction date or report date) if you want the prior year end relative to that row rather than relative to today.
- If you use a fiscal calendar, the month and day your financial year ends on. Menu labels and ribbon wording can differ slightly between Excel versions and platforms, but the formulas below are identical everywhere.
Step-by-Step
- Pick your result cell. Click an empty cell such as B2 and press Ctrl+1 (Cmd+1 on Mac) to open Format Cells. Choose the Date category and pick a format such as 31-Dec-2026 or DD/MM/YYYY, then click OK. Doing this first means the formula's output shows as a date straight away instead of a five-digit serial number like 46022.
- Type the basic calendar-year formula. Enter
=DATE(YEAR(TODAY())-1,12,31)and press Enter. TODAY() returns the current date, YEAR() strips out the year number, subtracting 1 moves back a calendar year, and DATE() builds the last day of December in that year. Because you pass 31 December explicitly, the formula never suffers from end-of-month rounding. - Check the result makes sense. If today is in 2026, the cell should read 31-Dec-2025. If it shows something unexpected, confirm the cell is formatted as a date and that your computer's system clock is correct, since TODAY() reads from the operating system.
- Make it relative to a date in a cell. If you have dates down column A and want the prior year end beside each one, put
=DATE(YEAR(A2)-1,12,31)in B2 and fill it down with the fill handle. This is the version to use for transaction lists, because it stays fixed even as TODAY() changes tomorrow. - Adapt it to a fiscal year end. Suppose your financial year finishes on 31 March. Use
=DATE(YEAR(A2)-(MONTH(A2)<=3),3,31). The comparison returns TRUE (1) when the date falls on or before the fiscal year end, which rolls the value back an extra year; otherwise it returns FALSE (0) and keeps the current year. For a 30 June year end, swap 3 for 6 and 31 for 30. - Use a cleaner fiscal alternative with EDATE. If your year end is the last day of a month,
=EOMONTH(EDATE(A2,-12)+1,0)is easier to read but only works when the year end is a true month end. EDATE subtracts twelve months, adding 1 nudges into the next month's territory, and EOMONTH snaps to that month's final day. Both this and the DATE approach give the same answer for month-end fiscal years. - Handle leap years without special cases. A calendar-year formula pointing at 31 December needs no leap-year logic at all. If your year end is 29 February, write
=DATE(YEAR(A2)-1,2,29)and Excel will return 28 February in non-leap years automatically, because DATE rolls an impossible day backwards into the previous month rather than throwing an error. - Lock references before filling or copying. If you plan to copy the formula across columns or reference a single input cell such as the fiscal month, press F4 to add dollar signs (for example $B$1) so the reference does not shift.
- Turn it into a label if you need text. Wrap the formula in TEXT if the date must sit inside a sentence:
="Year ended "&TEXT(DATE(YEAR(TODAY())-1,12,31),"DD MMM YYYY"). Remember that text cannot be used in later date arithmetic, so keep a numeric version in a separate column if calculations follow.
Common Mistakes
Using NOW() instead of TODAY(). NOW() includes a time component. It will not break the DATE formula because YEAR() ignores time, but it causes trouble in comparisons and in cells formatted to show time. Stick with TODAY() for date-only work.
Typing the year as text. If a cell you reference was imported as text, YEAR() may throw #VALUE!. Check with ISNUMBER().
Forgetting the day argument. DATE(2025,12) with only two arguments is not a shorter version of the formula - it returns 1 December. All three arguments are required.
Assuming YEAR(TODAY())-1 always works for fiscal years. For a year ending in March, a date in February belongs to the previous fiscal year, not the current one. The Boolean comparison in step 5 is what handles that boundary.
Formatting the result as text by mistake. A cell with a leading apostrophe or a preformatted Text cell will display the date but store a string. Re-enter the formula into a General-formatted cell.
Hard-coding the year. Writing DATE(2025,12,31) works today and silently becomes wrong next January. Let TODAY() or a cell reference drive the year.
Tips
Convert the result to a fixed value with Paste Special > Values if you need the prior year end frozen for an archived report; the formula will otherwise update each year.
Subtract two prior-year-end cells to count days between them; Excel returns a whole number because dates are stored as serial numbers.
Name the formula's output range (Formulas > Define Name) if you reference it across several sheets, so a single edit updates every linked figure.
For a rolling comparison, add =TODAY()-DATE(YEAR(TODAY())-1,12,31) to see how many days have passed since the prior year end.
Troubleshooting
The cell shows a number like 46022. The cell is formatted as General. Apply a date format as in step 1 - the value itself is correct.
You see ###### . The column is too narrow for the date format. Widen the column or choose a shorter format.
You get #VALUE!. One of the referenced cells contains text rather than a date. Test with ISNUMBER() and convert with DATEVALUE() or re-import the data as actual dates.
You get #NAME?. Usually a function name is misspelled or a quote mark was typed as a smart quote. Retype the formula rather than pasting it from a document.
The result is a year off. Check whether your fiscal year has already closed for the reference date. Step 5's comparison handles that; if you used a plain DATE formula, you are seeing the calendar year end, not the fiscal one.
The value changes when you reopen the file. That is TODAY() recalculating. Switch to a cell reference if you want a fixed baseline.
Frequently Asked Questions
Does the formula update automatically each year?
Yes. If it uses TODAY(), it rolls forward every time the workbook recalculates, so next January the result moves to 31 December of the year just ended.
How do I get the prior year end for a fiscal year ending 30 June?
Use =DATE(YEAR(A2)-(MONTH(A2)<=6),6,30). The comparison decides whether the reference date has already passed that year's fiscal close.
Can I get the previous month end instead?
Yes, with =EOMONTH(TODAY(),-1). Change -1 to -12 for the same month a year earlier.
Why does 29 February return 28 February?
DATE() rolls an invalid day into the previous month's last day, which is the behaviour you want for a leap-day year end.
Does this work in Google Sheets?
Yes. DATE, YEAR, TODAY, EDATE and EOMONTH behave the same way there, so the formulas transfer directly.