Forum Discussion
EOMONTH
You don't anything wrong. Format the cell where you enter =EOMONTH(J4, 1) as Date
Lomburus : you may be wondering why Lorenzo can state with such absolute certainty that you didn't do anything wrong. What he didn't explain is how dates work in Excel. Here's an excerpt from Exceljet.net, a helpful website for understanding many aspects of Excel.
"In Excel's date system, dates are serial numbers beginning on January 1, 1900. January 1, 1900 is 1, January 2, 1900 is 2, and so on. More recent dates are much larger numbers. For example, January 1, 1999 is 36161, and January 1, 2010 is 40179."
It's this underlying feature that makes date math possible, which is the why behind the way Excel stores dates.
- LorenzoFeb 06, 2026Silver Contributor
Out of curiosity asked Copilot:
=EOMONTH(J4, 1) returns 45961 where I ma wrong
Lorenzo, nothing is actually “wrong” — 45961 is the correct internal Excel date‑serial number for the date returned by your formula.
Here’s what’s happening:
📌 Why you see 45961
Excel stores dates as sequential integers starting from 1 January 1900 = 1.
So:
- =EOMONTH(J4, 1)
→ returns the last day of the month after the month in J4
→ but Excel displays it as a number only if the cell is formatted as General or Number.
45961 corresponds to 31 March 2026 (if your system uses the standard 1900 date system).
✔️ How to fix it
Just format the cell as a date:
Home → Number Format → Short Date / Long Date
Or use:
=TEXT(EOMONTH(J4,1),"yyyy-mm-dd")if you want a date as text.
If you want, tell me what’s in J4 and what date you expect — I can validate the exact output.
- =EOMONTH(J4, 1)