ToolLineup

Time Duration Calculator

Time Duration Calculator works out the hours and minutes between two times (overnight shifts and breaks included, with decimal hours for timesheets), the exact span between two dates in years, months, days and weekdays, the date you reach by adding or subtracting time, and the total of a list of durations. It uses real month lengths and leap years, and runs entirely in your browser.

How it works

Times can be typed as 17:30, 5:30 pm, 5pm or 0930. Dates use year, month and day, then the time. Durations to add up can be 1:30, 2h 15m, 45 min or a range such as 9:00-17:30.

Hours and minutes from a start time to an end time — a shift, a meeting, a journey. An end earlier than the start runs past midnight.

Try:
9:00 AM to 5:30 PM, less a 30-minute break
8 hours

In other units

Hours and minutes
8:00
h:mm
Decimal hours
8
for timesheets and payroll: minutes ÷ 60
Total minutes
480
Total seconds
28,800
Before the break
8:30
8 hours and 30 minutes

How to calculate the time between two times

Turn both times into minutes after midnight, subtract, and turn the answer back into hours and minutes:

  1. 9:15 am is 9 × 60 + 15 = 555 minutes after midnight.
  2. 5:45 pm is 17:45, which is 17 × 60 + 45 = 1,065 minutes.
  3. 1,065 − 555 = 510 minutes, and 510 ÷ 60 = 8 remainder 30, so the answer is 8 hours 30 minutes.

With a 30-minute unpaid lunch break, take that off as well: 8 hours. When working in hours and minutes directly, borrow an hour whenever the minutes would go negative: 17:20 − 9:45 becomes 16:80 − 9:45 = 7:35.

Shifts that run past midnight

When the end time is earlier than the start time, the period crosses midnight. Add 24 hours to the end time and subtract as usual: a night shift from 22:00 to 06:00 is (6 + 24) − 22 = 8 hours. The Between two times tab does this automatically and says when it has. For anything longer than a day, use the Between two dates tab, where each end has its own date.

Converting minutes to decimal hours

Timesheets, payroll and invoices usually need hours as a decimal, because multiplying by an hourly rate only works on a decimal: 7 hours 45 minutes at 20 an hour is 7.75 × 20 = 155, not 7.45 × 20. Divide the minutes by 60:

MinutesDecimal hoursMinutesDecimal hours
50.08350.58
100.17400.67
150.25450.75
200.33500.83
250.42550.92
300.50601.00

To total a week, put one shift per line in the Add up durations tab: 9:00-17:30, 8:45-17:00 and so on. Five days of 8:30, 8:15, 7:45, 8:00 and 6:30 come to 39:00, or 39.00 decimal hours.

How to count the days between two dates

Subtract the earlier date from the later one. 1 March to 3 March is 2 days: that is the time that passes, and what a spreadsheet gives for B1 - A1. If you are counting the days something covers, such as a hotel booking, a leave request or a course that runs on both dates, you want 3: tick Include the end date.

For an age or a long span, the calendar breakdown is usually more useful than a day count. From 15 May 1990 to 27 October 2026 is 36 years, 5 months and 12 days, counted in real calendar months and with every leap year included, rather than dividing by an average 365.25 or 30.44.

Working days between two dates

Every full week contains 5 weekdays, so count the full weeks, multiply by 5 and then add the weekdays among the leftover days. From Monday 26 October 2026 to Monday 9 November 2026 is 14 days, exactly 2 weeks, so it contains 10 weekdays and 4 weekend days. The calculator counts these for any range. Public holidays vary by country and region, so take off any that fall in the period yourself.

Adding days, weeks or months to a date

Days and weeks are simple to add: 90 days after 27 October 2026 is Monday 25 January 2027. Months and years are calendar units, so their length depends on where you start, and a month after a date keeps the same day of the month: 15 March plus one month is 15 April. When that day does not exist, the date moves back to the end of the month, so a month after 31 January is 28 February (29 in a leap year). Banks, contracts and the EDATE spreadsheet function all work this way.

Some tools let the missing days spill over into the next month, so that a month after 31 January comes out as 3 March. This one does not, and it adds years and months first, then weeks, days, hours and minutes, which is how a person counts.

Daylight saving time and time zones

Where clocks change for summer, one night a year has 23 hours and another has 25. By default the calculator treats your times as clock readings with no changes, which is what you want for a timetable or a working day. Choose a time zone in the Between two dates tab to count the real elapsed time: in New York, midday on 31 October 2026 to midday on 1 November 2026 is 25 hours, because the clocks went back an hour that night. To see the same moment in two places, use the time zone converter; to work with time as a raw count of seconds, use the Unix timestamp converter.

Frequently asked questions

How do I calculate the hours between two times?

Subtract the start time from the end time. Convert both to minutes after midnight, subtract, then divide by 60: 9:15 am is 555 minutes and 5:45 pm is 1,065, so the difference is 510 minutes, or 8 hours 30 minutes. The Between two times tab does this for you and also gives the answer as decimal hours (8.5).

How do I calculate hours for a shift that goes past midnight?

Add 24 hours to the end time before subtracting. A shift from 10:00 pm to 6:00 am is (6 + 24) − 22 = 8 hours. In this calculator an end time earlier than the start time is automatically read as the next day.

How do I convert hours and minutes to decimal hours?

Divide the minutes by 60 and add them to the hours: 7 hours 45 minutes is 7 + 45 ÷ 60 = 7.75 hours. Common values are 15 minutes = 0.25, 30 minutes = 0.5 and 45 minutes = 0.75. Timesheets and payroll usually want decimal hours, because hours × rate only works on a decimal.

How many days are there between two dates?

Count the days from the start date up to the end date. By default the end date is not counted, so 1 March to 3 March is 2 days, the same as subtracting the dates in a spreadsheet. Tick Include the end date to count both, giving 3 days, which is what you want for the length of a booking or a leave period.

Can it count working days (weekdays) between two dates?

Yes. The Between two dates tab shows how many of the calendar days are weekdays, Monday to Friday, and how many are weekend days. Public holidays differ by country and are not taken off, so subtract any that fall in the period yourself.

What date is 90 days from today?

Open the Add or subtract time tab, which starts from the current date and time, and choose +90 days (or type any number of days, weeks, months or years). The result shows the date, the day of the week, the ISO week number and how many calendar days away it is.

What is one month after 31 January?

There is no 31 February, so adding a month to 31 January gives the last day of February: 28 February, or 29 in a leap year. This is how calendars, banks and spreadsheet functions such as EDATE handle it, and the calculator tells you when it has happened.

Does Time Duration Calculator account for leap years?

Yes — the calculation is calendar-aware, so February 28 to March 1 counts as one day in a common year and two days in a leap year, and months and years are real calendar months and years rather than 30- or 365-day averages.

What about daylight saving time?

By default times are treated as clock readings with no daylight-saving changes, so midday to midday is always 24 hours. Choose a time zone in the Between two dates tab and the hour gained or lost when the clocks change is counted: in New York, midday on 31 October 2026 to midday on 1 November 2026 is 25 hours.

How do I add up hours and minutes?

Add the minutes and the hours separately, then carry every 60 minutes into an hour: 1:45 + 2:30 is 3 hours 75 minutes, which is 4:15. The Add up durations tab totals a whole list in one go, one duration per line, and accepts forms such as 1:45, 2h 30m, 45 min or a start–end range like 9:00-17:30.

Can I use Time Duration Calculator as an age calculator?

Yes — enter a birth date and today’s date in the Between two dates tab to get an exact age in years, months and days rather than a rounded number of years, along with the total number of days lived.

Related tools