Time Duration Calculator

Work out the hours and minutes between a start and end time. It handles times that run past midnight.

Calculator Tools● Free No upload Instant

Loading Time Duration Calculator…

Your browser is preparing the tool. It runs 100% locally.

Quick answer

Enter a start time and an end time and the tool returns the duration in hours and minutes, plus the total minutes and decimal hours. If the end time is earlier than the start, it assumes the next day and adds 24 hours, so an overnight shift works. It covers a single day; for spans across several days, use a date-difference calculator. All of it happens in your browser.

What the Time Duration Calculator does

This tool measures the gap between two clock times. It gives the duration as hours and minutes, the usual way to read a shift or a session, and also as total minutes and as decimal hours for timesheets and pay calculations.

Use it to find how long you worked, how long an event ran or how long a task took, without counting on your fingers.

How it works

The tool turns both times into minutes since midnight, then subtracts the start from the end. If the result is negative (the end time is earlier in the day than the start), it adds a full day of 1,440 minutes and treats the end as the next day. That total is then shown as hours and minutes, as decimal hours, and as raw minutes.

So 9:00 to 17:30 is 510 minutes, which is 8 hours 30 minutes or 8.5 hours. And 22:00 to 06:00 wraps past midnight to give 8 hours, because the end is taken as the following morning.

Methodology

  1. Convert to minutes. Turn the start and end times into minutes since midnight.
  2. Subtract. Take the start minutes away from the end minutes.
  3. Handle midnight. If the result is negative, add 1,440 minutes (a full day) so an overnight span works.
  4. Show the duration. Display the result as hours and minutes, decimal hours and total minutes.

Time duration

minutes = (end hour × 60 + end min) − (start hour × 60 + start min) if minutes is negative, add 1,440 (one day) hours = minutes ÷ 60
Worked example
09:00 to 17:30 → 8h 30m · 510 minutes · 8.50 hours

If the end is earlier than the start, it assumes the next day (an overnight span). It covers up to one day; for a span across several dates, use a date-difference calculator.

Assumptions

  • Both times are on a 24-hour clock and within a single day; the result is at most 24 hours.
  • If the end time is earlier than the start, the tool assumes it is the next day and adds 24 hours, which suits overnight shifts.
  • It works with times only, not dates, so it cannot measure a span that runs across several days.

Standards & references

  • Minutes since midnight: Converting each time to minutes from midnight makes the subtraction simple and avoids hour-and-minute borrowing. The result is converted back into hours and minutes for display.
  • Crossing midnight: When the end time is earlier than the start, adding a full day (1,440 minutes) treats the end as the following day, which is how an overnight period is normally read.
  • Decimal hours: Expressing the duration as a decimal (8.5 hours rather than 8 hours 30 minutes) is the form timesheets and pay calculations usually need.

Accuracy and limits

The duration is exact for two times within a day. The arithmetic is a plain subtraction, shown three ways.

It assumes a span of at most 24 hours. If the end is earlier than the start, it adds one day for an overnight shift, but it cannot tell the difference between an overnight span and a multi-day one, so it caps at 24 hours.

For durations across several days or specific dates, use another tool: this one works with clock times only. A date-difference calculator measures spans across days and dates.

It uses the times as entered, to the minute. Seconds are not part of the calculation, so a duration is given to the nearest minute.

Where people use it

Timing a work shift

Find how long a shift ran, including overnight ones.

Filling a timesheet

Get decimal hours for pay or billing.

Measuring a session

Work out how long a meeting or task took.

Planning a schedule

Check the length of a time slot.

When it fits, and when it doesn't

Good for

  • Duration between two clock times
  • Overnight shifts that cross midnight
  • Decimal hours for timesheets
  • Quick session or meeting lengths

Not the best choice for

  • Spans across several days
  • Differences between dates
  • Durations longer than 24 hours
  • Second-level precision

For a span across days or between dates, use a date-difference calculator. For elapsed time including seconds, use a stopwatch. This tool measures clock-time durations within a single day.

Frequently asked questions

How does it handle a time that crosses midnight?
If the end time is earlier than the start, it assumes the end is the next day and adds 24 hours. So 22:00 to 06:00 comes out as 8 hours, which is right for an overnight shift.
What is decimal hours?
It is the duration written as a single number: 8.5 hours instead of 8 hours 30 minutes. Timesheets and pay calculations usually want this form, so the tool shows it alongside hours and minutes.
Can it measure more than 24 hours?
No. It works with clock times within a single day, capping at 24 hours. For longer spans or anything across dates, use a date-difference calculator instead.
Does it use a 24-hour or 12-hour clock?
It works on a 24-hour basis internally. Enter the times in the format your device's time field uses, and the duration is calculated the same way regardless.
Why is the duration shown three ways?
Hours and minutes is the natural way to read it, decimal hours suit pay and billing, and total minutes are useful for finer calculations. Having all three saves you converting between them.
Does it count seconds?
No. The calculation works to the minute, so durations are given to the nearest minute. For second-level timing, a stopwatch is the right tool.
What if the start and end are the same?
The duration is zero. If you mean a full 24-hour period, the tool cannot tell that apart from no time at all, since both times are identical.
Can I use it for billing clients?
Yes. Hourly billing uses the decimal hours figure. Enter the start and end of the work and read off the decimal hours to charge.
Does it work across a date change at the weekend or month end?
It only knows clock times, not dates, so it always treats an earlier end as the very next day. It does not know which date it is; for that, use a date-based tool.
How do I add up several durations?
Calculate each one, then add the total minutes or decimal hours together. This tool measures a single span at a time; summing several is a separate addition.
Is my data uploaded?
No. Your browser works out the duration and sends nothing to a server.
What is the largest duration it can show?
Just under 24 hours. Because it assumes a single day and wraps an earlier end to the next morning, the maximum span it reports is one day.

References

Subtracts the start time from the end time on a 24-hour clock and adds a day if the end is earlier. It covers a single day, not multi-day spans.

PopularHot

EMI Calculator

Reducing-balance EMI and the total interest you'll pay.

CalculatorOpen
PopularHot

BMI Calculator

BMI from height and weight, with the WHO category.

CalculatorOpen
Popular

Loan Calculator

Monthly payment and total interest on a loan.

CalculatorOpen
Popular

Percentage Calculator

X% of Y, X as a percent of Y, and percent change.

CalculatorOpen
Popular

Age Calculator

Exact age in years, months and days on any date.

CalculatorOpen
Popular

Discount Calculator

Sale price and savings from a percentage off.

CalculatorOpen

Back to the Time Duration Calculator

The maths runs in your browser. It's free and asks for no account.