What is the WEEKDAY function?
=WEEKDAY(serial_number, [return_type])WEEKDAY tells you the day of the week of a date as a number. Use it with IF to check for weekends or give different values by weekday.
The same weekday gets a different number depending on return_type. Change the type on the calendar above to see the numbers under the weekday names change. Mixing up the types is a common mistake.
Arguments
- serial_number
- The date whose weekday you want.
- return_type
- Optional. 1 (omitted): Sunday 1 to Saturday 7; 2: Monday 1 to Sunday 7; 3: Monday 0 to Sunday 6. Excel also has types 11 to 17 that set the starting day.
WEEKDAY examples
Example 1. Get the weekday number
=WEEKDAY(DATE(2026,5,4))May 4, 2026 is a Monday, so type 1 gives 2.
Example 2. Check for a weekend
=IF(WEEKDAY(A2, 2)>5, "Weekend", "Weekday")In type 2, Saturday is 6 and Sunday is 7, so "greater than 5" means a weekend.
Common mistakes
Leaving out the type and assuming Monday is 1
Without a type, Sunday is 1 and Monday is 2. Use type 2 to count Monday as 1.
Expecting a day name
WEEKDAY returns only a number. For a name such as "Mon", use TEXT(A2, "ddd") or TEXT(A2, "dddd").
FAQ
- When is type 3 useful?
- It counts Monday as 0, so date minus WEEKDAY(date,3) is the Monday of that week. Handy for grouping by week.
- What if the type number does not exist?
- According to Microsoft, a return_type not in the table gives #NUM!.