Guides

How to Calculate the Time Between Two Times

Calculate the time between two times: elapsed and clock-duration formulas, 12- and 24-hour inputs, a format table, worked examples, and source-based FAQs.

Miryori Editorial Team3 min read
Try the Time in Between Calculator

The time in between calculator turns two moments into a single duration. Whether you are timing a school run, a work shift or a gap between appointments, the tool gives you the span in hours and minutes without requiring a stopwatch. It does this in two ways: a direct elapsed-time subtraction and a clock-time calculation that understands 12- and 24-hour clocks.

The time between two moments is the end time minus the start time, written as duration=end time−start time\text{duration} = \text{end time} - \text{start time}. This calculator offers two routes. Elapsed duration accepts any two times as long as the end is later than the start, with no 12- or 24-hour format restriction. Clock duration handles two clock times within one day or overnight, using hour, minute and second inputs plus an AM/PM marker in 12-hour mode.

What equations does the calculator use?

The elapsed section works on a single subtraction. You supply a start time and an end time, and the tool returns the difference:

duration=end time−start time\text{duration} = \text{end time} - \text{start time}

The clock section passes nine separate inputs to the clock-duration function: the chosen clock format, the start and end hours, minutes and seconds, and the AM/PM marker for each endpoint.

clock duration=getClockDuration(clock format,hourstart,minstart,secstart,AM/PMstart,hourend,minend,secend,AM/PMend)\text{clock duration} = \text{getClockDuration}(\text{clock format}, \text{hour}_{start}, \text{min}_{start}, \text{sec}_{start}, \text{AM/PM}_{start}, \text{hour}_{end}, \text{min}_{end}, \text{sec}_{end}, \text{AM/PM}_{end})

Both results are outputs: duration is the elapsed answer, while clock duration is produced only by the clock section. The clock format selector chooses between the 12-hour and 24-hour conventions, and the AM/PM selectors appear only in 12-hour mode.

Which clock formats and fields can I enter?

The calculator stores the two clock-format choices and the two AM/PM choices as numeric values:

Setting Option Stored value
Clock format 12-hour 0
Clock format 24-hour 1
AM/PM am 0
AM/PM pm 1

Its fields divide into inputs for each mode and the results they feed:

Field Kind What it supplies
Start time, End time numerical inputs The elapsed-time pair
Duration numerical result End time minus start time
Clock format select 12-hour or 24-hour mode
Hour, Minute, Second (start and end) numerical inputs The clock-time pair
AM/PM (start and end) select, 12-hour mode only Morning or afternoon marker
Clock duration forced output The calculated clock-time span

How do I use the calculator?

  1. Decide which question you are answering. Use the elapsed section for any two times you already know, and the clock section when you want to name a start and an end on a clock.
  2. In the elapsed section, enter a start time and an end time that comes later. Read the span in the Duration field.
  3. In the clock section, pick 12-hour or 24-hour format. In 24-hour mode, enter the hour, minute and second for both endpoints.
  4. In 12-hour mode, set the AM/PM selector for the start and the end as well as the hour, minute and second fields. Seconds default to 0 when you leave them untouched.
  5. Read the finished span in the Clock duration field. The clock section is built for two clock times in one day or overnight, so it suits shifts that cross midnight.

Worked example: a school run from 6 AM to 1 PM

The calculator's own example is a trip to school at 6 AM and a return home at 1 PM. Writing 1 PM in 24-hour time gives 13:00, so the subtraction is 13:00 minus 6:00, which equals 7:00. The time in between is seven hours. No borrowing is needed because the end minutes, 00, are not smaller than the start minutes, 00.

Frequently Asked Questions

Can I mix 12-hour and 24-hour times in the elapsed section?

Yes. The elapsed duration section accepts any two times without restrictions tied to the 12- or 24-hour formats, provided the end time is later than the start time.

What if my end time is earlier than my start time?

The elapsed section expects the end to be later than the start. For a span that runs across midnight, use the clock section, which is designed for two clock times during a single day or overnight.

Can I enter seconds in the clock section?

Yes. The clock section has separate second fields for the start and the end. Both default to 0, so you can leave them untouched for a whole-minute calculation.

References

  • Omni, Time in Between Calculator: lead, "How do I use this time in between calculator?" section, equations, input fields and FAQs.
  • Standard 12- and 24-hour clock notation, including AM/PM markers and the 60-minute hour, as used by the calculator's format selectors.
Calculator

Time in Between Calculator

Time in Between: time in between calculator finds the amount of time between two hours. Free, fast and private.

Try the Time in Between Calculator