Date & time function

DAY function

Returns the day of the month (1 to 31) from a date.

Available in All versions of Excel (Windows and Mac), Excel for Microsoft 365, Excel for the web

In every Excel versionWorks in Google Sheets

Syntax

DAY(serial_number)
ArgumentWhat it means
serial_numberRequiredA date: a cell containing a date, a formula that returns one, or a date serial number.

Returns: A whole number from 1 to 31.

How DAY works

DAY pulls the day-of-month number out of a date. Given 15 March 2026 it returns 15. On its own that is simple, but it becomes useful in rules that depend on where in the month something happens: invoices raised after the 25th go to next month's run, a rent reminder fires on the 1st, or a report should show only the first half of the month.

DAY is one of three sister functions — YEAR, MONTH and DAY — that split a date into parts. Use them together with DATE to rebuild modified dates, for example DATE(YEAR(A2),MONTH(A2),1) for the first of the month. The argument must be a real date; text that only looks like a date may give #VALUE! or an unexpected result.

Examples

1Get the day number from a date

B2fx=DAY(A2)
AB
1Order dateDay
22026-03-1515

Result: 15

DAY returns 15 because the order was placed on the 15th of the month.

2Route invoices to this month's or next month's payment run

B2fx=IF(DAY(A2)>=25,"Next run","This run")
AB
1Invoice datePayment run
22026-11-27Next run

Result: Next run

The invoice is dated the 27th, which is on or after the 25th cut-off, so it is held for the next payment run.

3Number of days in a month

B2fx=DAY(EOMONTH(A2,0))
AB
1Any date in the monthDays in month
22028-02-1029

Result: 29

EOMONTH returns the last day of the month (29 Feb 2028, a leap year) and DAY reads its day number, giving the month's length.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 15 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!The argument is text that cannot be read as a date.Convert the text with DATEVALUE first.
Unexpected 0The referenced cell is empty — Excel treats it as serial 0 ('0 Jan 1900').Wrap in IF(A2="","",DAY(A2)).

Tips

  • To display the day as text such as "Sun" or "Sunday" use TEXT(A2,"ddd") or TEXT(A2,"dddd") — DAY only gives the number.
  • DAY works on date-time values too: the time part is simply ignored.

Questions

How do I get the day name instead of the number?

Use =TEXT(A2,"dddd") for the full name or WEEKDAY for a 1–7 number. DAY returns only the day of the month.

Why does DAY return 0?

The source cell is blank. Excel treats an empty cell as serial 0, whose day part is 0.

Google Sheets

DAY also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

DAY in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

Recipes that use DAY