# What is the average time?

Averages a list of times: durations such as lap or race times (h:mm:ss or m:ss), or clock times such as bedtimes, even across midnight, with the total, fastest and slowest.

- Page: https://www.acalculator.org/days/average-time-calculator
- JSON spec: https://www.acalculator.org/days/average-time-calculator.json
- Version: 3e19a5e3e6b2

## Default answer

Example with the default inputs (Average Durations, Times 5:12, 5:08, 5:20, 5:05): The average is 0:05:11.25.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| kind | Average | Lengths of time (durations), or times of day on a clock. |
| t | Times | The times to average, separated by commas or spaces. |
| start | Day starts at | Clock times are counted from this time, so times on both sides of midnight average correctly. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| average | Average | The mean of the times. |
| seconds | Average in seconds | The mean duration in seconds. |
| total | Total | All the durations added up, h:mm:ss. |
| count | Times averaged | How many times were typed. |
| shortest | Shortest (or earliest) | The smallest time. |
| longest | Longest (or latest) | The largest time. |

## Method

Durations: convert each to seconds (h × 3,600 + m × 60 + s), add, and divide by the count. Clock times: count each in seconds after the start of day (wrapping past midnight), average, and add the start back.

## Assumptions

- A duration of one number is seconds, two parts are m:ss, three are h:mm:ss; minutes and seconds after a colon are two digits, 00 to 59.
- Clock times are averaged as times after the chosen start of day, so the answer depends on it; a noon start suits bedtimes.
- Durations are summed in hundredths of a second; the average is rounded to the hundredth, and a clock-time average to the second.

## Worked examples

1. kind = durations, t = 5:12, 5:08, 5:20, 5:05 gives average = 0:05:11.25, seconds = 311.25, total = 0:20:45, shortest = 0:05:05, longest = 0:05:20. Source: The Python Standard Library, datetime: timedelta objects (durations add and divide exactly in microseconds), https://docs.python.org/3/library/datetime.html#timedelta-objects (retrieved 2026-10-02).
2. kind = durations, t = 1:52:10, 1:48:35, 1:55:02 gives average = 1:51:55.67, total = 5:35:47. Source: The Python Standard Library, datetime: timedelta objects (durations add and divide exactly in microseconds), https://docs.python.org/3/library/datetime.html#timedelta-objects (retrieved 2026-10-02).
3. kind = clock, t = 11:00 PM, 1:00 AM, 11:30 PM, start = 12:00 gives average = 11:50 PM, shortest = 11:00 PM, longest = 1:00 AM. Source: The Python Standard Library, datetime: timedelta objects (durations add and divide exactly in microseconds), https://docs.python.org/3/library/datetime.html#timedelta-objects (retrieved 2026-10-02).
4. kind = clock, t = 8:15, 8:45, 9:10, start = 00:00 gives average = 8:43:20 AM. Source: The Python Standard Library, datetime: timedelta objects (durations add and divide exactly in microseconds), https://docs.python.org/3/library/datetime.html#timedelta-objects (retrieved 2026-10-02).

## FAQ

### How do I average times?

Turn each time into seconds, add them up, divide by how many there are, and turn the result back into hours, minutes and seconds. Splits of 5:12, 5:08, 5:20 and 5:05 are 312 + 308 + 320 + 305 = 1,245 seconds; ÷ 4 = 311.25 s = 5:11.25.

### How do I type the times?

Separate the times with commas or spaces. Durations can be h:mm:ss (1:52:10), m:ss (5:12) or plain seconds (45.5), with decimals of a second if you need them. Times of day can be 24-hour (23:15) or 12-hour (11:15 PM).

### How do I average times that cross midnight?

Count each time from a start of day before midnight. With the day starting at noon, 11:00 PM is 11 hours later and 1:00 AM is 13 hours later; their average, 12 hours, is midnight, not noon. Choose times of day and set the day start to 12:00 for bedtimes.

### Why does the start of day matter?

A clock wraps around every 24 hours, so "the average of 11 PM and 1 AM" has two candidates, midnight and noon. Counting from a start of day picks one; noon suits night-time events and midnight suits daytime ones.

### How do I find an average lap time?

Type each lap time. The average is the total time divided by the number of laps. If you know only the total, divide it by the lap count: 20:45 over 4 laps is 5:11.25 a lap.

### How precise is the answer?

Durations are added in hundredths of a second, so typed decimals do not drift, and the average is rounded to the hundredth. Averages of clock times are rounded to the second.

## Sources

- Python Software Foundation, Python 3 documentation, datetime: timedelta objects (sums and division of durations, used as the check for the worked examples). https://docs.python.org/3/library/datetime.html#timedelta-objects (retrieved 2026-10-02)
