Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Average hh:mm in Excel: A Complete Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To average hh:mm time values in Excel, use the =AVERAGE(range) formula and then apply a custom number format of [h]:mm:ss or hh:mm to the result cell. Because Excel treats time as a fraction of a 24-hour day, the formula works automatically as long as the cells are recognized as time values rather than text.

What You'll Need

  • Microsoft Excel (any modern version, including Office 365, Excel 2021, 2019, or Excel Online).
  • A dataset containing time durations or timestamps entered in a recognized time format (e.g., 05:30 or 12:15:00).
  • Basic familiarity with selecting cell ranges and entering formulas.

Step-by-Step

  1. Enter Your Time Data: Input your time values into a single column or row. For example, enter your data in cells A1 through A5. Ensure you use the colon (:) to separate hours, minutes, and seconds. If you enter "5.30" instead of "5:30", Excel will treat it as a decimal number rather than a time value, and the average will be mathematically incorrect.
  2. Select the Result Cell: Click on the empty cell where you want the average time to appear (for example, cell A6).
  3. Enter the Average Formula: Type =AVERAGE(A1:A5) into the formula bar or directly into the cell. Replace "A1:A5" with the actual range of your time data. Press Enter.
  4. Observe the Initial Result: In many cases, Excel will automatically format the result as a time. However, it may sometimes appear as a decimal number (e.g., 0.25 for 6 hours). This happens because Excel stores time as a fraction of a day (1.0 equals 24 hours). Do not worry if you see a decimal; the math is correct, but the display is not.
  5. Open the Format Cells Menu: Right-click the result cell and select Format Cells... from the context menu. Alternatively, you can use the keyboard shortcut Ctrl + 1 (Windows) or Cmd + 1 (Mac).
  6. Apply Custom Formatting: In the Format Cells dialog box, go to the Number tab. In the Category list on the left, select Custom.
  7. Enter the Time Code: In the Type field, delete whatever is currently there and type [h]:mm:ss. The square brackets around the "h" are critical; they tell Excel to allow the hours to exceed 24 if the average happens to be very large, preventing the clock from "resetting" to zero after every 24-hour cycle. If you only need hours and minutes, type [h]:mm.
  8. Confirm and Save: Click OK. Your result cell will now display the average time in a readable hh:mm format.

Common Mistakes

One of the most frequent errors is entering time as text. If you type "5 hours 30 mins" into a cell, Excel cannot perform math on that string. You must use the hh:mm format. You can tell if Excel recognizes a value as time because, by default, it will right-align the value in the cell. If the value is left-aligned, it is likely being treated as text, and the AVERAGE function will ignore those cells entirely, leading to an inaccurate result.

Another common mistake is ignoring the "24-hour wrap-around." If you use the standard hh:mm format instead of [h]:mm, and your average time happens to be 25 hours, Excel will display it as 01:00. This is because standard time formatting mimics a clock face. For durations and averages that might exceed a full day, the square bracket notation is mandatory to ensure the total cumulative hours are shown.

Users also often confuse the AVERAGE function with the SUM function. While summing time is a common precursor to manual averaging, using =SUM(range)/COUNT(range) is redundant when the AVERAGE function exists. Furthermore, dividing a sum of time by a count of cells can sometimes lead to formatting errors if the result cell is not explicitly set to a time format.

Tips

To make your data entry faster, you can pre-format your input column. Select the column, press Ctrl + 1, and set the format to Time. This ensures that as you type, Excel prompts you to use the correct colon-separated format.

If you are dealing with very precise data, include seconds in your average. Use the [h]:mm:ss format. Even if your input data only shows hours and minutes, the underlying value in Excel is stored with high precision. Adding seconds to your average can reveal subtle differences in your data that are hidden by rounding.

For those who need to use the average time in further calculations (like multiplying a time average by an hourly rate), remember that you must multiply the result by 24. Because Excel stores time as a fraction of a day, a result of 12:00 (12 hours) is stored as 0.5. To convert this to a decimal number of hours (12.0), the formula would be =AVERAGE(range)*24. You must then change the cell format from Time to Number to see the decimal result.

Troubleshooting

The result is 0 or #DIV/0!
A #DIV/0! error occurs when Excel cannot find any numerical values to average. This almost always means your time entries are formatted as text. To fix this, select your data, go to the Data tab, select Text to Columns, and click Finish immediately. This often forces Excel to re-evaluate text-based numbers as actual numerical values. If that fails, check for leading spaces in your cells that might be forcing the time into a text format.

The result is a strange decimal (e.g., 0.3452)
This is not a calculation error; it is a formatting issue. Excel is showing you the raw serial number of the time. Follow the steps in the Step-by-Step section to apply the [h]:mm custom format. The decimal 0.3452 is simply the mathematical representation of that time relative to a 24-hour day.

The average seems way too low
Check if you have empty cells in your range. The AVERAGE function ignores empty cells, but it does not ignore cells that contain a zero (0:00). If you have "0:00" entered for days where no time was recorded, those zeros will pull your average down significantly. If you want to ignore zeros, use the AVERAGEIF function: =AVERAGEIF(A1:A5, ">0").

The time is wrapping around (e.g., 26 hours shows as 2:00)
This happens when you use hh:mm instead of [h]:mm. The square brackets tell Excel to accumulate hours rather than resetting at 24. Go back to Format Cells > Custom and ensure the h is inside brackets.

Frequently Asked Questions

Can I average times that cross over midnight?

Averaging times that cross midnight (e.g., 11:00 PM to 2:00 AM) requires you to first calculate the duration of each shift using the formula =B1-A1+(A1>B1). Once you have the durations as positive values, you can use the standard AVERAGE function on those durations.

Does the AVERAGE function work with the AM/PM format?

Yes, the AVERAGE function works with AM/PM timestamps. However, the result will be a "time of day" rather than a "duration." If you are averaging the time people arrive at work, AM/PM is appropriate. If you are averaging how long a task takes, use the [h]:mm duration format.

What is the difference between hh:mm and [h]:mm?

The hh:mm format is for time-of-day; it resets to 0 after 23:59. The [h]:mm format is for elapsed time (duration); it allows the hour count to grow indefinitely (e.g., 150:30), which is essential for averages of long durations.

How do I average times in different worksheets?

You can reference other sheets within the formula. For example: =AVERAGE(Sheet1!A1:A10, Sheet2!A1:A10). Ensure all referenced cells are formatted as time for the calculation to be accurate.

Can I use the AVERAGE function if some cells are blank?

Yes. Excel's AVERAGE function automatically ignores blank cells. It will only divide the total sum by the number of cells that actually contain numerical time data, ensuring the average remains accurate despite missing entries.