Written by Allen Wyatt (last updated December 9, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
A company's fiscal year can end at any time, not just when a calendar year ends. When putting together a worksheet, you may want to calculate a date that is one year before or after a given date that represents the end of a fiscal period. This can be done quite easily with any number of formulas, such as the following:
=DATE(YEAR(D1)-1, MONTH(D1), DAY(D1))
This formula takes a date (cell D1) and subtracts a year from it. Thus, if D1 contains the date 3/31/18, then the formula returns 3/31/17.
This works great in most instances because most months have the same number of days from one year to the next. There is, of course, one exception—February. If you have a fiscal year that ends in February, the variable number of days in the month can play havoc with the above formula. If cell D1 contains 2/28/17, then the formula returns 2/28/16, when the real end of the fiscal period is 2/29/16. Similarly, if cell D1 contains 2/29/16, then the formula returns 3/1/15, which is obviously not what was intended.
There are a couple of ways you can determine the end of the fiscal period. The first is through the use of the EOMONTH function. This function is used to return the end of a month a given number of months in the past or future. For instance, if you wanted to know the last day of the month twelve months ago, you can use the following formula:
=EOMONTH(D1,-12)
You are not tied to use EOMONTH, however. You could also use a formula such as the following:
=DATE(YEAR(D1)-1, MONTH(D1)+1, 0)
This formula, just like the EOMONTH function, returns the end of the month for exactly one year ago. Another formula to return the end of month one year ago is as follows:
=D1-365-(DAY(D1)<>DAY(D1-365))
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12594) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Leap Years and Fiscal Periods.
Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!
Excel works very well with dates and times. One thing you cannot do, however, is to create a custom format that displays ...
Discover MoreWhen working with dates, it is often helpful to be able to calculate some date in the future based on a starting date. ...
Discover MoreIf your company closes out its accounting months at the end of each calendar quarter, figuring out the proper closing ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2018-04-22 16:42:56
Ian Wiggins
Allen,
I worked out this solution years ago because of an issue when looking at dates 5 or more years in the future. My solution is quite simple you either add or subtract to the date 365.25 multiplied by number of years. Using your example above $D1+SUM(365.25*1)=3/31/19. If you need a past date change the + to - and 3/31/17 is the answer. This works every time whether its a leap year, fiscal or calendar year and is always correct as long as you are only after dates if you need hours & minutes then this doesn't work.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2023 Sharon Parq Associates, Inc.
Comments