TIME & DATE

Time Duration Calculator

Find elapsed time between two clock times using clear AM/PM controls, including overnight periods.

Built for real schedules

AM/PM is explicit. If the end time is earlier than the start time after conversion, Varyvia treats it as an overnight duration.

CALCULATOR GUIDE

Calculate elapsed time between two clock times

Measure the duration between two clock times or add a duration to a start time to find an end time.

How to use it

  1. Enter a start and end time for elapsed duration.
  2. The calculator can handle an end time that passes midnight.
  3. Use Goal mode to add a duration to a starting clock time.
Worked example

Example: from 10:30 PM to 1:15 AM the next day is 2 hours and 45 minutes (165 minutes).

Formula or method

Duration is calculated in total minutes, then converted back to hours and minutes.

IN-DEPTH GUIDE

How to calculate the time between two clock times

Elapsed time is the length of time between a start time and an end time on the clock: how long a shift lasted, how long a trip took, or how many hours a machine ran. The method is simple, but 12-hour times, midnight and breaks make it easy to slip.

Enter a start and an end time, choose AM or PM, and the calculator gives the duration in hours and minutes and in total minutes. In Goal mode it works the other way: it adds a duration to a start time and tells you the finishing time.

The method: convert both times to minutes after midnight

Turn each time into minutes after midnight, subtract the start from the end, and convert the answer back to hours and minutes. Using the 24-hour clock first avoids most AM/PM errors.

Example

9:15 AM is 9 × 60 + 15 = 555 minutes. 5:40 PM is 17:40, or 1,060 minutes. 1,060 − 555 = 505 minutes, which is 8 hours 25 minutes.

Night shifts that cross midnight

When the end time is earlier than the start time, the period has crossed midnight. Add 24 hours (1,440 minutes) to the end time before subtracting. The calculator does this for you, so a night shift needs no special handling.

Example

A shift from 10:30 PM to 6:15 AM: 1h 30m until midnight plus 6h 15m after it gives 7 hours 45 minutes.

Subtracting breaks

The calculator measures the full span between the two times. If an unpaid break falls inside that span, subtract it afterwards. A 9:15 AM to 5:40 PM day with a 45-minute lunch is 8h 25m − 45m = 7h 40m of working time. For a whole week of shifts, the Hours & Minutes Calculator is the quickest way to add the daily totals.

Finding the finishing time (Goal mode)

Goal mode adds a number of minutes to a start time. It is useful for cooking and charging times, appointment slots or the end of an exam.

Example

An exam that starts at 1:50 PM and lasts 95 minutes ends at 3:25 PM. If the result passes midnight, the calculator tells you it falls on the next day.

The 12 o’clock trap

Limits to keep in mind

Because the inputs are clock times without dates, the result is always less than 24 hours. For periods that span several days, use the Date Difference Calculator for the days and add the hours separately. Daylight-saving changes, which some countries use, can add or remove an hour on the night of the change; the calculator does not apply them.

Frequently asked questions

How many hours is 8 AM to 5 PM?

Nine hours. Subtract any unpaid break to get working time, for example 8 hours with a one-hour lunch.

How do I calculate hours worked overnight?

Enter the start and end times as they appear on the clock. The calculator adds 24 hours automatically when the end time is earlier than the start time.

Can I get the answer in decimal hours?

The calculator shows total minutes. Divide by 60 for decimal hours: 505 minutes is 8.42 hours.

Last reviewed: 4 November 2026 · How we check our calculations · Report an error

FOR WEBSITE OWNERS

Add this calculator to your website

Free for blogs, school sites and company pages. Paste this code where you want the calculator to appear; its height adjusts automatically.

Preview the embed