Lelifi·tools

Time Duration Calculator

From 2:30 p.m. on October 19 to 9:15 a.m. on October 22 is 2 days 18 hours 45 minutes. That works out to 66.75 hours, or 4,005 minutes, because each day adds 24 hours and each hour adds 60 minutes.

Enter a start and an end. The end date can be later than the start date, and the time can cross midnight. Nothing leaves your browser.

Enter a start and end date and time to see the elapsed duration in days, hours and minutes, along with the same span in total hours, minutes and seconds.

By the Lelifi editors ·

Key takeaways

Two full days plus 18 hours 45 minutesOct 192:30 p.m. startOct 2024 hoursOct 2148 hoursOct 229:15 a.m. end
The span from October 19 to October 22, with the two full days marked. The leftover 18 hours 45 minutes is what makes the total 66.75 hours.
Borrowing across days, hours and minutesEnd: 9:15 a.m. on Oct 22Start: 2:30 p.m. on Oct 19Days: 22 - 19 = 3, less the part day = 2Hours: 9 - 14 = -5, borrow 24: 19Minutes: 15 - 30 = -15, borrow 60: 45= 2 days 18 hours 45 minutes
The same subtraction by hand, borrowing 24 hours and 60 minutes. Each borrow is one unit from the column on the left.
On this page
  1. What a duration measures
  2. Subtracting times by hand, with a borrow
  3. Worked example: three calendar days apart
  4. The unit ladder: seconds, minutes, hours, days
  5. The day is not always 24 hours
  6. When the end time looks earlier than the start
  7. Rounding a duration for payroll
  8. Mistakes that change the answer

What a duration measures

A duration is the gap between two instants. You give a start and an end, and the answer is how much time passed between them. It is not a clock reading, and it is not a time zone gap, even though all three involve hours and minutes.

The difference matters when you pick a tool. Our time calculator adds several spans together, for example 1 hour 40 minutes plus 2 hours 25 minutes. Our time difference calculator compares clocks in two cities at the same moment. This page subtracts one timestamp from another, which is the question behind "how long did that take" and "how long until then".

The subtraction can cross minutes, hours, days, months and years. A meeting that starts at 9:45 and ends at 13:20 is a duration. A flight that leaves on Tuesday evening and lands on Wednesday morning is a duration. A project that starts on March 3 and ends on May 14 is a duration measured in days, not in hours on a clock.

One number, one unit at a time: the calculator reports the answer as days, hours and minutes, then converts the same span to total hours, total minutes and total seconds. Those are the same quantity written four ways, and each one answers a different follow-up question.

Subtracting times by hand, with a borrow

Subtract the columns from right to left, the way you learned subtraction with whole numbers. Seconds first, then minutes, then hours, then days. When the top number is smaller than the bottom one, borrow from the next column to the left.

Example: 9:45 a.m. to 1:20 p.m. Write the end as 13:20 on a 24 hour clock. Minutes: 20 - 45 is negative, so borrow 60 minutes from the hours: 80 - 45 = 35 minutes, and the hours drop from 13 to 12. Hours: 12 - 9 = 3. The duration is 3 hours 35 minutes.

Example across midnight: 10:40 p.m. to 1:15 a.m. Write the start as 22:40 and the end as 25:15, treating the next day as hour 24 plus 1. Minutes: 15 - 40 is negative, borrow 60: 75 - 40 = 35, and the hours drop to 24. Hours: 24 - 22 = 2. The duration is 2 hours 35 minutes, or 155 minutes.

The borrow is always one unit of the column on the left: 60 seconds make a minute, 60 minutes make an hour, 24 hours make a day. It is the same rule at every step, which is why a spreadsheet formula that adds the raw numbers instead of the time values produces nonsense.

If you subtract with a calculator instead, enter the end date and time first and the start second, or the sign comes out negative. A negative duration is a useful signal that the two fields were swapped, not a real answer.

Worked example: three calendar days apart

Start: 2:30 p.m. on October 19. End: 9:15 a.m. on October 22. The dates are three days apart, but the end time is earlier in the day than the start time, so one of those days is only partly counted.

StepDaysHoursMinutesRunning total
Start to midnight, Oct 1909309 h 30 min
Full day, Oct 2010033 h 30 min
Full day, Oct 2110057 h 30 min
Midnight to 9:15, Oct 22091566 h 45 min
Total2184566 h 45 min

Convert to a single unit: 2 days is 2 x 24 = 48 hours, plus 18 hours is 66 hours, plus 45 minutes is 0.75 hours, for 66.75 hours. In minutes, 66 x 60 = 3,960, plus 45 = 4,005 minutes. In seconds, 4,005 x 60 = 240,300 seconds.

The shortcut is to subtract the timestamps as one number. Convert each to seconds since a fixed reference, subtract, then divide back. The column method and the seconds method give the same 66.75 hours, and the seconds method is what every program uses because it has no borrow rules to get wrong.

The unit ladder: seconds, minutes, hours, days

Every conversion on this page is a multiplication by 60 or by 24. Learn the ladder once and the calculator becomes a check rather than a crutch.

UnitSecondsMinutesHoursDays
1 minute6010.01670.00069
1 hour3,6006010.0417
1 day86,4001,440241
1 week604,80010,0801687
1 year, 365 days31,536,000525,6008,760365

The decimal hours column is where most mistakes happen. Six minutes is exactly 0.1 hours, 15 minutes is 0.25, 30 minutes is 0.5, and 45 minutes is 0.75. A span of 7 hours 44 minutes is 7 + 44/60 = 7.733 hours, not 7.44 hours. Writing 7.44 understates the time by about 18 minutes.

MinutesDecimal hoursMinutesDecimal hours
10.0167200.3333
50.0833250.4167
60.1000300.5000
100.1667400.6667
150.2500450.7500

To go the other way, multiply the decimal part by 60. 0.733 x 60 = 43.98, so 7.733 hours is 7 hours 44 minutes once the seconds are rounded. The rounding is why a time sheet that converts to two decimals and back can lose or gain a minute.

The day is not always 24 hours

Clock time and elapsed time part company twice a year in most of the United States. When daylight saving time starts, clocks jump from 2:00 a.m. to 3:00 a.m., and that calendar day contains 23 hours. When it ends, clocks fall back from 2:00 a.m. to 1:00 a.m., and that day contains 25 hours. The NIST daylight saving time page explains the rule and the history behind it.

Day typeHoursMinutesSeconds
Normal day241,44086,400
Spring forward day231,38082,800
Fall back day251,50090,000

If you subtract clock readings across a spring forward day, you get one hour more than the real elapsed time. A shift that reads 11:00 p.m. to 7:00 a.m. on that night is 7 hours of real time, not 8, because the hour between 2 and 3 never happened. Across the fall back night, the same clock readings are 9 hours.

This calculator reads your device's time zone and converts both timestamps to absolute instants, so the daylight saving shift is counted correctly. The catch is that the answer depends on the time zone the browser is set to. If you are computing a duration in another country, the result is right only if your device is set to that zone.

For spans measured in whole days, the shift rarely matters. For a night shift, a flight, or a 24 hour service window, it changes the answer by an hour, which is enough to miss a deadline or misprice a shift.

When the end time looks earlier than the start

An end time earlier than the start time is normal when the span crosses midnight. A shift from 10:40 p.m. to 1:15 a.m. reads as a negative number if you only compare clock faces, but it is a 2 hour 35 minute duration if the end date is the next day.

The fix is always the date, never the clock. Put the real end date in the end date field, even when it is tomorrow, and the subtraction works. This calculator compares full timestamps, so 22:40 on Monday to 01:15 on Tuesday comes out positive and correct.

If you leave both dates the same, the calculator will tell you the end is before the start rather than silently returning a negative duration. That warning catches the two common cases: a forgotten date change, and an AM/PM swap on a 12 hour clock.

Long spans work the same way. A rental picked up at 4:00 p.m. on Friday and returned at 9:00 a.m. on Monday is 2 days 17 hours, which most rental counters bill as 3 days because any part day counts as a full day. The duration is a fact; the billing rule is a separate policy.

Rounding a duration for payroll

Payroll rarely uses the exact minute. Employers round to a fraction of an hour, and federal rules limit how far that rounding can go. 29 CFR 785.48 permits rounding to the nearest quarter hour, and the common shorthand is the 7 minute rule: up to 7 minutes can be dropped, 8 or more must be rounded up to the next quarter hour.

Minutes past the quarterRounded toEffect on paid time
1 to 70 minutesUp to 7 minutes dropped
8 to 1515 minutesAdded to the next quarter
16 to 2215 minutesUp to 7 minutes dropped
23 to 3030 minutesAdded to the next half hour

Rounding has to work both ways over time. The regulation says the system cannot consistently favor the employer, so a rule that always rounds down is not compliant even if it looks like a quarter hour rule. The hours worked calculator applies these rules to a shift with an unpaid break, and our time card calculator totals a full week with overtime.

Example: 8:58 a.m. to 5:12 p.m. with a 30 minute unpaid break. The raw span is 8 hours 14 minutes. Subtract the break: 7 hours 44 minutes. Rounded to the nearest quarter hour, that is 7.75 hours, and at $18 an hour the shift pays $139.50. Without rounding it pays 7.733 x 18 = $139.20, a difference of 30 cents on one shift.

Mistakes that change the answer

Most wrong durations come from four small slips, and each one has a check.

12 a.m. and 12 p.m. Midnight is 12:00 a.m. and noon is 12:00 p.m. A span from 12:00 a.m. to 12:00 p.m. is 12 hours; from 12:00 p.m. to 12:00 a.m. is also 12 hours, but only if the end date is the next day. Writing 12:00 for both ends is the single most common input error in shift math.

24 hour time without a leading zero. 1:00 in 24 hour time is 1 a.m., not 1 p.m. If the result is off by 12 hours, the input was probably read as the wrong half of the day.

Seconds that do not show. A time field that stores only hours and minutes drops the seconds. A 45 second call and a 5 second call both read as 0 minutes, and a batch of them can be off by several minutes in total.

Time zone on one end only. If the start is in Eastern time and the end in Pacific, the clock difference understates or overstates the real duration by three hours. Convert both ends to the same zone first, or to UTC, before subtracting.

The calculator handles dates, months and years, so a span from December 28 to January 3 comes out as 6 days without any month length table. It does not know about leap seconds, which the time standards bodies add to keep atomic time aligned with the earth's rotation, because those are irrelevant at the minute level this tool reports.

Frequently asked questions

How do I calculate the duration between two times?

Subtract the start from the end, borrowing 60 minutes or 24 hours when a column goes negative. From 9:45 a.m. to 1:20 p.m. is 3 hours 35 minutes, or 215 minutes.

How many hours is 9:45 to 5:30?

7 hours 45 minutes, or 7.75 hours. With a 30 minute unpaid lunch the paid time is 7 hours 15 minutes, or 7.25 hours.

What is 2 days 18 hours 45 minutes in hours?

66.75 hours. Two days is 48 hours, plus 18 is 66, and 45 minutes is 0.75 of an hour. In minutes that is 4,005, and in seconds 240,300.

How many minutes are in a day?

1,440 minutes, which is 24 x 60. A spring forward day has 1,380 minutes and a fall back day has 1,500 minutes.

How do I handle a shift that crosses midnight?

Put the next day in the end date. From 10:40 p.m. to 1:15 a.m. the next day is 2 hours 35 minutes, or 155 minutes, and the subtraction only works if the dates differ.

Why is my duration off by an hour?

The usual cause is a daylight saving change. A spring forward day has 23 hours and a fall back day has 25, so a clock subtraction across those dates is off by one hour unless the tool converts both ends to absolute time.

What is 7.75 hours in hours and minutes?

7 hours 45 minutes. The 0.75 is 45 minutes. In the other direction, 7 hours 44 minutes is 7.733 hours, not 7.44.

How many seconds are in a week?

604,800 seconds, which is 7 x 86,400. A 40 hour work week is 144,000 seconds, or 2,400 minutes.

What is the 7 minute rule for payroll?

Under 29 CFR 785.48 employers may round to the nearest quarter hour. Up to 7 minutes can be dropped, and 8 or more minutes must round up to the next quarter hour, applied consistently in both directions.

Can a duration be negative?

Only as a sign of a swapped input. If the end comes out before the start, check the dates first, then check whether an AM/PM choice put the start in the wrong half of the day.

How many hours between two dates three days apart?

72 hours if the clock times match. From 2:30 p.m. on October 19 to 9:15 a.m. on October 22 the times differ, so the answer is 66.75 hours rather than 72.

Does this calculator handle months and years?

Yes. It subtracts full timestamps, so December 28 to January 3 is 6 days and February 28 to March 1 is 1 day in a common year and 2 days in a leap year.

How do I convert a duration to decimal hours?

Divide the minutes by 60 and add the hours. 7 hours 44 minutes is 7 + 44/60 = 7.733 hours. Six minutes is exactly 0.1 hour, so 7 hours 6 minutes is 7.1.

Is a workday 8 hours or 8.5 hours?

That depends on the break policy, not the clock. A 9:00 to 5:00 day with no break is 8 hours, and with a 30 minute unpaid lunch it is 7.5 paid hours.

Spotted a wrong number or a broken result?

More Date Time tools

See all Date Time tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.