Example 1
Read the day of the month
B2 =DAY(A2)
Result: 15
DAY returns only the day-of-month part of the date.
B2 =DAY(A2) returns 15
Returns the day of the month of a date, as a number from 1 to 31.
Syntax
=DAY()
All versions of Excel.
Try it
Edit the formula in B2 or change the inputs. The sheet recalculates as you type.
B2 =DAY(A2) returns 15
DAY reads a date and returns the day of the month as a number from 1 to 31: =DAY(A2) with 15 March 2025 in A2 returns 15. Together with YEAR and MONTH it lets you take a date apart and rebuild it with DATE.
DAY is the day of the month, not the day of the week and not the day of the year. For the weekday, use WEEKDAY or TEXT(A2,"dddd"). For the day of the year, subtract 1 January from the date and add one: =A2-DATE(YEAR(A2),1,1)+1.
serial_number is the date, normally a cell reference. It can also be a nested function such as =DAY(TODAY()), or ISO text like "2025-03-15". An empty cell returns 0, because Excel reads it as 0 January 1900, whose day is 0. If a column might contain blanks, use =IF(A2="","",DAY(A2)).
Combine DAY with EOMONTH to find how many days a month has: =DAY(EOMONTH(A2,0)) returns 31 for March and 29 for February 2024. EOMONTH returns the last day of the month, and DAY reads its day number. This is the standard way to prorate monthly figures, such as rent for a part month: =B2/DAY(EOMONTH(A2,0))*(DAY(EOMONTH(A2,0))-DAY(A2)+1) charges from the move-in day to the month end, inclusive.
=A2-DAY(A2)+1. Taking away the day number and adding 1 lands on day 1.=A2-DAY(A2).=DATE(2025,6,DAY(A2)). If the month is shorter, DATE rolls forward, so day 31 in June becomes 1 July.=DAY(A2)=1.=IF(DAY(A2)<=15,"First half","Second half").Joining with & returns text. ="Day "&DAY(A2) is the string "Day 15". If you need the result as a number, keep DAY on its own or wrap the whole thing in VALUE.
DAY ignores the time part of a date-and-time value, so a timestamp such as 15 March 2025 23:59 still returns 15.
"2025-03-15". Text that isn't a recognisable date returns #VALUE!.Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
B2 =DAY(A2)
Result: 15
DAY returns only the day-of-month part of the date.
B2 =DAY(A2) returns 15
Example 2
B2 =DAY(EOMONTH(A2,0))
Result: 29
EOMONTH returns 29 February 2024, and DAY reads its day number. 2024 is a leap year.
B2 =DAY(EOMONTH(A2,0)) returns 29
Example 3
B2 =A2-DAY(A2)+1
Result: 01-Sep-2025
Subtracting 23 days from 23 September lands on 31 August, and adding 1 gives 1 September 2025, serial 45901.
B2 =A2-DAY(A2)+1 returns 01-Sep-2025
Example 4
C2 =B2/DAY(EOMONTH(A2,0))*(DAY(EOMONTH(A2,0))-DAY(A2)+1)
Result: 300.00
June has 30 days. From the 21st to the 30th is 10 days, so the charge is 900 / 30 x 10 = 300.
C2 =B2/DAY(EOMONTH(A2,0))*(DAY(EOMONTH(A2,0))-DAY(A2)+1) returns 300.00
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In B2, return the day of the month for the date in A2. Fill it down to B4.
Answer in B2, then it fills down to B4.
TEXT(A2,"dddd").IF(A2="","",DAY(A2)) when the column has gaps.=DATE(2025,2,DAY(A2)) with A2 on the 31st returns 3 March, not 28 February. Use EDATE or EOMONTH to stay inside the month.#VALUE!. Convert them with DATEVALUE or Text to Columns first.Use `=DAY(A2)`. The result is a number from 1 to 31. To get the day name instead, use `=TEXT(A2,"dddd")`.
Use `=DAY(EOMONTH(A2,0))`. EOMONTH finds the last day of the month and DAY reads its number, so it handles leap years too.
DAY returns the day of the month for one date, such as 15. DAYS counts the number of days between two dates, such as 73.
Use `=A2-DAY(A2)+1`, or `=EOMONTH(A2,-1)+1`. Both return day 1 of the same month as a real date.
DAY is taught in Dates and financial modelling, lesson 2: Building and splitting dates. Each lesson is a short, graded exercise like the one above.