Add or subtract time - Microsoft Support (2024)

Add time

Suppose that you want to know how many hours and minutes it will take to complete two tasks. You estimate that the first task will take 6 hours and 45 minutes and the second task will take 9 hours and 30 minutes.

Here is one way to set this up in the a worksheet.

  1. Enter 6:45 in cell B2, and enter 9:30 in cell B3.

  2. In cell B4, enter=B2+B3 and then press Enter.

    Add or subtract time - Microsoft Support (1)

    The result is 16:15—16hours and 15 minutes—for the completion the two tasks.

    Tip:You can also add up times by using the AutoSum function to sum numbers. Select cell B4, and then on the Home tab, choose AutoSum. The formula will look like this: =SUM(B2:B3). Press Enter to get the same result, 16 hours and 15 minutes.

Well, that was easy enough, but there’s an extra step if your hours add up to more than 24. You need to apply a special format to the formula result.

To add up more than 24 hours:

  1. In cell B2 type 12:45, and in cell B3 type 15:30.

  2. Type =B2+B3 in cell B4, and then press Enter.

    Add or subtract time - Microsoft Support (2)

    The result is 4:15, which is not what you might expect. This is because the time for Task 2 is in 24-hour time. 15:30 is the same as 3:30.

  3. To display the time as more than 24 hours, select cell B4.

  4. Go toHome >Format, and then choose FormatCells.

    Add or subtract time - Microsoft Support (3)

  5. In the Format Cells box, choose Custom in the Category list.

  6. In the Type box, at the top of the list of formats, type [h]:mm;@ and then selectOK.

    Take note ofthe colon after [h] and a semicolon after mm.

The result is 28 hours and 15 minutes. The format will be in the Type list the next time you need it.

Subtract time

Here's another example: Let's say that you and your friends know both your start and end times at a volunteer project, and want to know how much time you spent in total.

Follow these steps to get the elapsed time—which is the difference between two times.

  1. In cell B2, enter the start time and include “a” for AM or “p” for PM, and then press Enter.

  2. In cell C2, enter the end time, including “a” or “p” as appropriate, and then press Enter.

  3. Type the other start and end times for your friends, Joy and Leslie.

  4. In cell D2, subtract the end time from the start time by entering the formula =C2-B2, and then press Enter.

    Add or subtract time - Microsoft Support (4)

  5. In the Format Cells box, selectCustom in the Category list.

  6. In the Type list, selecth:mm (for hours and minutes), and then selectOK.

    Now we see that Richard worked 3 hours and 45 minutes.

    Add or subtract time - Microsoft Support (5)

  7. To get the results for Joy and Leslie, copy the formula by selecting cell D2 and dragging to cell D4.

    The formatting in cell D2 is copied along with the formula.

To subtract time that’s more than 24 hours:

It is necessary to create a formula to subtract the difference between two times that total more than 24 hours.

Follow the steps below:

  1. Referring to the above example, select cell B1 and drag to cell B2 so that you can apply the format to both cells at the same time.

  2. In the Format Cells box, selectCustom in the Category list.

  3. In the Type box, at the top of the list of formats, type m/d/yyyy h:mm AM/PM.

    Notice the empty space at the end of yyyy and at the end of mm.

    The new format will be available when you need it in the Type list.

  4. In cell B1, type the start date, including month/day/year and time using either “a” or “p” for AM and PM.

    Add or subtract time - Microsoft Support (6)
  5. In cell B2, do the same for the end date.

  6. In cell B3, type the formula =(B2-B1)*24.

The result is 31.5 hours.

Note:You can add and subtract more than 24 hours in Excel for the web but you cannot apply a custom number format.

Add time

Suppose you want to know how many hours and minutes it will take to complete two tasks. You estimate that the first task will take 6 hours and 45 minutes and the second task will take 9 hours and 30 minutes.

  1. In cell B2 type 6:45, and in cell B3 type 9:30.

  2. Type =B2+B3 in cell B4, and then press Enter.

Add or subtract time - Microsoft Support (7)

It will take 16 hours and 15 minutes to complete the two tasks.

Tip:You can also add up times using AutoSum. Click in cell B4. Then click Home > AutoSum. The formula will look like this: =SUM(B2:B3). Press Enter to get the result, 16 hours and 15 minutes.

Subtract time

Say you and your friends know your start and end times at a volunteer project, and want to know how much time you spent. In other words, you want the elapsed time or the difference between two times.

  1. In cell B2 type the start time, enter a space, and then type “a” for AM or “p” for PM, and press Enter. In cell C2, type the end time, including “a” or “p” as appropriate, and press Enter. Type the other start and end times for your friends Joy and Leslie.

  2. In cell D2, subtract the end time from the start time by typing the formula: =C2-B2, and then pressing Enter.Now we see that Richard worked 3 hours and 45 minutes.

    Add or subtract time - Microsoft Support (8)
  3. To get the results for Joy and Leslie, copy the formula by clicking in cell D2 and dragging to cell D4. The formatting in cell D2 is copied along with the formula.

    Add or subtract time - Microsoft Support (9)
Add or subtract time - Microsoft Support (2024)
Top Articles
Latest Posts
Article information

Author: Wyatt Volkman LLD

Last Updated:

Views: 5369

Rating: 4.6 / 5 (66 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Wyatt Volkman LLD

Birthday: 1992-02-16

Address: Suite 851 78549 Lubowitz Well, Wardside, TX 98080-8615

Phone: +67618977178100

Job: Manufacturing Director

Hobby: Running, Mountaineering, Inline skating, Writing, Baton twirling, Computer programming, Stone skipping

Introduction: My name is Wyatt Volkman LLD, I am a handsome, rich, comfortable, lively, zealous, graceful, gifted person who loves writing and wants to share my knowledge and understanding with you.