ExcelDateBeginner

DAY

Extracts the day of the month (1-31).

Read the syntaxReview worked examplesOpen the spreadsheet app
=DAY(serial_number)

This static page keeps the function indexed for search, while the spreadsheet app handles interactive exploration and saved formulas.

What the function does

Overview

Extracts the day of the month (1-31).

The DAY function returns the day of the month as an integer ranging from 1 to 31. In Excel's calculation engine, dates are stored as sequential serial numbers starting from January 1, 1900 (serial number 1). This function parses the specific day component from that underlying serial value. For the most reliable results, provide a cell reference containing a valid date or use the DATE function to generate the input value. Avoid passing text-based dates directly into the formula, as regional date format settings (like MM/DD/YYYY vs DD/MM/YYYY) can lead to interpretation errors or #VALUE! results across different user environments. Note that the function extracts only the integer day and disregards any fractional time data associated with the serial number.

Quick reference

Syntax

=DAY(serial_number)

Inputs

Arguments

serial_numberThe date to extract from
Example: A2

Formula patterns

Examples

1

Extract day from a transaction date

=DAY(A2)
date parsingdata cleanup
2

Categorize early versus late month entries

=IF(DAY(A2)<=15, "First Half", "Second Half")
accountingconditional logic
3

Isolate the day for a 30-day billing cycle check

=DAY(B2)
financemetrics

Avoid these issues

Common Errors

1

#VALUE!

Cause: The serial_number argument is text that Excel cannot recognize as a valid date format.

Fix: Convert the text to a date using DATEVALUE or check for non-numeric characters or spaces in the source cell.

2

#NUM!

Cause: The serial_number provided is outside the valid range for Excel dates (negative values or numbers exceeding 2,958,465).

Fix: Ensure the input date falls between January 1, 1900 and December 31, 9999.

Platform support

Compatibility

Excel 2007+Excel-first

Source: Microsoft Support

Common questions

Frequently Asked Questions

Extracts the day of the month (1-31).

umber: The date to extract from

#VALUE!: Convert the text to a date using DATEVALUE or check for non-numeric characters or spaces in the source cell. #NUM!: Ensure the input date falls between January 1, 1900 and December 31, 9999.