# DAY function in Excel

> DAY returns the day of the month from a date, as a number from 1 to 31.

Source: https://spreadsheetpractice.com/functions/day · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

## Quick answer

- **What it does:** DAY returns the day of the month from a date, as a number from 1 to 31.
- **Syntax:** `=DAY(serial_number)`
- **Most common use:** `=DAY(B2)` returns 1 (Rent is due on the 1st)
- **Available in:** Every current version
- **Category:** [Date functions](https://spreadsheetpractice.com/functions/category/date)
- **Returns:** A whole number from 1 to 31.
- **Google Sheets:** Works the same in Google Sheets.

## What it does

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.

## Syntax

`=DAY(serial_number)`

| Argument | Required? | What it is |
|---|---|---|
| `serial_number` | Required | The date to read, usually a cell reference. |

## Examples

Each result was calculated by running the formula on the sample sheet.

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

### The sample sheet

Every formula above runs on this data:

|  | A | B | C | D |
|---|---|---|---|---|
| 1 | Payment | Due date |  | Result |
| 2 | Rent | 4/1/2026 |  | 1 |
| 3 | Car loan | 4/17/2026 |  | FALSE |
| 4 | Card | 4/30/2026 |  | 30 |

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

## Related functions

- [MONTH](https://spreadsheetpractice.com/functions/month): MONTH returns the month of a date as a number from 1 to 12.
- [YEAR](https://spreadsheetpractice.com/functions/year): YEAR returns the four-digit year from a date.
- [WEEKDAY](https://spreadsheetpractice.com/functions/weekday): WEEKDAY returns the day of the week for a date as a number.
- [EOMONTH](https://spreadsheetpractice.com/functions/eomonth): EOMONTH returns the last day of the month a number of months before or after a date.

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

## Practice

A graded DAY exercise ("Bill due days") is on [the DAY page](https://spreadsheetpractice.com/functions/day). It is checked instantly, then re-checked on changed data.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
