Free tool · Date and time
Hours calculator
Enter a start and an end time and get the hours and minutes between them, with decimal hours. Add more spans to total a day or a week.
- Free
- No sign-up
- Runs in your browser
- 2 spans added
- Decimal hours
- 8.00
- Hours and minutes
- 8:00
- Total minutes
- 480
How to use the Hours Calculator
- Enter the Start and End time of the first span. An end earlier than the start counts as the next day.
- Type any unpaid time under Break (min), in whole minutes. It is taken off that span.
- Press Add a span for each further shift or work block. Remove deletes a span and Clear all starts again.
- Read the total under Total time as hours and minutes, as decimal hours and as total minutes, and press Copy.
How do I calculate the hours between two times?
Convert both times to minutes after midnight, subtract the start from the end, and write the difference as hours and minutes. From 09:00 to 17:30 that is 540 minutes to 1,050 minutes, a difference of 510 minutes, which is 8 h 30 min. The calculator does this with the 24-hour value the time box holds, so it makes no difference whether your device shows AM and PM.
Type the times under Start and End. The answer shows hours and minutes, and under it the same time as decimal hours (8.50 here). If the end time equals the start time, the span is 0, not 24 hours, because only times of day are entered and not dates.
How do I calculate hours worked across midnight?
When the end time is earlier than the start time, the span is taken to cross midnight and end the next day. A shift from 22:00 to 06:30 is 2 hours until midnight plus 6 hours 30 minutes after it, 8 h 30 min in all. The row says "overnight" so you can see the tool read it that way, and a chip under the total counts how many spans crossed midnight.
A span cannot be longer than 24 hours, because there are no dates. For a longer stretch, such as a 36-hour on-call period, enter blocks: 08:00 to 00:00 is 16 h and 00:00 to 20:00 is 20 h, and together they are 36 h. A shift that really runs over 24 hours needs its start and end dates, which this tool does not take.
How do I subtract a lunch break and add up several shifts?
Type the unpaid break in minutes under Break (min). A 09:00 to 17:30 shift with a 30-minute break is 8 h of paid time. The break must be a whole number of minutes and cannot be longer than the span, or the tool tells you which span is wrong.
Use Add a span for each extra block and the total updates as you type. The two spans loaded as the example, 09:00 to 12:30 and 13:15 to 17:45, are 3 h 30 min and 4 h 30 min, a total of 8 h (8.00 decimal hours). Five days of 09:00 to 17:30 with a 30-minute break each come to 40 h, or 40:00 on a timesheet. A row with no times is ignored, and a row with only one time is an error, not a guess.
If you need pay for these hours, the time card calculator totals a week and multiplies by a pay rate, and the salary to hourly calculator turns a yearly salary into an hourly rate.
Common shift lengths in hours and decimal hours
The table runs the calculator for shifts people often ask about. Paid time is the span minus the unpaid break. Use the decimal column when a payroll form wants hours as a number, and the hours:minutes column when it wants a timesheet total.
| Start to end | Unpaid break | Paid time | Decimal hours | Hours:minutes |
|---|---|---|---|---|
| 09:00 to 17:00 | none | 8 h | 8.00 | 8:00 |
| 09:00 to 17:00 | 60 min | 7 h | 7.00 | 7:00 |
| 08:00 to 16:30 | 30 min | 8 h | 8.00 | 8:00 |
| 07:00 to 15:00 | 45 min | 7 h 15 min | 7.25 | 7:15 |
| 06:00 to 18:00 | 60 min | 11 h | 11.00 | 11:00 |
| 14:00 to 22:30 | 30 min | 8 h | 8.00 | 8:00 |
| 18:00 to 02:00 (next day) | 30 min | 7 h 30 min | 7.50 | 7:30 |
| 22:00 to 06:30 (next day) | none | 8 h 30 min | 8.50 | 8:30 |
| 23:00 to 07:15 (next day) | 15 min | 8 h | 8.00 | 8:00 |
The last three rows cross midnight, and the calculator counts them through to the next day without any extra step. Shift times and breaks are only examples: your contract or employer sets what is paid.
How do I add hours and minutes, and convert them to decimal hours?
To add two durations such as 7 h 45 min and 6 h 30 min, enter each one as a span that starts at 00:00: 00:00 to 07:45 and 00:00 to 06:30. The total is 14 h 15 min, which is 14:15 on a timesheet and 14.25 in decimal hours.
To convert by hand, divide the minutes by 60 and add them to the whole hours: 8 h 30 min is 8 + 30 / 60 = 8.50 hours. The tool rounds to two decimal places, so 8 h 20 min shows as 8.33 and 40 minutes as 0.67. Rounded decimals can differ from the exact figure by a hundredth of an hour, so when payroll needs exact minutes use the Total minutes figure. Nothing you enter leaves your browser.
Use it with
- Date Calculator: add or subtract days from a date.
- Business Days Calculator: working days excluding weekends and holidays.
- Christmas Countdown: live countdown with seasonal page.
Questions
How do I calculate hours between two times?
Subtract the start from the end and write the difference in hours and minutes. From 09:00 to 17:30 it is 8 h 30 min, or 8.50 decimal hours. Enter both times and the tool does it.
How do I calculate an overnight shift?
Enter the real start and end times. When the end is earlier than the start, the tool counts through midnight, so 22:00 to 06:30 is 8 h 30 min.
How do I convert 8 hours 30 minutes to decimal hours?
Divide the minutes by 60 and add: 30 / 60 = 0.5, so 8 h 30 min is 8.50 hours. The tool shows this as Decimal hours.
How do I subtract a lunch break?
Type the break in whole minutes under Break (min). It is taken off that span, so 09:00 to 17:30 with a 30-minute break is 8 h.
How many hours is 9 to 5?
8 h with no break, and 7 h with a 60-minute unpaid break.
What does it show when the start and end time are the same?
Zero. Only times of day are entered, so equal times cannot mean 24 hours. Use two spans for a full day.
How this page was made: the tool's results are computed in your browser by the code on this page; the explanations were drafted with AI help and checked against the tool's own output.