DAY
Extracts the day of the month (1-31).
=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
Example: A2
Formula patterns
Examples
Extract day from a transaction date
=DAY(A2)Categorize early versus late month entries
=IF(DAY(A2)<=15, "First Half", "Second Half")Isolate the day for a 30-day billing cycle check
=DAY(B2)Avoid these issues
Common Errors
#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.
#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
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.