Time Calculator

Date & Time

Choose what you need: the time between two clock times (with an optional break), the sum of two durations, or the difference between them. The result comes in hours and minutes, in decimal hours and in minutes.

What do you want to calculate?

An end time earlier than the start counts as the next day.

Your entries stay on your device. The math runs right in your browser.

Result: Result (h:mm)

8:30 hrs

From 8:30 AM to 5:00 PM, minus a 0 min break, is 8:30 hrs: 8.50 hours or 510 min.

  • Decimal hours: 8.50 hours
  • Total minutes: 510 min

Step by step

8:30 AM to 5:00 PM, break 0 min = 8:30 hrs

  1. Clock times as minutes after midnight: 8:30 AM = 510 min and 5:00 PM = 1,020 min.
  2. Elapsed time: 510 min (if the end is earlier than the start, the span crosses midnight and 1,440 minutes are added).
  3. Minus the 0 min break: 510 min, which is 8:30 hrs or 8.50 hours.

Formula

time between = end - start (+ 1,440 min past midnight) - break
decimal hours = minutes / 60
start, end
clock times converted to minutes after midnight
h1, m1
hours and minutes of the first duration
1,440
minutes in a day (24 × 60)

How it works

Times are awkward to add because an hour has 60 minutes, not 100. The calculator therefore turns everything into minutes first, does the math, and turns the result back into hours and minutes. 2 hours 45 minutes plus 1 hour 30 minutes are 165 + 90 = 255 minutes, which is 4:15, not 3:75.

For the time between two clock times, each time becomes minutes after midnight: 8:30 AM is minute 510 and 5:00 PM is minute 1,020, so 510 minutes (8 hours 30 minutes) lie between them. If the end time is earlier than the start time, the span runs past midnight and a full day of 1,440 minutes is added: 10:00 PM to 6:00 AM is 8 hours. Equal start and end times give zero. A break you enter is taken off the span.

When subtracting, a second time that is longer than the first gives a negative result, shown with a minus sign. Every result also appears in decimal hours (4:15 = 4.25), the form payroll and invoices use. For a full week of clock-in and clock-out times, the time card calculator adds up every day, and the military time converter turns 2:30 PM into 1430.

The formula

To show a result in hours and minutes, the total minutes are divided by 60: the whole number is the hours and the remainder the minutes. 255 minutes / 60 = 4 remainder 15, so 4:15.

Decimal hours are the minutes divided by 60: 255 / 60 = 4.25. The digits after the point are fractions of an hour, so 4.25 hours are 4 hours 15 minutes, not 4 hours 25 minutes.

Example

How long is it from 8:30 AM to 5:00 PM with a 30 min lunch break?

  1. Convert the clock times to minutes after midnight: 8:30 AM = 510 min and 5:00 PM = 1,020 min.
  2. Elapsed: 1,020 - 510 = 510 minutes, that is 8 hours 30 minutes.
  3. Take off the 30 minute break: 480 minutes, which is 8:00 hrs or 8.00 hours.

From 8:30 AM to 5:00 PM, minus a 30 min break, is 8:00 hrs: 8.00 hours or 480 min.

Load this example into the calculator

Frequently asked questions

How do I calculate the time between two times?

Subtract the start time from the end time. If the minutes of the end time are smaller, borrow an hour: 4:10 PM minus 1:45 PM becomes 3:70 minus 1:45, which is 2 hours 25 minutes. If the end is earlier than the start, the span crosses midnight, so add 24 hours to the end time first.

How do I add hours and minutes?

Add the hours and the minutes separately, then turn every 60 minutes into an hour. 3 h 40 min plus 2 h 35 min gives 5 h 75 min, which is 6 h 15 min. The calculator does this in one step and also accepts minutes above 59.

How many hours are there from 9 AM to 5 PM?

8 hours. 9 AM to noon is 3 hours and noon to 5 PM is 5 more. Take a 30 minute unpaid lunch off and 7 hours 30 minutes of work time remain, 7.5 in decimal hours.

How does the calculator handle midnight?

When the end time is earlier than the start time, it assumes the end is on the next day. 11:00 PM to 7:00 AM is therefore 8 hours. Equal start and end times count as zero, not 24 hours.

Can the result be negative?

Only when subtracting. If the second time is longer than the first, the difference is negative, for example 1:30 minus 2:45 is minus 1:15. The time between two clock times is never negative.

Last updated: Responsible editor: Jared Alan
Checked against 35 test cases · How we test
Sources: