Skip to main content

Time Duration Calculator

Find the hours and minutes between two times, as total minutes and decimal hours, including periods that cross midnight.

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Was this tool useful?

How does this tool work?

How long is it from 8:45 to 17:15? And from 22:30 to 06:15 the next morning? Subtracting clock times in your head trips over two things: minutes count in base 60, and the day starts again at midnight. This calculator gives the duration between a start time and an end time in three forms: hours and minutes to read, total minutes to check, and decimal hours for a timesheet or an invoice. Night shifts that end the next day are handled automatically.

Each time is converted to minutes since midnight: 17:15 becomes 17 × 60 + 15 = 1,035 minutes. The duration is end − start.

If the end time is smaller than the start time, the tool assumes it falls on the next day and adds 24 hours, i.e. 1,440 minutes; a note says so under the result. In other words, the difference is taken modulo 24 hours.

Two identical times give a zero duration, not 24 hours: to measure exactly one day or several days you need dates, which the date difference calculator handles.

The calculation uses clock times with no date or time zone. On a daylight-saving night, a period that spans 2 or 3 a.m. actually lasts one hour less (clocks forward) or one hour more (clocks back) than the result shown.

How to use this tool

  1. Enter the start time

    In 24-hour format or as your browser displays it.

  2. Enter the end time

    A time earlier than the start is automatically placed on the next day.

  3. Read the duration

    The result appears in hours and minutes, total minutes and decimal hours.

  4. Share or reset

    The calculation link keeps both times; the reset button clears the form.

Duration between two clock times

Times are expressed in minutes since midnight, then subtracted modulo a 1,440-minute day.

Duration in minutes

D = (E − S + 1440) mod 1440

The modulo moves an end time earlier than the start into the next day.

Hours and minutes

h = ⌊D / 60⌋; m = D mod 60

Decimal hours

D / 60

S
start time in minutes since midnight
E
end time in minutes since midnight
D
duration in minutes

Use cases

Length of a shift

Measure a day or night work period before entering it in a schedule.

Travel or flight time

Work out the time between a departure and an arrival expressed in the same time zone.

On-call or job duration

Find how long a call-out or an intervention lasted from its start and end times.

Decimal entry

Get 7.75 h directly instead of 7 h 45 for time-tracking software or an hourly-rate calculation.

Examples

An office day

1,035 − 525 = 510 minutes, i.e. 8 h 30 or 8.5 decimal hours. The break is not deducted.

Input

08:45 → 17:15

Result

8 h 30 min · 510 min · 8.5 h

A night shift

375 − 1,350 is negative, so 1,440 is added: 465 minutes.

Input

22:30 → 06:15

Result

7 h 45 min · 465 min · 7.75 h (next day)

Two identical times

The calculator does not assume that a full day has passed.

Input

09:00 → 09:00

Result

0 h 00 min

Tips and best practices

  • For a working day with a break, use the work hours calculator, which deducts the break; this tool gives the gross duration.
  • To add several durations you already have, use the hours and minutes sum calculator.
  • For a departure and an arrival in two time zones, first convert the arrival into the departure time zone with the time zone converter.
  • Decimal landmarks: 15 min = 0.25 h, 30 min = 0.5 h, 45 min = 0.75 h, so 7 h 45 is not 7.45 h.
  • Beyond 24 hours, a clock time alone is not enough: use full dates and times.

Sources and references

Frequently asked questions

How do I calculate the time between two times?

Convert each time to minutes since midnight, subtract start from end, then split the result into hours (divide by 60) and minutes (remainder). From 8:45 to 17:15: 1,035 − 525 = 510 min = 8 h 30.

What if the end time is before the start time?

The calculator assumes the end is on the next day and adds 24 hours. 22:30 → 06:15 gives 7 h 45, flagged as next day.

Why does 9:00 → 9:00 give 0 and not 24 hours?

Without dates, two identical times are read as the same instant. To measure exactly one day or more, use dates.

Is daylight saving time taken into account?

No. The tool counts clock hours. On the night clocks go forward, 22:00 → 06:00 really lasts 7 hours; on the night they go back, 9 hours.

How do I turn the result into decimal hours?

Divide the total minutes by 60: 465 min ÷ 60 = 7.75 h. The calculator shows it directly.

How is it different from the work hours calculator?

That tool deducts a break from the working period; this one only measures the gap between two times.

Related tools

Tools similar or complementary to this one.

Similar tools

Add up the hours you worked this week, breaks deducted, in hours and minutes and in decimal hours.

Dates & timeNewUse this tool
GuideBest practicesBeginner

How to calculate work hours with a break

Calculate actual working time between a start and end time, subtract breaks and handle shifts that cross midnight.

8 September 20262 min