Spreadsheet Practice

WEEKDAY function

WEEKDAY returns the day of the week for a date as a number. By default Sunday is 1 and Saturday is 7, but the return_type argument lets you start the week on Monday, which makes weekend tests simpler. Use it to flag weekend dates, schedule shifts or group sales by day of week.

Available in
Every current version
Category
Date functions
Returns
A whole number for the day of the week.
Google Sheets
Works in Google Sheets with return types 1, 2 and 3.

Syntax

=WEEKDAY(serial_number, [return_type])

ArgumentRequired?What it is
serial_numberRequiredThe date to check.
return_typeOptionalHow to number the days. 1 or omitted: Sunday = 1 to Saturday = 7. 2: Monday = 1 to Sunday = 7. 3: Monday = 0 to Sunday = 6. Excel 2010 and later also accept 11 to 17 to start the week on another day.

Examples

Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.

CellFormulaResultWhat it shows
D2=WEEKDAY(A2)7Saturday is 7 with the default numbering (Sunday = 1)
D3=WEEKDAY(A3,2)7Sunday is 7 when the week starts on Monday
D4=IF(WEEKDAY(A4,2)>5,"Weekend","Weekday")WeekdayMonday, March 9 is a weekday

Try it live

This is the sample sheet. Change any number or text, or edit a formula, and the results update.

Show the sample data as a table
DateHoursResult
3/7/202667
3/8/202657
3/9/20268Weekday

Practice WEEKDAY

Graded instantly, then re-checked on changed data.

Number the shift days

In C2, return the weekday number for each shift date, counting Monday as 1 and Sunday as 7. Fill down to C6.

Common mistakes

What you seeWhy, and how to fix it
Weekend test catches the wrong daysWith the default numbering, the weekend is 1 and 7, not 6 and 7. Use return_type 2 so Saturday and Sunday are 6 and 7, then test >5.
The result shows as a date in January 1900The cell has a date format. Format it as General to see the number.
#VALUE!The date is text. Convert it with DATEVALUE first.

Tips

  • For the day name, use =TEXT(A2,"dddd") (Monday) or =TEXT(A2,"ddd") (Mon).
  • Count weekend dates in a list with =SUMPRODUCT(--(WEEKDAY(A2:A20,2)>5)).

Questions

How do I check if a date is a weekend in Excel?

Use =WEEKDAY(A2,2)>5. With return type 2, Saturday is 6 and Sunday is 7, so anything above 5 is a weekend.

Why does WEEKDAY return 1 for Sunday?

That is the default numbering, which starts the week on Sunday. Pass 2 as the second argument to start on Monday instead.

How do I get the day name instead of a number?

Use TEXT: =TEXT(A2,"dddd") returns the full name, such as Wednesday.

Last reviewed October 2026. Every example result on this page is calculated live by the Spreadsheet Practice formula engine.