How to Calculate Total Processing Time in Excel (Days, Hours, Minutes)
Question details
The user needs to calculate the total duration between start and end times, breaking the result down into distinct days, hours, minutes, and seconds for multiple tasks.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking processing times or job durations across multiple records and summarizing the total elapsed time.
- Observed behavior
- Time data needs to be mathematically converted from raw time differences into distinct units (days, hours, minutes, seconds) and summed up for a grand total.
Ensure your start and end time columns are formatted as proper Date/Time values rather than plain text, as the software requires recognizable serial numbers to perform accurate time subtractions.
Use INT and MOD Formulas to Extract Time Units
Apply mathematical functions to the difference between the end time and start time to break down the duration into exact days, hours, minutes, and seconds.
Time in spreadsheet software is stored as fractional days. Multiplying the time difference by 24, 1440, or 86400 converts it into total hours, minutes, and seconds respectively.
The INT function extracts the whole number portion of the calculation, while the MOD function captures the remainder, which is essential for rolling over units like minutes and seconds past 60.
Assuming your start time is in B2 and end time is in C2, click cell D2 and enter =INT(24*(C2-B2)) to get the total whole hours.
In cell E2, enter the formula =INT(MOD(1440*(C2-B2),60)) to extract the remaining minutes after the hours have been accounted for.
In cell F2, enter =MOD(86400*(C2-B2),60) to get the remaining seconds. You can then use the fill handle to drag these formulas down for all rows.
To get the total days across a range of jobs (e.g., rows 2 and 3), use the formula =INT(SUM(C2:C3-B2:B3)).
For total hours, use =MOD(INT(24*SUM(C2:C3-B2:B3)),24). For total minutes, use =MOD(INT(1440*SUM(C2:C3-B2:B3)),60). For total seconds, use =MOD(86400*SUM(C2:C3-B2:B3),60).

Calculate Durations and Times Easily with WPS Office
WPS Spreadsheet offers full support for advanced time calculation formulas, including INT and MOD functions, helping you track processing times effortlessly.
- 1. Open your Time Log: Launch WPS Spreadsheet and open the workbook containing your start and end times.
- 2. Apply the Time Formulas: Type the =INT() and =MOD() formulas into the target cells to calculate the time differences.
- 3. Format the Cells: Right-click the result cells, select 'Format Cells', and choose the appropriate Number format to display your durations clearly.
- 4. Drag to Fill: Click and hold the fill handle at the bottom-right corner of your calculated cell and drag it down to apply the calculation to all jobs.

Frequently Asked Questions
Why am I getting a #VALUE! error when subtracting times?
This usually happens if your start or end times are stored as text strings instead of recognizable time formats. Use the VALUE function or the Text to Columns feature to convert them into proper time values before calculating.
How can I display negative time differences in Excel?
By default, the software displays '########' for negative times. You can fix this by changing the workbook's date system to the 1904 date system via File > Options > Advanced, or by using an IF formula to display negative times as formatted text.
Can I format the time difference without using complex formulas?
Yes, you can simply subtract the start time from the end time (e.g., =C2-B2) and apply a custom cell format like '[h]:mm:ss' to display the total elapsed hours, minutes, and seconds automatically without using INT and MOD.
What does the MOD function do in this time calculation?
The MOD function returns the remainder after division. In time calculations, it is used to roll over units, such as extracting the remaining minutes (from 0 to 59) after the full hours have already been calculated.




