Calculate Equipment Downtime in Excel Without Double-Counting Overlaps
Question details
Calculate total equipment downtime when work-order time ranges overlap, counting each overlapping period only once.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Multiple work orders for the same equipment and category may start together or overlap partially. The user needs the total time covered by those work orders.
- Observed behavior
- The desired result is the sum of unique downtime intervals, rather than the sum of every work order's duration.
Arrange the data in four columns: A = Equipment, B = Work-order category, C = Start, and D = Finish. Confirm that start and finish values are actual Excel date-times, including dates for overnight jobs, and correct or exclude rows with missing timestamps or finishes earlier than starts.
Use a running end-time formula to count only unique downtime
Use sorted records and two helper columns to calculate the additional downtime contributed by each work order, including nested and partially overlapping intervals.
Within each equipment/category group, keep track of the latest finish reached by all previous records. A work order adds downtime only after that point, or from its own start if it begins after a gap.
Do not replace an entire group's records with just its earliest start and latest finish: that would incorrectly count gaps between disconnected downtime periods.
Select the complete data range, then open Data > Sort. Sort by Equipment in column A, then Work-order category in column B, then Start in column C from oldest to newest. Use row 1 for headers and row 2 for the first work order.
Enter Previous coverage end in E1. In E2, enter =C2. In E3, enter =IF(AND(A3=A2,B3=B2),MAX(D2,E2),C3). Fill E3 down through the remaining records. This resets at each new equipment/category group and otherwise retains the latest preceding finish.
Enter Unique downtime hours in F1. In F2, enter =MAX(0,(D2-MAX(C2,E2))*24), then fill down. Each row contributes only the part of its interval that earlier rows have not already covered. Format column F as Number.
In a blank cell, enter =SUM(F2:F1000), replacing 1000 with your last data row. For totals by equipment and category, select the data and choose Insert > PivotTable; place Equipment and Work-order category in Rows and Unique downtime hours in Values, summarized by Sum.

Calculate Non-Overlapping Equipment Downtime in WPS Spreadsheet
Use WPS Spreadsheet to open your work-order workbook, sort the time ranges, and calculate unique downtime with running-end helper formulas. The same approach handles fully nested intervals, partial overlaps, and gaps between jobs.
- 1. Open and prepare the workbook: In WPS Spreadsheet, choose Open and select your Excel workbook. Arrange Equipment, Work-order category, Start, and Finish in columns A through D, with headers in row 1 and valid date-time values in columns C and D.
- 2. Sort the complete data range: Select all work-order columns together, then open Data > Sort. Sort by Equipment, then Work-order category, then Start in ascending order.
- 3. Add the overlap-checking formulas: In E2, enter =C2. In E3, enter =IF(AND(A3=A2,B3=B2),MAX(D2,E2),C3) and fill down. In F2, enter =MAX(0,(D2-MAX(C2,E2))*24) and fill down to calculate each row's unique downtime hours.
- 4. Sum and save the results: In an empty cell, enter =SUM(F2:F1000), adjusting the final row to match your data. Format the result as Number, then use Save As and choose .xlsx to keep the workbook in Microsoft Excel format.

Frequently Asked Questions
Why can't I just add all work-order durations?
Adding each finish-minus-start duration counts shared time repeatedly. For example, work orders from 8:00 AM to 10:00 AM and from 8:00 AM to 11:00 AM cover three unique hours, not five. The helper formulas count the second order's additional hour only.
Will comparing each work order with only the previous finish handle every overlap?
No. A long work order can contain several shorter ones, so the immediately preceding finish may not represent the full coverage already reached. Use the running maximum in column E to retain the latest finish across all previous records in the same sorted group.
Does limiting each work order to two hours remove overlaps?
No. A formula such as =MIN(ROUND((D2-C2)*24,3),2) caps each row independently; it does not compare time ranges. Use the sorted running-end calculation to remove overlaps, and apply any reporting cap separately only if your business rules require one.
How do I calculate downtime across midnight or longer than 24 hours?
Enter complete dates and times in Start and Finish, rather than time-of-day values alone. The formula multiplies Excel's day-based difference by 24 to return hours. Use Number formatting for decimal hours; if displaying a duration in days instead, use the custom format [h]:mm.
Is Power Query a better option for thousands of work orders?
Power Query can be useful for recurring imports in Excel versions that include it. Start with Data > From Table/Range, set the timestamp columns to Date/Time, and group by the required equipment/category keys. The transformation must merge only connected intervals within each group and sum their durations; simply taking each group's earliest start and latest finish would count gaps as downtime.




