Excel Function Reference

EOMONTH

Returns the last day of a month shifted by the number of months you need: for payment terms and "by the end of the month" reports.

EOMONTH(start_date, months)
start_date
The date to count from, for example the invoice date in B2.
months
How many months to shift: 0 keeps this month, 1 gives the next one, -1 the previous one.

Return value

The date of the last day of the month shifted by the given number of months. Without a date format, the cell shows it as a number like 46053.

Examples

Payment due by the end of next month

fx
A
B
C
D
1
2
3
4
5
6
7
Invoice
Invoice date
Pay by
#101
05.01.2026
#102
31.01.2026
#103
15.03.2026
#104
20.11.2026
Sheet1

Details

EOMONTH takes a date and finds the end of a month. The second argument says which one: 0 takes the same month, 1 the next one, -1 the previous one.

The function knows how many days each month has and accounts for February 29 in leap years.

The result comes as a number. To see a date, give the cell a date format.

Common mistakes

  • The cell shows a number like 46081 instead of a date. Give it a date format.
  • You need the first day of the month, not the last. Get it as the end of the previous month plus one day: =EOMONTH(A2,-1)+1.

See also