Go Back

How to Get Work Hours Between Dates in Excel

Read time: 34 minutes

We may need to calculate work hours between two dates when workers are paid for working hours between dates. We can achieve this by calculating work days between two dates excluding the weekends and holidays between two dates and then multiplying it with a specified number of working hours in a workday

Figure 1. Calculating Work Hours Between Dates

Work Hours – Excluding Default Weekends and Holidays

To calculate work hours between dates excluding default weekends (Saturday and Sunday) and holidays we need to use a formula based on the Excel NETWORKDAYS function as per the following generic syntax;

=NETWORKDAYS(start_date, end_date, [holidays]) * daily_working_hours

The Excel NETWORKDAYS function returns net workdays between two dates and we will multiply the net workdays by the number of working hours in a workday to get the result. Suppose we have the start date in cell B2 and end date in cell C2 and holidays in range B7: B9, and the number of working hours per day are 8. We need to use the following formula in cell D2;

=NETWORKDAYS(B2, C2,$B$7:$B$9)*8

Figure 2. Work Hours Between Dates – Excluding Default Weekends and Holidays

Work Hours – Excluding Custom Weekends Only

If we want to calculate the work hours between two dates excluding only custom weekends, say Sunday, without taking holidays into account, then we need to use the Excel NETWORKDAYS.INTL function as per following formula syntax;

=NETWORKDAYS.INTL(start_date, end_date, [weekend]) * daily_working_hours

The Excel NETWORKDAYS.INTL function returns the number of workdays between two dates with custom weekend parameters. As we want to exclude custom weekend Sunday only, by ignoring the holidays, so we need to use the following formula in cell D3;

=NETWORKDAYS.INTL(B3,C3,11)*8

Figure 3. Work Hours Between Dates – Excluding Custom Weekends Only

Work Hours – Excluding Custom Weekends and Holidays

We will use the following formula syntax to get the work hours between two dates excluding the custom weekends and holidays;

=NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays]) * daily_working_hours

In our example, we use the following formula in cell D4 to calculate the work hours excluding Sundays (custom weekend) and holidays;

=NETWORKDAYS.INTL(B4,C4,11,$B$7:$B$9)*8

Figure 4. Work Hours Between Dates – Excluding Custom Weekends and Holidays

Instant Connection to an Expert through our Excelchat Service:

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

I'm trying to calculate work hours between two date-times. The work start and end time are both configurable. The calculation must also exclude weekends and a list of configurable dates.
Solved by F. D. in 28 mins
On a spreadsheet i have job roles and there average hours per shift. Different roles work different lengths of shift and these lengths are graded, IE less than 5 hours scores 0. Between 5-10 scores 1. Anything over 10 scores 0. Then another role hours logged between 5-11 will score 1. I've tried several IF functions that work for one role but can not get the formula to work for either role in the same cell
Solved by O. J. in 15 mins
i need a formula for number of meals depending on work hours, if work hrs are less than 4, than meals is 1, if hours are between 4 and 8, there are 4 meals, and if hours are more than 8, meals are 3. also if hours are 0, meals are 0
Solved by F. F. in 18 mins

Leave a Comment

avatar