DAY Function

Excel Functions › Date & Time

All Excel versions Date & Time

The Excel DAY function pulls the day-of-the-month number (1–31) out of any date. Feed it an invoice date and it tells you the 15th; pair it with MONTH and YEAR to take any date apart, and with DATE to put it back together shifted. One thing it is not: the day of the week — that’s WEEKDAY’s job.


Quick answer: to get the day of the month from a date in A2:
=DAY(A2)
If A2 holds 06/15/2026, the result is 15 — a plain number you can compare, sum, or feed into other formulas.

Syntax

=DAY(serial_number)
ArgumentDescription
serial_numberRequiredThe date to extract from — a cell containing a date, a DATE formula, or a raw serial number. Text that merely looks like a date may work but is risky; convert it first.

Why "serial_number"? Excel stores every date as a serial number — days counted since January 1, 1900 (June 15, 2026 is 46188; times are fractions of a day). DAY just reads the day component out of that count, which is why =DAY(46188) and =DAY("6/15/2026") both return 15.

Extract the day of the month

Point DAY at any real date and it returns the calendar day as a plain number:

ABC
1Invoice date=DAY(A)Meaning
206/15/20261515th of the month
301/01/20261first of the month
402/28/202628last day of Feb 2026
512/31/202631year-end
=DAY(A2) // returns 15 for 06/15/2026

That number plugs straight into logic. A classic billing rule — orders placed after the 25th bill next month:

=IF(DAY(A2) > 25, "Bill next month", "Bill this month")

Or rebuild the same date pinned to the first of its month (handy for grouping by month):

=DATE(YEAR(A2), MONTH(A2), 1) // first of A2’s month

Try it: interactive DAY demo

Live demo

Pick any date and watch DAY — alongside its siblings MONTH and YEAR — take it apart.

Practical day-of-month logic

DAY shines in date rules that depend on where in the month something happened:

=IF(DAY(A2) <= 15, "1st half", "2nd half") // semi-monthly payroll bucket
=DAY(EOMONTH(A2, 0)) // how many days are in A2’s month (28-31)
=DAY(A2) = DAY(EOMONTH(A2, 0)) // TRUE if A2 is the last day of its month

The middle formula is a favorite: EOMONTH finds the last day of the month, and DAY converts that date into the month’s length — 28, 29, 30, or 31 — with no lookup table.

Need the day with a leading zero, as text? Use TEXT: =TEXT(A2, "dd") returns "15" or "05". DAY always returns a plain number.

Errors & common pitfalls

#VALUE! — the argument isn’t a date Excel recognizes. Text like "June 15th" or "15.06.2026" (in a US locale) can’t be coerced into a serial number. Convert with DATEVALUE or rebuild with DATE first.

Pitfall: DAY is not the day of the week. =DAY("6/15/2026") returns 15, not "Monday". For weekday numbers use WEEKDAY; for weekday names use =TEXT(A2, "dddd").

Pitfall: the result shows as a date, not a number. If =DAY(A2) displays something like 01/15/1900, the cell inherited a date format. The value (15) is right — set the format back to General and the number appears.

Pitfall: text dates that secretly aren’t dates. A column of left-aligned "dates" imported from a CSV is text; DAY may parse some entries and choke on others depending on locale. Convert the whole column to real serial numbers before extracting parts.

Practice workbook

📊
Download the free DAY practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What's the difference between DAY and WEEKDAY?
DAY returns the day of the month (1–31). WEEKDAY returns the day of the week as a number (by default 1 = Sunday through 7 = Saturday). For June 15, 2026 — a Monday — DAY gives 15 and WEEKDAY gives 2.
How do I find how many days are in a month?
Combine DAY with EOMONTH: =DAY(EOMONTH(A2, 0)). EOMONTH returns the last date of A2’s month, and DAY turns it into 28, 29, 30, or 31 — leap years handled automatically.
Why does DAY return #VALUE! on my data?
The cell holds text Excel can't read as a date in your locale. Real dates are right-aligned serial numbers; imported text dates are usually left-aligned. Convert them with DATEVALUE, Text to Columns, or by rebuilding with DATE.
Why does =DAY(A2) show 01/15/1900 instead of 15?
The formula cell is formatted as a date, so Excel renders the number 15 as serial day 15 (January 15, 1900). The calculation is correct — change the cell format to General or Number.
Can DAY read a date that includes a time?
Yes. Times are stored as fractions of a day, and DAY ignores the fraction: =DAY(46188.75), which is 6 PM on June 15, 2026, still returns 15.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: MONTH · YEAR · DATE · EOMONTH · TODAY · TEXT