Explanation

In this example, the goal is to get the first day of the month based on any valid date. This problem can be solved by combining the EOMONTH function with simple addition.

The EOMONTH Function

The EOMONTH function returns the last day of the month, a given number of months in the past or future. For example, with a start date of January 15, 2025, EOMONTH will return the following results with months set to -1, 0, and 1:

=EOMONTH("15-Jan-2025",-1) // returns 31-Dec-2024
=EOMONTH("15-Jan-2025",0)  // returns 31-Jan-2025
=EOMONTH("15-Jan-2025",1)  // returns 28-Feb-2025

Note that the start date remains the same, but the month varies. Negative months cause EOMONTH to move back in time, and positive months move forward, but the result is always the end of the month.

How the formula works

The formula =EOMONTH(B5,-1)+1 works in two steps. First, it moves back to the last day of the previous month, relative to the given date. Next, it adds one day to end up on the first day of the current month. Working from the inside out with a start date of January 12, 2025:

=EOMONTH("12-Jan-2025",-1)+1  // move back 1 month
="31-Dec-2024"+1  // add 1 day
="1-Jan-2025"  // final result

The result is always the first day of the month for any given date. As the formula is copied down, the process is repeated for each date in column B.

First day of current month

To get the first day of the current month, you can use the same approach but replace the date reference with the TODAY function :

=EOMONTH(TODAY(),-1)+1

This formula will automatically update each day to show the first day of whatever month it currently is. For example, if today is June 21, 2025, the formula will return June 1, 2025. If you open the same worksheet in July, the result will be July 1, 2025. The formula works exactly the same way as the main example:

=EOMONTH(TODAY(),-1)+1
=EOMONTH("21-Jun-2025",-1)+1  // get current date
="31-May-2025"+1  // move back 1 month
="1-Jun-2025"  // add 1 day

This approach is useful in reports and dashboards that need to display current-month information. Since TODAY recalculates whenever the worksheet recalculates, this formula will always return the first day of the current month.

Variations

You can easily change how this formula works by changing the number of months used inside the EOMONTH function. The pattern EOMONTH(date, n-1)+1 will give you the first day of the month that is n months away from your reference date:

=EOMONTH(B5,0)+1 // first day of next month
=EOMONTH(B5,-1)+1 // first day of current month
=EOMONTH(B5,-2)+1 // first day of previous month
=EOMONTH(B5,-7)+1 // first day of month 6 months ago
=EOMONTH(B5,5)+1 // first day of month 6 months forward

To move forward or backward n months without changing the date, see the EDATE function .

Alternative formula

You can also get the first day of a month using the DAY function in a formula like this:

=B5-DAY(B5)+1

This formula was the standard way to get the first day of the month before the EOMONTH function was introduced to Excel. This formula works in three steps:

  1. Get the day number from the date with DAY(B5) .
  2. Subtract the day from the date (rewind to day 0 = last day of the previous month).
  3. Add 1 day to end up on the first day of the current month.

For example, with a start date of January 12, 2025:

=B5-DAY(B5)+1
="12-Jan-2025"-12+1
="31-Dec-2024"+1
="1-Jan-2025"

Both formulas work reliably, but the EOMONTH formula is slightly easier to understand and configure.

Explanation

The EOMONTH function returns the last day of a month based on a given date. The 2nd argument is months , which specifies how many months in the future or past to move before returning the last day. By traveling back 2 months, then adding one day, we can calculate the first day of the previous month from any given date.

In the example shown, months is supplied as -2, which causes EOMONTH to return 4/30/2015. Then, 1 day is added to get 5/1/2015.