Skip to content

DAY

Returns the day of the month of a date, as a number from 1 to 31.

Syntax

=DAY()

Date and time

All versions of Excel.

Try it

Edit the formula in B2 or change the inputs. The sheet recalculates as you type.

B2
A
B
C
1
Invoice date
Day
2
15-Mar-2025
15
3

B2 =DAY(A2) returns 15

How DAY works

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.

What DAY is not

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.

The one argument

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)).

Days in a month

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.

Building dates

  • First day of the month: =A2-DAY(A2)+1. Taking away the day number and adding 1 lands on day 1.
  • Last day of the previous month: =A2-DAY(A2).
  • Same day in another month: =DATE(2025,6,DAY(A2)). If the month is shorter, DATE rolls forward, so day 31 in June becomes 1 July.
  • Is it the 1st: =DAY(A2)=1.
  • Payroll before or after the 15th: =IF(DAY(A2)<=15,"First half","Second half").

DAY and text

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.

Arguments

serial_number
The date to read: a cell holding a date, a date built with DATE, or text Excel can read as a date, such as "2025-03-15". Text that isn't a recognisable date returns #VALUE!.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

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
A
B
C
1
Invoice date
Day
2
15-Mar-2025
15
3

B2 =DAY(A2) returns 15

Example 2

Number of days in the month

B2 =DAY(EOMONTH(A2,0))

Result: 29

EOMONTH returns 29 February 2024, and DAY reads its day number. 2024 is a leap year.

B2
A
B
C
1
Date
Days in month
2
10-Feb-2024
29
3

B2 =DAY(EOMONTH(A2,0)) returns 29

Example 3

First day of the month from any date

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
A
B
C
1
Date
Month start
2
23-Sep-2025
01-Sep-2025
3

B2 =A2-DAY(A2)+1 returns 01-Sep-2025

Example 4

Prorate a monthly charge for a part month

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
A
B
C
D
1
Start date
Monthly fee
First month charge
2
21-Jun-2025
900.00
300.00
3

C2 =B2/DAY(EOMONTH(A2,0))*(DAY(EOMONTH(A2,0))-DAY(A2)+1) returns 300.00

Your turn.

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.

B2
A
B
C
D
E
1
Date
Day
Days in month
2
15-Mar-2025
3
29-Feb-2024
4
07-Nov-2025
5

Common mistakes

  • DAY is the day of the month, not the weekday. For Monday, Tuesday and so on, use WEEKDAY or TEXT(A2,"dddd").
  • An empty cell returns 0, not an error. Wrap the formula in IF(A2="","",DAY(A2)) when the column has gaps.
  • Rebuilding a date with the same day in a shorter month rolls forward. =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.
  • Text dates that Excel can't read return #VALUE!. Convert them with DATEVALUE or Text to Columns first.

Questions people ask

How do I extract the day from a date in Excel?

Use `=DAY(A2)`. The result is a number from 1 to 31. To get the day name instead, use `=TEXT(A2,"dddd")`.

How do I find how many days are in a month?

Use `=DAY(EOMONTH(A2,0))`. EOMONTH finds the last day of the month and DAY reads its number, so it handles leap years too.

What is the difference between DAY and DAYS?

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.

How do I get the first day of the month?

Use `=A2-DAY(A2)+1`, or `=EOMONTH(A2,-1)+1`. Both return day 1 of the same month as a real date.

Learn DAY in a real sheet.

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.