Dates function
WEEKDAY function in Google Sheets and Excel
WEEKDAY turns a date into the number of its day of the week, numbered the way you choose.
Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet
- Excel 2016
- Excel 2019
- Excel 2021
- Excel 2024
- Microsoft 365
- Google Sheets
Syntax
WEEKDAY(serial_number, [return_type])Arguments in [brackets] are optional. Google Sheets writes it WEEKDAY(date, [type]).
Example
=WEEKDAY(D2,2) reads: Return the day number of the due date in D2, counting Monday as 1 and Sunday as 7 (return type 2).
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Task | Owner | Start | Due | Hours | Due day no. | Holidays | |
| 2 | Kickoff workshop | Mara | 2 Mar 2026 | 4 Mar 2026 | 6 | 3 | 3 Apr 2026 | |
| 3 | Content audit | Jonas | 5 Mar 2026 | 20 Mar 2026 | 24 | 6 Apr 2026 | ||
| 4 | Wireframes | Priya | 16 Mar 2026 | 2 Apr 2026 | 40 | 1 May 2026 | ||
| 5 | Visual design | Elif | 30 Mar 2026 | 17 Apr 2026 | 56 | |||
| 6 | Copywriting | Tomás | 1 Apr 2026 | 24 Apr 2026 | 32 | |||
| 7 | Build | Kenji | 13 Apr 2026 | 15 May 2026 | 120 | |||
| 8 | Testing | Sofia | 11 May 2026 | 22 May 2026 | 30 | |||
| 9 | Launch | Leo | 26 May 2026 | 27 May 2026 | 8 |
F2 shows 3: 4 March 2026, the kickoff's due date, is a Wednesday.
How the spreadsheet calculates it
Gives the day of the week of D2 as a number (Monday = 1 … Sunday = 7).
- 1. WEEKDAY: Gives the day of the week of
D2as a number (Monday = 1 … Sunday = 7).date=`D2`: the date to check2=`2`: the numbering
More WEEKDAY examples
=WEEKDAY(D2)Sunday = 1 numbering: 4 for a Wednesday.=IF(WEEKDAY(D2,2)>5,"Weekend","Weekday")A label for weekend due dates.=D2-WEEKDAY(D2,3)The Monday of the due date's week.=SUMPRODUCT(--(WEEKDAY(D2:D9,2)=5))How many tasks are due on a Friday.
Paste any of these into the formula explainer to see it step by step.
Tips
- Always give return_type 2 when Monday starts your week; it makes weekend tests a simple
>5. - Use type 3 to step back to Monday:
date-WEEKDAY(date,3). - Format the result as a number, not a date.
What WEEKDAY is used for
Flagging weekend dates in schedules and timesheets, weekend pay rules, grouping sales by day of the week, and finding the start of a week for weekly reports.
Arguments
| Argument | Required | What it is |
|---|---|---|
| serial_number | Yes | The date to check. |
| return_type | No | How days are numbered: 1 or left out is Sunday = 1 to Saturday = 7; 2 is Monday = 1 to Sunday = 7; 3 is Monday = 0 to Sunday = 6. Excel also has 11 to 17, which pick the first day of the week.Watch out: A number outside the listed types gives #NUM!. |
Common mistakes
Leaving out the 2 and treating 1 as Monday: it's Sunday.
Testing for weekends with
>5while return_type is left out: then 6 is Friday and 7 Saturday, and Sundays are 1.Expecting a name like Wednesday: WEEKDAY gives a number.
TEXT(D2,"dddd")gives the name.
In Google Sheets
Google Sheets has WEEKDAY(date, [type]). Google's help documents types 1, 2 and 3, numbered as in Excel; Excel's extra types 11 to 17 aren't in Google's list, so stick to 1, 2 or 3 in shared files.
Errors you may see with WEEKDAY
Questions
How do I check if a date is a weekend?
WEEKDAY(D2,2)>5: with type 2, Saturday is 6 and Sunday 7. Wrap it in IF for a label: IF(WEEKDAY(D2,2)>5,"Weekend","Weekday").
How do I get the day name?
Use TEXT with "dddd" for the full name or "ddd" for the short one. WEEKDAY is for calculations; TEXT is for labels.
How do I find the Monday of a date's week?
Subtract the days since Monday: D2-WEEKDAY(D2,3) (type 3 counts Monday as 0). For 4 March 2026, a Wednesday, that's 2 March.
Sources
Official documentation the facts on this page were checked against.