How to use the WORKDAY function
What is the WORKDAY function?
The WORKDAY function returns a date based on a start date and a given number of working days (nonweekend and nonholidays).
Table of Contents
1. Introduction
What is a workday?
A weekday that is not a weekend day or holiday. Typically Monday through Friday excluding any holiday dates.
Use the WEEKDAY function to determine if a date is a workday or a weekend day.
What is a holiday?
A day on which regular activities and work is suspended due to a cultural, religious or legal custom. Varies by country and region.
What is an Excel date?
An Excel date is a serial number that Excel recognizes and can be filtered, sorted and used in other date calculations.
Excel dates are actually serial numbers formatted as dates, 1/1/1900 is 1 and 2/2/2018 is 43133. There are 43132 days between 2/2/2018 and 1/1/1900.
You can try this yourself, type 10000 in a cell, press CTRL + 1 and change the cell's formatting to date, press with left mouse button on OK. The cell now shows 5/18/1927.
2. Syntax
WORKDAY(start_date, days, [holidays])
start_date | Required. |
days | Required. Positive integer returns a date after the start_date (future) and negative integer returns a date before the start_date. |
[holidays] | Optional. A list of holiday dates. |
3. Example 1
This example demonstrates how to use the WORKDAY function to calculate a future date with the condition of being a workday excluding weekend days and holidays.
The start date is shown in cell C3 in the image above. The number of working days days is 12 and the function returns 1/18/2028. The formula in cell B8 is shown below, note that no holidays has been specified.
Formula in cell B8:
The image below shows the start date and the weekdays. The count is displayed (row 5) below dates that are workdays.
Note that there are no numbers below weekend days because they are not workdays. Counting 12 days after the start date and we get 1/18/2028.
4. Example 2
This example demonstrates the WORKDAY function with a negative day argument which means it calculates a workday before the start date instead of after the start date.
The start date is shown in cell C3 in the image above. The number of working days days is -12 (negative number meaning counting backwards in time) and the function returns 12/16/2027. The formula in cell B8 is shown below, note that holiday 12/25/2027 has been specified.
Formula in cell B9:
This example also shows no numbers below weekend days because they are not workdays, this applies to 12/25/2027 as well because it is specified as a holiday. Counting 12 days before the start date and we get 12/16/2027.
5. Example 3
If an employee's last day of work is June 15, 2025, and they are entitled to 10 working days of severance pay, on what date will their last day of severance pay be?
What we know:
- start_date = 6/15/2025 (This date is entered in cell C19)
- days = 10 (This number is specified in cell C20)
Formula in cell B25:
The formula in cell B25 returns 6/27/2025 which represents the last day of severance pay. The chart displays a period from June 15 to June 27, 2025. It's a column chart where each bar represents a day, and the height of each bar is 1 unit. The columns have data labels counting from 1 to 10 based on workday or weekend. The days are labeled with both the day of the week and the date.
The chart demonstrates the use of Excel's WORKDAY function which calculates a future date based on a start date, number of working days, and optionally, a list of holidays to exclude.
6. Example 4
A construction project is scheduled to start on May 1, 2025, and the estimated duration is 45 working days. What is the expected completion date for the project?
What we know:
- start_date = 5/1/2025 (This date is entered in cell C19)
- days = 15 (This number is specified in cell C20)
Formula in cell B25:
The formula in cell B25 returns 5/22/2025 which represents the completion date for the project. The chart displays a period from May 1 to May 22, 2025. It's a column chart where each bar represents a day, and the height of each bar is 1 unit. The columns have data labels counting from 1 to 15 based on workday or weekend. The days are labeled with both the day of the week and the date.
The chart demonstrates the use of Excel's WORKDAY function which calculates a future date based on a start date, number of working days, and optionally, a list of holidays to exclude.
7. Example 5
A construction project is scheduled to start on August 3, 2026,
Planning: 4 working days
Design: 12 working days
Procurement: 15 working days
Construction: 45 working days
Testing 6 working days
Handover: 3 working days
What is the expected completion date for the milestones and for the entire project? Assume one milestone must end until the next milestone starts.
Formula in cell E5:
The formula in cell E5 calculates all the milestone dates based on the specified workday values in C5:C10 and the start date in C4. It returns the following array: {"Fri, Aug 7, 2026";"Tue, Aug 25, 2026";"Tue, Sep 15, 2026";"Tue, Nov 17, 2026";"Wed, Nov 25, 2026";"Mon, Nov 30, 2026"}
These dates correspond to the milestones specified in cells B5:B10, for example, the start date is 8/3/2026 and the planning takes 4 workdays which results in 8/7/2026. The SCAN function uses an accumulator value (a) that adds the number of workdays row by row.
Argument | Value | Milestone dates: | |
start_date | 8/3/2026 | ||
Planning: | 4 | Fri, Aug 7, 2026 | |
Design: | 12 | Tue, Aug 25, 2026 | |
Procurement: | 15 | Tue, Sep 15, 2026 | |
Construction: | 45 | Tue, Nov 17, 2026 | |
Testing: | 6 | Wed, Nov 25, 2026 | |
Handover: | 3 | Mon, Nov 30, 2026 |
The formula in cell E5 performs the following steps:
- C4: This is the starting date for the scan operation.
- C5:C10: This is the range of cells that will be scanned.
- LAMBDA(a, b, WORKDAY(a, b)): This is a LAMBDA function that will be applied to each pair of values (a, b) from the scan operation. a is an accumulator variable that changes as the calculation proceeds through b (C5:C10)
In other words, the SCAN function applies the provided lambda function a starting date and an array containing the number of days for each milestone in the specified range C5:C10, using the previous result as the first argument (a) and the current value from the range as the second argument (b).
The WORKDAY(a, b) function calculates a date based on the number of working days specified in cell b. The WORKDAY function takes two arguments: the start date and the number of working days to add or subtract. Variable a changes to the last calculated date, Excel handles dates a integer which makes this calculation possible.
In summary, the formula is scanning through the range C5:C10, using the value in C4 as the starting date, and calculating each milestone date specified in each cell in the range C5:C10 based on the previous milestone date and number of working days to the next milestone date.
The completion date for the construction project is calculated in cell B14:
This formula returns 11/30/2026 which is the same value as in the "handover" date in cell E10.
8. The function not working
The WORKDAY function returns
- #VALUE! error value if start_date or [holidays] are not a valid date.
- #NUM error if start_date plus days argument returns an invalid date.
(Excel can't handle dates before 1/1/1900.)
Use the DATE function to create valid Excel dates.
Example:
'WORKDAY' function examples
The image above shows the performance across industry groups for different date ranges, conditional formatting makes the table much easier […]
Functions in 'Date and Time' category
The WORKDAY function function is one of 22 functions in the 'Date and Time' category.
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Contact Oscar
You can contact me through this contact form