ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Dates
  3. Calculate Working Hours Between Two Dates in Excel

Calculate Working Hours Between Two Dates in Excel

By ExcelReady Team·Updated November 2, 2026·7 min read

The short answer

For whole days, count the working days and multiply by the hours in a working day: =NETWORKDAYS(A2,B2,holidays)*8. When the start and end include times, use a formula that counts the full days in between and then adds the part-days at each end, clipped to working hours with MEDIAN. Multiply the result by 24 to get hours.

Key takeaways

  • =NETWORKDAYS(start,end,holidays)*8 gives working hours for whole days. It counts both the start and end dates.
  • Excel stores times as fractions of a day, so multiply a time result by 24 to get hours.
  • For exact start and end times, combine NETWORKDAYS for the full days with MEDIAN and MOD for the part-days.
  • Use NETWORKDAYS.INTL when the weekend is not Saturday and Sunday.
On this page+
  1. Whole days: NETWORKDAYS times hours per day
  2. How Excel stores dates and times
  3. Exact working hours with start and end times
  4. Worked examples of the exact formula
  5. Different weekends: NETWORKDAYS.INTL
  6. Common mistakes with working hours
  7. Practise it

To calculate working hours between two dates in Excel, count the working days with NETWORKDAYS and multiply by the length of your working day: =NETWORKDAYS(A2,B2)*8. If the start and end also have times, such as a ticket opened at 13:00 on Monday and closed at 11:00 on Wednesday, you need a longer formula that trims each end to office hours. This guide covers both, for anyone measuring response times, project effort or service levels.

Whole days: NETWORKDAYS times hours per day#

When work starts at the beginning of one day and ends at the close of another, count the working days and multiply. NETWORKDAYS counts Monday to Friday between two dates and skips weekends:

Excel formula
=NETWORKDAYS(start_date, end_date, [holidays])

Say an audit runs from Monday 2 March 2026 to Friday 13 March 2026, with a public holiday on Monday 9 March, and a working day is 8 hours:

ABCDE
1TaskStartEndHours/dayHoliday
2Audit2 Mar 202613 Mar 202689 Mar 2026
Excel formula
=NETWORKDAYS(B2,C2,E2)*D2

There are 10 weekdays from 2 to 13 March, minus the holiday, which leaves 9 working days. The result is 9 × 8 = 72 hours.

Two details matter:

  • Both ends count. NETWORKDAYS includes the start and end dates, so Monday to Friday of one week is 5 days, not 4.
  • Holidays need a range. For several holidays, list them in cells such as H2:H5 and use $H$2:$H$5 as the third argument, so the range stays put when you fill down.

The NETWORKDAYS function guide and the article on NETWORKDAYS and WORKDAY cover the function in more depth.

How Excel stores dates and times#

The exact formula below only makes sense once you know how Excel stores time. A date is a whole number of days, and a time is a fraction of a day:

ValueWhat Excel stores
2 March 202646083
12:00 (noon)0.5
18:000.75
2 March 2026 13:0046083.5417

Two consequences follow. First, MOD(A2,1) strips the date and leaves only the time, because it returns the part after the whole number. Second, any time result is in days, so you multiply by 24 to get hours. The guide to calculating the difference between two times explains this with simple start and end times on one day.

To type a date with a time safely, build it from parts: =DATE(2026,3,2)+TIME(13,0,0). That avoids confusion between day-first and month-first date settings.

Exact working hours with start and end times#

When the start and end include times, use this formula. It assumes the start date-time is in A2, the end in B2, the start of the working day in E1 (9:00) and the end of the working day in E2 (17:00):

Excel formula
=((NETWORKDAYS(A2,B2)-1)*($E$2-$E$1)
  +IF(NETWORKDAYS(B2,B2),MEDIAN(MOD(B2,1),$E$2,$E$1),$E$2)
  -MEDIAN(NETWORKDAYS(A2,A2)*MOD(A2,1),$E$2,$E$1))*24

You can type it on one line; the line breaks only make it easier to read. Here is what each part does:

  1. (NETWORKDAYS(A2,B2)-1)*($E$2-$E$1) counts every working day but one as a full working day of 8 hours.
  2. MEDIAN(MOD(B2,1),$E$2,$E$1) takes the end time and clips it into office hours. MEDIAN of three values returns the middle one, so a time before 9:00 becomes 9:00 and a time after 17:00 becomes 17:00. This adds the hours worked on the last day.
  3. MEDIAN(NETWORKDAYS(A2,A2)*MOD(A2,1),$E$2,$E$1) clips the start time the same way and subtracts it, removing the part of the first day before work began.
  4. The IF and the NETWORKDAYS(A2,A2)* parts handle a start or end that falls on a weekend or holiday.
  5. *24 turns the answer from days into hours.

To skip holidays, add the holiday range to every NETWORKDAYS in the formula, for example NETWORKDAYS(A2,B2,$H$2:$H$5).

Worked examples of the exact formula#

With a 9:00 to 17:00 day and no holidays, the formula gives these results:

Start (A)End (B)Working hours
Mon 2 Mar 2026 13:00Wed 4 Mar 2026 11:0014
Fri 6 Mar 2026 15:00Tue 10 Mar 2026 10:3011.5
Sat 7 Mar 2026 10:00Mon 9 Mar 2026 11:002

Check the first row by hand: Monday 13:00 to 17:00 is 4 hours, Tuesday is a full 8, and Wednesday 9:00 to 11:00 is 2. That totals 14. In the second row, Friday gives 2 hours, the weekend is skipped, Monday gives 8 and Tuesday gives 1.5, which is 11.5. In the third row, the Saturday start is treated as Monday 9:00, so the answer is 2.

If you prefer to see hours and minutes, drop the *24 and format the cell with the custom format [h]:mm. The square brackets let the hours go past 24.

Different weekends: NETWORKDAYS.INTL#

NETWORKDAYS assumes Saturday and Sunday are the weekend. If your team works a different pattern, use NETWORKDAYS.INTL, which adds a weekend argument:

Excel formula
=NETWORKDAYS.INTL(A2,B2,7,$H$2:$H$5)*8
Weekend argumentDays off
1 (default)Saturday and Sunday
7Friday and Saturday
11Sunday only
"0000011"Saturday and Sunday, written as a pattern
"0000001"Sunday only, written as a pattern

The pattern form uses seven digits from Monday to Sunday, where 1 means a day off. You can use NETWORKDAYS.INTL in place of every NETWORKDAYS in the exact formula too. It works in Excel 2010 and later. For the difference between counting days and finding a date, see NETWORKDAYS vs WORKDAY.

Common mistakes with working hours#

Most wrong answers come from one of these:

  1. Forgetting to multiply by 24. A result like 0.583 is a fraction of a day; × 24 gives 14 hours.
  2. Subtracting one day too few or too many. NETWORKDAYS counts both ends. Don't add or subtract 1 to "fix" it unless you mean to.
  3. Dates stored as text. If NETWORKDAYS returns #VALUE!, the dates are probably text. Rebuild them with DATE or convert them.
  4. Lunch breaks. The formulas count the whole span from 9:00 to 17:00. If an unpaid hour of lunch should come off, use 7 hours per day in the whole-day version.
  5. A holiday range that moves. Without $ signs, the holiday range shifts as you fill down and stops matching your list.

For tracking hours worked on each shift rather than elapsed working time, a timesheet in Excel is the better tool.

Practise it#

Try the exercise on this page: it turns a date range with one holiday into working hours. Then practise NETWORKDAYS and WORKDAY in a live spreadsheet, where every formula you type is checked instantly. For plain calendar days between dates, take the days between dates lesson or read the guide to counting days between two dates.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

The audit runs from B2 to C2, with one public holiday in E2, and a working day is D2 hours. Click G2 and calculate the working hours with NETWORKDAYS, then press Enter.

fx
ABCDEFGH
1
Task
Start
End
Hours/day
Holiday
2
Audit
46083
46094
8
46090
Working hours
3
4
5
6

Tip: NETWORKDAYS takes the start date, the end date and the holiday. Multiply its result by the hours per day.

Practise this in a lesson

LessonWorkdays: NETWORKDAYS and WORKDAYCount working days between two dates with NETWORKDAYS and find a deadline a number of working days away with WORKDAY, skipping weekends and a holiday list.LessonDays between dates: DAYS, DATEDIF and TODAYMeasure the gap between two dates in days, months and years, and calculate tenure as of today.Function guideNETWORKDAYSCount the working days between two dates with Excel's NETWORKDAYS, excluding weekends and holidays. Examples, pitfalls and a live exercise.

Frequently asked questions

How do I calculate working hours between two dates in Excel?

+

For whole days, use =NETWORKDAYS(A2,B2)*8, replacing 8 with the length of your working day. Add a holiday range as the third argument to skip public holidays. For start and end times, use the MEDIAN-based formula in this guide.

Does NETWORKDAYS include the start and end date?

+

Yes. NETWORKDAYS counts both dates if they are working days. From Monday to Friday of the same week it returns 5, not 4.

How do I exclude holidays when counting working hours?

+

List the holiday dates in a range and add it as the third argument: =NETWORKDAYS(A2,B2,$H$2:$H$5)*8. Use $ signs so the range stays fixed when you fill down.

How do I calculate working hours with a Friday and Saturday weekend?

+

Use NETWORKDAYS.INTL with weekend code 7: =NETWORKDAYS.INTL(A2,B2,7,$H$2:$H$5)*8. Code 1 is Saturday and Sunday, and code 11 is Sunday only.

Why is my working hours result a strange decimal or a time?

+

Excel stores time as a fraction of a day. Multiply by 24 and format the cell as a number to see hours, or leave it as a fraction and use the [h]:mm format to show hours and minutes.

Sources

  • NETWORKDAYS function - Microsoft Support
  • MOD function - Microsoft Support
  • MEDIAN function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. Whole days: NETWORKDAYS times hours per day
  2. How Excel stores dates and times
  3. Exact working hours with start and end times
  4. Worked examples of the exact formula
  5. Different weekends: NETWORKDAYS.INTL
  6. Common mistakes with working hours
  7. Practise it

Keep reading

Dates· 6 min read

Count Working Days With NETWORKDAYS and WORKDAY

NETWORKDAYS counts the working days (Monday to Friday) between two dates, including both dates: =NETWORKDAYS(start_date, end_date, [holidays]). WORKDAY does the reverse and returns the date a number of working days away: =WORKDAY(start_date, days, [holidays]). Both skip weekends, and both skip any dates you list as holidays.

Dates· 6 min read

Calculate the Difference Between Two Times in Excel

To calculate the difference between two times in Excel, subtract the start time from the end time: =C2-B2. Format the result as h:mm to see hours and minutes, or multiply by 24 to get decimal hours: =(C2-B2)*24. For shifts that end after midnight, use =MOD(C2-B2,1) so the result is never negative.

Dates· 6 min read

Days Between Two Dates in Excel (and DATEDIF)

To count the days between two dates in Excel, subtract the earlier date from the later one: =C2-B2. DAYS does the same with the end date first: =DAYS(C2,B2). For whole months or years, use DATEDIF with the start date first and a unit in quotes, like =DATEDIF(B2,C2,"Y").

More on dates

  • YEAR, MONTH and DAY in Excel: Split a Date Into Parts
  • Year-to-Date Totals in Excel
  • YEARFRAC in Excel: Part of a Year Between Two Dates
  • Add Days, Months or Years to a Date in Excel
  • How to Add Hours and Minutes to a Time in Excel
  • Calculate Age in Years and Months in Excel
All dates articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free