This page will present formulas to calculate the first day, last day of the month, quarter, or year.
TODAY has been used in all the examples, but you can replace it with your date value.
How to build a custom date
The technique to calculate custom dates has been detailed in this article.
But also, you will need to understand how the DATE function always returns a correct date.
First day - Last day of the month
These calculations are straightforward to do with the DATE function.
First day of the month
=DATE(YEAR(TODAY()),MONTH(TODAY()),1)
Last day of the month
In Excel, 1 is one day and not one hour. So using this rule, we have to subtract 1 from the formula that calculates the first day of the next month.
=DATE(YEAR(TODAY()),MONTH(TODAY())+1,1)-1
Or you can use the function EOMONTH
=EOMONTH(TODAY(),0)
First Monday of the month
=TODAY()-DAY(TODAY())+8-WEEKDAY(TODAY()-DAY(TODAY())+6)
Last Monday of the month
=DATE(YEAR(TODAY()),MONTH(TODAY())+1,1)-WEEKDAY(DATE(YEAR(TODAY()),MONTH(TODAY())+1,6))

Result in a workbook
The following workbook shows the different results according to the date of TODAY
First day - Last day of the year
You can find other examples of the first day or the last day in this article.
First day of the year
=DATE(YEAR(TODAY()),1,1)
Last day of the year
=DATE(YEAR(TODAY())+1,1,0)
or
=DATE(YEAR(TODAY()),12,31)
First Monday of the year
=DATE(YEAR(TODAY()),1,8)-WEEKDAY(DATE(YEAR(TODAY()),1,6))
Last Monday of the year
=DATE(YEAR(TODAY())+1,1,0)-WEEKDAY(DATE(YEAR(TODAY()),1,6))

Current, Previous or Next Quarter
For the calculation of a specific date of a quarter, the formulae are in this article.

Number of days in the month
An essential and often ignored information is the number of days in a month. For monthly reports, this information is very important.
The following formulas allow you to return the number of days in a month.
Number of days in the current month
=DAY(DATE(YEAR(TODAY()),MONTH(TODAY())+1,1)-1)
Number of days in the next month
=DAY(DATE(YEAR(TODAY()),MONTH(TODAY())+2,1)-1)
Number of days in the previous month
=DAY(DATE(YEAR(TODAY()),MONTH(TODAY()),1)-1)
27/01/2025 @ 19:54
pls i need your help as in how to get ""The last date of yhe previous quarter from a given date"" not today nor current date.thanks a bunch.
28/01/2025 @ 03:23
Hi, in this article, you will find all the formula to return a quarter date. To find the last day of a quarter, simply subtract 1 (for one days)
17/06/2022 @ 13:38
please help me
if today 2nd day of current month is monday and 1st date of current month is Sunday then return last month end date in excel.
Example if today 02-05-2022 is Monday then return last month end date (30-04-2022)
please help me
13/11/2021 @ 03:59
Here is another way to calculate the first day of the month...
=TODAY()-DAY(TODAY())+1
30/07/2021 @ 17:10
This is great! Thank you.
I have tried - unsuccessfully - to have Excel give me the first day and date of each month for future years to plan events. A check list, if you will. I can use the vlookup function with a list of all the dates in a year but am using a calendar with one month per sheet.
I use a preformatted calendar for the following years and modify it to highlight the current date - the day matching today() - as well as the current date in the prior or following month, as well as some other items. E.g. highlighting the day when a particular event occurs or person is working.
27/05/2021 @ 13:31
I want to get last day of the financial year from a date. Example- if input is 10/05/2021...output will be 31/03/2022
20/12/2020 @ 18:46
Thank you, Your post has helped me on a project i am working on.
20/12/2020 @ 20:05
🙂
09/12/2020 @ 23:49
Thank You. First and Last Day of the Year Formulas are greatly appreciated.
So great to find help when needed.
30/08/2019 @ 17:16
Thank you for publishing these. It helped with a spreadsheet I'm working on. I did discover an error in a couple of the formulas though. The YEAR function is missing a closing parenthesis in the first day of the year and last day of the year examples.
31/08/2019 @ 03:34
Thanks
30/08/2019 @ 14:37
Nice blog post. I found a typo that you may want to fix. First day of year - You are missing an end parenthesis. It should read: =DATE(YEAR(TODAY()),1,1)
31/08/2019 @ 03:33
Thanks 🙂