Skip to content

Hours Calculator – Time Between Two Times

Updated:

Find the time between a start and end time, with optional dates and a break to subtract. Enter times in 24-hour or 12-hour (AM/PM) format.

Find the Time Between Two Times

Input Fields
Use HH:MM or HH:MM:SS. In 12-hour mode, add AM or PM, such as 9:00 AM.
If both dates are blank and this time is earlier than the start time, it is treated as the next day.
Leave both dates blank for a time-only calculation. If you enter just one date, it is used for both times.
Enter both dates for a multi-day duration. When a date is supplied, an end before the start produces an error.
min
Whole minutes to subtract from the elapsed time; enter 0 for no break.
If enabled, the result will update automatically when you change any value.

Time Duration Formula

Formula
\[T=86{,}400(D_e-D_s)+(t_e-t_s)-60B\]

Where:

  • \(T\) — duration after subtracting the break, in seconds
  • \(D_e-D_s\) — number of calendar days between the end and start; when dates are blank, this is 1 if the end time is earlier than the start time, or 0 otherwise
  • \(t_e\) and \(t_s\) — end and start times, measured in seconds after midnight
  • \(B\) — break to subtract, in whole minutes

The formula finds elapsed time across the relevant calendar days, then subtracts the break. Each calendar day is treated as exactly 24 hours.

Time Duration – Calculation Example

Example: using the default values, a period starts at 09:00 and ends at 17:30 on the same day, with a 30-minute break.

\[T=(17\times3{,}600+30\times60)-(9\times3{,}600)-30\times60=28{,}800\text{ seconds}\]

Result: 8:00:00, or 8.00 total hours, 480.00 total minutes and 28,800 total seconds.

How to use the calculator

  1. Choose Time Format: 24-hour or 12-hour (AM/PM). Use the same format for both times.
  2. Enter Start Time and End Time. Use hours and minutes, such as 09:00 and 17:30, or include seconds, such as 09:00:30. In 12-hour mode, add AM or PM, as in 9:00 AM.
  3. Leave Start Date (optional) and End Date (optional) blank for a time-only calculation. To measure an interval spanning multiple days, enter both dates. If you enter only one date, the calculator uses it for both times.
  4. Enter Break to Subtract in whole minutes. The default is 30 minutes; enter 0 if there is no break.
  5. Read Duration (h:mm:ss) for the time after the break. The results also show decimal hours, total minutes and total seconds. Check Date and Break Details to see how dates and any break were handled.

What a time duration means

A time duration is the amount of time between two points, rather than the clock time at either point. This calculator first measures the elapsed interval and then subtracts the break you entered. It can be useful for checking a shift, a study session, a journey or any other period where part of the elapsed time should not count.

The Duration (h:mm:ss) result keeps hours as a running total: a 26-hour interval appears as 26:00:00, not 2:00:00. Total Hours (Decimal) expresses the same duration in hours rounded to two decimal places. For example, 8 hours 30 minutes is 8.50 hours, not 8.30 hours. Total minutes is also displayed to two decimal places, so seconds can contribute a fraction of a minute.

When you provide dates, Days, Hours and Minutes separates the resulting duration into complete 24-hour days and the time remaining. It also includes seconds when needed. Without dates, this extra breakdown is hidden; use the h:mm:ss result even if an overnight interval crosses midnight.

Dates, overnight periods and practical limits

If both dates are blank and the end time is earlier than the start time, the calculator assumes the end is on the next day. For example, 22:00 to 02:00 is four hours before any break is subtracted. If the two times are identical and no dates are entered, the elapsed time is zero—not a full day. To specify a full-day or longer interval, enter both dates.

Once a date is supplied, there is no automatic next-day assumption. An end date and time earlier than the start produces an error, including when only one date is entered and the end time is earlier. The break must be a non-negative whole number of minutes and cannot exceed the elapsed time.

Calendar days are treated as exactly 24 hours. The calculation does not account for time zones or daylight-saving clock changes, so an interval crossing one of those changes may differ from the actual time elapsed. For travel planning, you can compare a calculated journey length with the Road Trip Arrival Time Calculator. If you need to estimate a charge based on the length of a stop, see the Parking Cost Calculator.

Frequently Asked Questions

How can I calculate a time duration by hand?

Convert each clock time to minutes after midnight, subtract the start from the end, and then subtract any break. For example, 10:15 to 14:45 is 270 minutes; after a 20-minute break, the duration is 250 minutes, or 4 hours 10 minutes. If seconds matter, work in seconds throughout rather than rounding each time first.

How do I convert decimal hours into hours and minutes?

Keep the whole number as hours and multiply the decimal part by 60 to get minutes. For example, 7.75 hours is 7 hours plus 0.75 × 60 = 45 minutes. Conversely, 7 hours 45 minutes is 7.75 hours. A displayed decimal result may be rounded, so use the h:mm:ss result when you need the exact duration.

Does 12:00 AM mean noon or midnight?

12:00 AM is midnight, and 12:00 PM is noon. This is a common source of 12-hour errors when entering shift times. In 24-hour notation, midnight at the start of a day is 00:00, while noon is 12:00. Check the AM or PM label on both times before interpreting an unexpectedly long or short result.

Why might my work-hours total differ from a payroll or timesheet total?

Payroll systems may round each clock entry or shift, apply unpaid-break rules, or use a different definition of the workday. Rounding each shift before adding them can produce a different total from adding exact durations first. Compare the original clock entries, break policy and rounding rules; this calculator’s result alone does not determine payable hours.

What is a typical length for a work shift?

An eight-hour working day is a common reference point, but there is no single normal shift length. Schedules vary by industry, contract and location, and an unpaid meal break can make the time from clock-in to clock-out longer than the hours worked. For pay or overtime questions, check the rules that apply to your workplace.

Do leap days and month-end dates affect a multi-day duration?

Yes. A date-based calculation counts the calendar days between the dates, including February 29 in a leap year. For example, noon on February 28 to noon on March 1 is 48 hours in a leap year and 24 hours in a non-leap year. The calculation still treats each counted day as 24 hours.

Can I use this duration for a trip across time zones or a daylight-saving change?

Not reliably without adjusting the times first. Local clock readings in different time zones do not share the same reference point, and a daylight-saving change can make a calendar day effectively 23 or 25 hours long. Convert both moments to the same time zone—ideally UTC—before finding the actual elapsed time.

Leave a Reply

Your email address will not be published. Required fields are marked *