Calculating an Average Time

Written by Allen Wyatt (last updated May 29, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


3

Abhay has a worksheet that has a column indicating elapsed times, all in the format hh:mm. He would like to calculate an average of these times and wonders about the easiest way to do this.

In order to provide the "easy answer," it is necessary to make a couple of assumptions about your data. The first is that your data is really stored as times. Excel allows you to store dates and times in worksheet cells, and they are converted to serial numbers for ease in manipulation. For instance, when you enter a time as, say, 2:57 pm, Excel converts it to a date/time serial number during the entry process. You can see this by selecting the cell in which you just entered the time and looking at the Formula bar—it should show something like 2:57:00 PM.

If you insert an elapsed time that represents a number of hours greater than 24 (such as 32:15), Excel will still parse it correctly. It is only when you get to very large elapsed times that you can run into problems. If you do deal with very large elapsed times (more than, say, 10,000 hours), then you'll want to refer to this tip:

https://tips.net/T10594

The second assumption that needs to be made about your data is that the cells are formatted as actual elapsed times. You ensure this by following these steps:

  1. Select all the cells containing your times. (If you want, you can select the entire column.)
  2. Press Ctrl+Shift+F. Excel displays the Format Cells dialog box.
  3. Make sure the Number tab is displayed.
  4. Make sure that Time is selected in the Category list. (See Figure 1.)
  5. Figure 1. The Number tab of the Format Cells dialog box.

  6. Make sure that 37:30:55 is selected in the Type list. (This is the elapsed time format.)
  7. Click on OK.

Now, with these two assumptions out of the way, it is very easy to calculate an average time. Let's say that your times are in cells A2:A324. You can use the following formula:

=AVERAGE(A2:A324)

That's right—you can use the AVERAGE function with times, and it will work wonderfully. The only thing you'll need to do is to make sure that the cell containing the formula is formatted using the elapsed time format. (Use the same steps outlined earlier in this tip.)

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13865) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Shading Rows with Conditional Formatting

If you need to shade alternating rows in a data table, you'll want to examine how you can accomplish the task with ...

Discover More

Conditionally Displaying a Message Box

You can, from within your macros, easily display a message box containing a message of your choice. If you want to ...

Discover More

Adding Ampersands in Headers and Footers

Add an ampersand to the text in a header or footer and you may be surprised that the ampersand disappears on your ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Converting UTC Times to Local Times

Dates and times are often standardized on UTC time, which is analogous to GMT times. How to convert such times to your ...

Discover More

Automatically Entering a Data Entry Time

Excel worksheets can be used to keep track of all sorts of information. You may want to use it, for instance, to track ...

Discover More

Determining If a Date and Time is within Working Hours

Excel is great at working with times and dates. Sometimes, though, it can be a bit tricky to figure out how to work with ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is five more than 3?

2021-10-14 15:35:57

Wyatt Allen

This is so funny. I'm trying to learn about how to calculate the rate a petition is being signed by using some Excel math, and I came across this. What is funny? My name is Wyatt Allen. This article didn't help my original question, but it did make my day!


2021-05-29 09:00:41

Elliot Penna

Since the problem statement explicitly stated that the elapsed times are formatted as hh:mm , displaying the seconds is probably undesirable noise. Better might be to custom format as [h]:mm;@ .


2021-05-29 05:54:05

Rohn S, MVP 2012-2018

Thanks for including the link to the actual additional article. That is a welcome improvement.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.