Subtract time in Excel

Microsoft Excel is a powerful data manipulation tool with multiple formulas for handling complex calculations. One of the tasks that users commonly face is subtracting times in Excel to analyze time differences accurately. In this guide, we will explore different formulas and important tips on perfect time subtraction in Excel.

Time Representation Subtract time in Excel

At first sight, it may seem strange that Excel represents time as a decimal fraction. However, such representation makes simple arithmetic operations possible. To subtract time in Excel properly it is necessary to understand how time is formatted by the program Microsoft Excel.

The Basic Formula of Time Subtraction:

The basic formula for subtract time in Excel is quite simple but very effective:

= End – Start

In this case “End” and “Start” are replaced by the corresponding cell references or time values. For example, =A2 – B2 finds the difference between the two columns A2 and B2 where you have stored your timings.


Custom Formats for Readability

While Excel’s decimal time format helps to calculate, it is not easy to read by human beings. For clearer understanding, use custom time formats such as:

h:mm: ss (hours, minutes, and seconds)

h: mm (hours and minutes)

To change the format go to the ‘Format Cells’ dialog box by Ctrl + 1.


The text function

The versatility of the TEXT function in subtracting time in Excel allows users to specify the formats they want for their outputs:

The difference between hours, minutes and seconds is calculated by =TEXT(B1 – A1, “h:mm: ss”).

=TEXT(B1 – A1, “h:mm”) gives the difference in hours and minutes.


Diverse Units for Measuring Time Differences

Excel has formulated formulas to compute time differences in various units:

Hours: multiply the difference by 24 (i.e. (End time – Start time) x 24).

Minutes: multiply the difference by 1440 (i.e. (End time – Start time) x 1440).

Seconds: multiply the difference by 86400 (i.e. (End time – Start time) x 86400).

Why not use functions dedicated to individual time units?

For single or different types of units, Excel has special functions to calculate these gaps:

= HOUR(B1 – A1) gives hours difference.

= MINUTE(B1 – A1) shows minutes apart.

= SECOND(B1 – A1) represents seconds interval.

Tracking Elapsed Time

To track elapsed time from a defined starting point to the current moment, utilize the NOW function:

= NOW() – A1

Press Shift + F9 to update elapsed time manually.

Displaying Time Differences Effectively

Craft a formula integrating INT, HOUR, MINUTE, and SECOND functions to present time differences comprehensively:

Here’s a sample dataset:

  • Task Start Time (A1): 2024-02-10 08:30:00
  • Task End Time (B1): 2024-02-10 13:45:30

Now, let’s apply the formula to calculate the time difference comprehensively:

= INT(B1 – A1) & ” days, ” & HOUR(B1 – A1) & ” hours, ” & MINUTE(B1 – A1) & ” minutes, ” & SECOND(B1 – A1) & ” seconds”

Subtract time in Excel

When you enter this formula in a cell, it will display the time difference between the end time (B1) and the start time (A1) in a human-readable format.

Here’s how the formula breaks down the time difference:

Days: It calculates the number of days between the end and start times.

Hours: It computes the remaining hours after accounting for days.

Minutes: It calculates the minutes left after considering hours.

Seconds: It determines the remaining seconds.

In our example, the output might look like this:

This indicates that the task duration is 5 hours, 15 minutes, and 30 seconds.

Employing this formula allows project managers and analysts to track task durations accurately, enabling better planning, resource allocation, and project management within Excel spreadsheets.