Calculate Duration of Time guide
Calculate Duration of Time: Hours and Minutes Between Two Times
Use our calculator to work out the duration of time between two times or dates, including night shifts and breaks, in hours and minutes or decimal hours.
By the AllCalculator editorial teamUpdated 15 October 20262 min read
Working out the time between two clock times sounds simple, until a shift runs past midnight or you need the answer in decimal hours for a timesheet. Our Calculate Duration of Time calculator handles both, and can work out the time between two dates as well.
How to calculate the duration between two times
- Convert both times to minutes after midnight. 9:00am is 540 minutes and 5:30pm is 1,050.
- Subtract the start from the end: 1,050 − 540 = 510 minutes.
- Take off any unpaid break: 510 − 30 = 480 minutes.
- Convert back to hours: 480 ÷ 60 = 8 hours.
If the end time is earlier than the start, the shift runs past midnight, so add 24 hours (1,440 minutes) to the end time first.
Decimal hours
Timesheets and payroll often use decimal hours. The minutes are a fraction of an hour:
| Minutes | Decimal |
|---|---|
| 15 | 0.25 |
| 30 | 0.5 |
| 45 | 0.75 |
| 20 | 0.33 |
| 40 | 0.67 |
So 7 hours 45 minutes is 7.75 hours, not 7.45.
How to use the calculator (Calculate Duration of Time)
- Choose between two times or between dates and times.
- Enter the start and end.
- For shifts, add any unpaid break and, optionally, your hourly rate to see your pay.
A worked example
With the calculator's default settings, a shift runs from 9:00 to 17:30 with a 30-minute break. That's 8 hours 30 minutes in total, or 8 hours worked after the break.
A night shift from 22:00 to 06:00 is also 8 hours. The calculator spots that it runs past midnight.
Breaks and working time
If you work more than 6 hours a day, you're usually entitled to an uninterrupted 20-minute rest break. Most workers also can't be made to average more than 48 hours a week, unless they choose to opt out.
To count the days between two dates, use our Days Calculator. For overtime, try our Overtime Pay Calculator, and to convert a salary to an hourly rate, use our Salary to Hourly Calculator.
Frequently asked questions
How do I calculate hours worked?
Subtract the start time from the end time, then take off any unpaid breaks. Convert the minutes to a decimal by dividing by 60.
How many hours is 9am to 5pm?
8 hours, or 7.5 hours if you take an unpaid 30-minute lunch break.
How do I add up hours across a week?
Work out each day's hours in decimal, then add them together. Decimal hours are much easier to add than hours and minutes.
Whether you're filling in a timesheet or checking a payslip, getting the hours right matters. Use the Calculate Duration of Time calculator whenever you need it.
Sources and further reading
Links open official and independent websites in a new tab.
This guide is general information to help you understand your options. It isn't financial, tax, legal or building advice and doesn't take your personal circumstances into account. Figures were checked when the guide was last updated and can change, so confirm anything important with GOV.UK, HMRC, a regulated adviser or a qualified tradesperson.