How to Calculate Work Hours in Excel

All guides Spreadsheets

Quick answer

In desktop Excel, subtract start date/time from end date/time, then subtract unpaid break minutes divided by 1,440. Format the result as elapsed hours.

Open Time Card Calculator

Step by step

  1. Use A for start date/time, B for end date/time and C for unpaid break minutes. Use real Excel date/time values and include the next date for overnight work.
  2. In D2 enter =IF(OR(A2="",B2=""),"",IF(OR(COUNT(A2:B2)<2,AND(C2<>"",NOT(ISNUMBER(C2)))),"Check inputs",IF(OR(C2<0,B2-A2<C2/1440),"Check inputs",B2-A2-C2/1440))). Copy it down and format the result column as [h]:mm.
  3. Fix every flagged row before summing. Put =SUM(D2:D8) below the week and give it the same elapsed format. Use total × 24 in a separate Number cell for decimal hours.

Worked examples

Dated overnight shift

Start Nov 9, 2026 10:00 p.m. and end Nov 10, 2026 6:00 a.m. Enter 30 in C2. The shift spans 8 hours, so D2 shows 7:30.

Day shift

09:00 to 17:30 on the same date with 30 break minutes gives 8:00. Combined with the overnight example, the subtotal is 15:30.

What to check

Keep break values in minutes. Enter 30 for a half-hour break. Check that the date on the overnight end is one day later and use comma or semicolon separators as required by your Excel locale.

Related guides

Sources

See the calculation methodology or report an error.