FormulaGenius
Date & Time

Last Day of Month

Get the last day of the month for any given date. Automatically handles months with 28, 29, 30, or 31 days including leap years.

Excel Formula

=EOMONTH(A2, 0)

Step-by-Step Explanation

1

EOMONTH returns the last day of a month

2

A2 is any date in the target month

3

0 means the same month as A2

4

Use 1 for next month's end, -1 for previous month's end

5

Handles leap years automatically

Example

Date (A)Last Day (B)
2/10/20262/28/2026
2/10/20282/29/2028
7/15/20267/31/2026

Result: Formula in B2: =EOMONTH(A2,0) → 2/28/2026

Common Variations

Days remaining in month

=EOMONTH(A2,0)-A2

Days left in current month

Last day of next month

=EOMONTH(A2,1)

End of following month

First day of month

=EOMONTH(A2,-1)+1

First day of the current month

Need a Custom Version?

Use our AI generator to create a formula tailored to your specific data and requirements.

Try It with AI →

Related Templates