DAY function
DAY returns the day of the month from a date, as a number from 1 to 31. It is useful for spotting dates in the first or second half of a month, lining up bills by due day, or finding how many days a month has when combined with EOMONTH.
- Available in
- Every current version
- Category
- Date functions
- Returns
- A whole number from 1 to 31.
- Google Sheets
- Works the same in Google Sheets.
Syntax
=DAY(serial_number)
| Argument | Required? | What it is |
|---|---|---|
serial_number | Required | The date to read, usually a cell reference. |
Examples
Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.
| Cell | Formula | Result | What it shows |
|---|---|---|---|
| D2 | =DAY(B2) | 1 | Rent is due on the 1st |
| D3 | =DAY(B3)<=15 | FALSE | FALSE: the car loan falls in the second half of the month |
| D4 | =DAY(EOMONTH(B4,0)) | 30 | April has 30 days |
Try it live
This is the sample sheet. Change any number or text, or edit a formula, and the results update.
Show the sample data as a table
| Payment | Due date | Result | |
| Rent | 4/1/2026 | 1 | |
| Car loan | 4/17/2026 | FALSE | |
| Card | 4/30/2026 | 30 |
Practice DAY
Graded instantly, then re-checked on changed data.
Bill due days
C2, return the day of the month each bill is due. Fill down to C6.Common mistakes
| What you see | Why, and how to fix it |
|---|---|
| Counting days between two dates with DAY | DAY(B2)-DAY(A2) only compares the day numbers and breaks across months. Subtract the dates themselves, or use DAYS. |
| #VALUE! | The date is stored as text. Convert it with DATEVALUE first. |
Tips
- =DAY(EOMONTH(A2,0)) tells you how many days are in the month of A2, including leap-year Februaries.
Questions
How do I get the day number from a date in Excel?
Use =DAY(A2). For the weekday name instead, use =TEXT(A2,"dddd").
How do I find the number of days in a month?
Combine DAY with EOMONTH: =DAY(EOMONTH(A2,0)) returns 28 to 31 for the month of the date in A2.
Last reviewed October 2026. Every example result on this page is calculated live by the Spreadsheet Practice formula engine.