Recommended tools
Software deals worth checking before you buy full price.
Browse AppSumo for founder tools, AI apps, and workflow software deals that can save real money.
Affiliate link. If you buy through it, this site may earn a commission at no extra cost to you.
⏱ 14 min read
You don’t need a calendar grid to know if a deadline falls on a Tuesday. In Excel, that logic is a single formula away, and doing it right saves hours of manual checking. The WEEKDAY function is the standard tool for converting a serial date into a number that represents the day of the week, but the default behavior often confuses people. By default, WEEKDAY returns a number where Sunday is 1 and Saturday is 7. That sounds logical, but if your business week starts on Monday, that output is actively misleading.
To truly master this, you have to stop treating WEEKDAY as a simple converter and start treating it as a filter for your specific business logic. Whether you are building an automated roster, calculating shipping cutoffs, or just trying to figure out if a holiday falls on a weekend, understanding the subtle configuration options is what separates a casual spreadsheet user from an expert.
Why the Default Output Breaks Your Logic
The most common mistake when using WEEKDAY is accepting the default return value without thinking. If you type =WEEKDAY(A2), Excel tells you that a Monday is 2, Tuesday is 3, and Sunday is 1. This creates a specific friction point when you try to write formulas that check for weekends. If your logic is IF(WEEKDAY(A2), "Work Day", "Weekend"), the formula fails immediately because every day returns a number, and zero is the only false value in Excel logic.
The real problem surfaces when you assume Sunday is the start of the week. In many corporate environments, Monday is the start of the work week. If you are automating a process that needs to flag Fridays and Saturdays for “No Work,” the default WEEKDAY output forces you to write a complex condition like OR(B2=6, B2=7). That is messy code. It invites errors, it’s hard to read, and it feels fragile.
The function solves this by accepting a second argument called the return_type. This parameter changes the entire scale of the numbers returned. You can shift the scale so that Monday becomes 1 and Sunday becomes 7, which aligns perfectly with a standard Monday-through-Friday work week. Alternatively, you can shift it so that Sunday is 0 and Saturday is 6, which is often cleaner for programming logic where zero represents “no value” or “weekend.”
Key Insight: Never assume the default return type of the WEEKDAY function matches your business calendar. Always verify the starting day and the ending day of the week scale before writing your logic.
The Scale of Return Types: Choosing Your Number System
The power of WEEKDAY lies in its ability to swap the numerical identity of the days. There are 11 distinct return types available in the function, though only a few are used in daily practice. Choosing the right one depends entirely on how you intend to use the resulting number in a subsequent calculation or conditional statement.
The most common confusion involves the difference between Return Type 1 and Return Type 2. Both start on Monday, but they handle Sunday differently. Type 1 treats Sunday as 7, while Type 2 treats Sunday as 0. This distinction matters if you are using the result in an arithmetic equation. If you need to calculate the number of days remaining in a work week, having Sunday as 7 means you subtract the result from 7. If Sunday is 0, you subtract from 6. Getting this wrong results in off-by-one errors that propagate through your entire dataset.
Another frequent use case is Return Type 3, which is the most popular for general business use. It sets Monday as 1 and Sunday as 7. This matches the traditional ISO standard for many regions and works intuitively for anyone who considers Monday the first day of the work week. It allows for the cleanest conditional statements, such as IF(WEEKDAY(date, 3), "Work", "Rest"), because any non-zero number indicates a work day.
For those dealing with legacy systems or specific international standards, other return types exist. For instance, Type 4 sets Sunday as 1 and Saturday as 7, effectively reversing the standard business week. Type 5 is similar but sets Sunday as 1 and Saturday as 7, which is identical to Type 1 but with Sunday as the start. Type 6 is the rarest, setting Sunday as 0 and Saturday as 6, which is essentially the same as Type 2 but with a different starting point.
Practical Tip: If you are building a dashboard for a global team, stick to Return Type 3 (Monday=1, Sunday=7) or Type 2 (Monday=1, Sunday=0) to avoid confusion between Monday-start and Sunday-start cultures.
The following table summarizes the most relevant return types for daily business tasks, highlighting the start and end days of the week for each.
| Return Type | Start Day | End Day | Sunday Value | Monday Value | Best Use Case |
|---|---|---|---|---|---|
| 1 | Sunday | Saturday | 1 | 2 | Legacy systems requiring Sunday first |
| 2 | Monday | Sunday | 0 | 1 | Programming logic where 0 = weekend |
| 3 | Monday | Sunday | 7 | 1 | General business (Monday start) |
| 4 | Sunday | Saturday | 1 | 2 | ISO standard (Europe/Australia) |
| 5 | Sunday | Saturday | 1 | 2 | Legacy systems (same as Type 1) |
| 6 | Sunday | Saturday | 0 | 1 | Rare, specific legacy requirements |
When you select the return type, you are essentially defining the language your data speaks. If your downstream reports expect a “1” for Monday, forcing Excel to return “2” will break the visual alignment of your charts. It is a small configuration step that ensures your data integrity remains intact across different departments.
Handling Leap Years and Invalid Dates
One of the most robust features of the WEEKDAY function is its ability to handle invalid dates without crashing. In many Excel formulas, if you input a date that does not exist, such as February 30th, the function returns a #NUM! error. This halts the calculation and displays an error message in the cell, ruining the spreadsheet’s appearance.
WEEKDAY, however, is designed to be forgiving. If you enter a date like February 30, 2024, the function does not throw an error. Instead, it calculates the date that falls closest to the invalid input. In this specific case, it treats February 30 as March 2nd. It then returns the correct weekday number for March 2nd. This behavior is invaluable when working with user-generated data where typos are common. You can build a roster where users accidentally type the 30th of a short month, and your automated checks will still run, flagging the day correctly rather than breaking the sheet.
This forgiving nature also extends to leap years. When calculating dates across multiple years, WEEKDAY correctly identifies that February 29th only exists in leap years. If you are building a formula to check if a specific date is a weekend, the function will correctly return a weekend number for February 29th in a leap year, and a weekday number for the same date in a non-leap year. This consistency is crucial for long-term planning and trend analysis where historical data might contain varying calendar structures.
However, there is a caveat regarding very old dates. Excel serial numbers begin on January 1, 1900. If you attempt to use WEEKDAY on a date prior to this epoch, the function will return a #VALUE! error. While this is rare in modern business contexts, it is a critical boundary condition for historical data analysis. Always ensure your date inputs fall within the supported range of the software version you are using.
Combining WEEKDAY with Other Functions for Advanced Logic
The WEEKDAY function rarely stands alone in a professional spreadsheet. Its true potential is unlocked when combined with other functions to create dynamic logic. The most frequent partner is the IF function, used to create conditional formatting or status indicators. A simple setup might look like this: =IF(WEEKDAY(A2,3)<=5, "Work Day", "Weekend"). This instantly categorizes every date in a column without manual intervention. This is the backbone of automated scheduling systems.
For more complex scenarios, WEEKDAY works seamlessly with CHOOSE or INDEX to translate numbers into text labels. Instead of seeing “4” in a cell, you can display “Thursday” directly. A formula like =CHOOSE(WEEKDAY(A2,3), "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") forces the result to be text, which is essential for data visualization tools like PivotTables or charts that require string labels rather than numeric codes. This approach also allows for custom labeling, such as changing “Saturday” and “Sunday” to “OFF” for a holiday tracking sheet.
Another powerful combination involves NETWORKDAYS and WORKDAY. While NETWORKDAYS counts the number of working days between two dates, WEEKDAY can be used to determine the specific day of the first or last date in that range. For example, if you know a project starts on a Tuesday and lasts for 10 working days, you can use WEEKDAY to calculate exactly which calendar day the project ends, accounting for weekends and holidays. This level of precision is essential for project management and resource allocation.
You can also nest WEEKDAY inside SUMIFS or COUNTIFS to filter data based on the day of the week. Imagine you have a sales log and want to know the total revenue generated on Tuesdays. You would write a formula that sums the sales column only where the date column matches a specific weekday number. This dynamic filtering allows for instant reporting on weekly performance trends without needing to create separate sheets for each day.
Real-World Scenarios: From Rostering to Payroll
The application of WEEKDAY extends far beyond simple date checking. In human resources, it is the engine behind automated rostering. Managers often need to ensure that staff are not scheduled for double shifts on consecutive weekends or that mandatory rest days are observed. By assigning a weekday number to every date in a roster, the system can automatically flag conflicts. If an employee is scheduled for a shift on Friday (5) and the next shift is on Monday (1), the system knows a weekend gap exists. If the gap is too short or violates labor laws, the system can alert the manager before the schedule is finalized.
In payroll processing, WEEKDAY helps calculate overtime and weekend premiums. If an employee works on a Saturday, the system can automatically apply a 1.5x multiplier to their hours by checking if the WEEKDAY number corresponds to a Saturday or Sunday. This automation reduces manual calculation errors and ensures compliance with labor regulations. It also simplifies the creation of payslips, where the day of the week can be printed alongside the net pay to provide transparency to the employee.
Financial analysts also rely on WEEKDAY for trading schedules. Stock markets are closed on weekends and holidays. By using WEEKDAY to filter out non-trading days, analysts can ensure that their calculations for open-to-close returns are based only on actual trading days. This prevents distortion in performance metrics that would occur if weekend gaps were counted as trading days.
Expert Observation: The most robust Excel models I’ve seen use
WEEKDAYnot just to identify the day, but to drive the entire workflow logic. It acts as the switch that determines whether a process runs, pauses, or escalates based on the calendar.
The following table illustrates how different departments utilize the output of the WEEKDAY function to drive their specific operational needs.
| Department | Primary Use of WEEKDAY | Logic Example | Outcome |
| :— | :— | :— | :— | :— |
| HR | Roster Management | IF(WEEKDAY>=6, "No Work") | Auto-blocks weekend shifts | Reduced scheduling conflicts |
| Finance | Payroll Calculation | IF(WEEKDAY=2, "Overtime") | Flags Saturday work | Accurate premium pay application |
| Sales | Performance Tracking | SUMIFS(..., WEEKDAY=3) | Sums Wednesday sales | Weekly trend analysis |
| Logistics | Shipping Cutoffs | WEEKDAY(date, 3)<=3 | Flags Mon-Wed cutoffs | Faster dispatch planning |
Troubleshooting Common Formula Errors
Even with the correct syntax, WEEKDAY formulas can fail. The most common error is the #VALUE! error, which usually stems from the date cell containing text instead of an actual date serial number. For example, if a user types “Jan 1, 2023” as text, Excel cannot interpret it as a date. The formula will return #VALUE!. The solution is to clean the data source, ensuring all dates are formatted correctly as Excel dates before applying the function. Sometimes, simply re-entering the date by clicking the calendar icon fixes the issue.
Another frequent issue is the mismatch between the expected and actual return type. Users often write =WEEKDAY(A2) expecting a Monday to be 1, only to find it is 2. This causes their IF statements to fail. The fix is always to explicitly specify the return type as the second argument. Changing the formula to =WEEKDAY(A2, 3) resolves the logic mismatch and aligns the output with business expectations.
A less common but tricky error involves the #NUM! error, which occurs when the date is invalid, such as February 30th in a non-leap year. While WEEKDAY is generally forgiving, if the input is pushed beyond the valid date range of Excel (before 1900 or after 9999), the function will crash. To handle this, wrap the WEEKDAY function in an IFERROR function to catch these extreme cases and display a custom message or a default value instead of an error code.
Final Warning: Always validate your source data. A perfectly written
WEEKDAYformula cannot fix a cell that contains text disguised as a date. Clean your data before you build your logic.
Final Thoughts on Precision in Spreadsheets
Mastering the WEEKDAY function is about more than memorizing numbers; it is about understanding the context of your calendar. The default settings of Excel often assume a Sunday-start week, but the world runs on Monday-start weeks in many industries. By adjusting the return type, you align your spreadsheet with the reality of your business operations.
The flexibility of WEEKDAY allows you to build dynamic, error-resistant models that can handle leap years, invalid inputs, and complex logic without breaking. Whether you are automating a simple weekend flag or a complex payroll engine, the ability to convert a date into a precise numeric code is a foundational skill. It turns a static calendar into an active tool that drives decision-making.
Don’t let the complexity of date logic slow you down. With the right configuration of WEEKDAY, you can create spreadsheets that are not just calculators, but intelligent assistants that understand the rhythm of the week. Use the return types wisely, validate your data, and let the numbers do the heavy lifting.
FAQ
Why does my WEEKDAY formula return 2 for Monday when I expect 1?
By default, Excel returns 1 for Sunday and 2 for Monday. To get 1 for Monday, you must add a second argument to the formula: =WEEKDAY(A1, 3). This sets Monday as the start of the week.
Can WEEKDAY handle dates in text format?
No. If a cell contains text like “January 1, 2023” instead of an actual date serial number, the function will return a #VALUE! error. You must ensure the cell is formatted as a Date or converted using DATEVALUE.
How do I check if a date is a weekend using WEEKDAY?
Use a conditional statement like =IF(OR(WEEKDAY(A1,3)=6, WEEKDAY(A1,3)=7), "Weekend", "Work Day"). This checks if the number is 6 (Saturday) or 7 (Sunday) based on the Monday-start scale.
What happens if I enter an invalid date like Feb 30th?
Unlike many other functions, WEEKDAY does not return an error for invalid dates. It automatically adjusts the date to the nearest valid day (e.g., March 2nd) and returns the correct weekday for that adjusted date.
Is there a difference between WEEKDAY Type 1 and Type 2?
Yes. Both use a Monday-start week, but Type 1 returns 1 for Monday and 7 for Sunday, while Type 2 returns 1 for Monday and 0 for Sunday. Type 2 is often preferred in programming logic where 0 represents “no work” or “weekend.”
How can I make WEEKDAY case-insensitive or handle holidays?
WEEKDAY itself only checks the day of the week. To handle holidays, you typically combine it with the NETWORKDAYS function or use a separate list of holiday dates to exclude specific days from your calculations.
Further Reading: Official Microsoft documentation on WEEKDAY
Newsletter
Get practical updates worth opening.
Join the list for new posts, launch updates, and future newsletter issues without spam or daily noise.

Leave a Reply