Date & Time
Hours Calculator (Time Between Two Times)
Work out the hours and minutes between two times — overnight shifts, unpaid breaks and decimal hours for timesheets included.
How to use
- 1Enter the start and end time (24-hour or with AM/PM).
- 2Add any unpaid break; the total is shown in hours and minutes and as decimal hours.
How it's calculated
Duration = end − start − break. If the end is earlier than the start, the shift is treated as ending the next day.
Frequently asked questions
How do I convert minutes to decimal hours?
Divide by 60: 7 hours 45 minutes = 7 + 45/60 = 7.75 hours. Payroll usually needs this decimal form.
What about a night shift from 10 PM to 6 AM?
Enter 22:00 and 06:00 — when the end is earlier than the start, it's counted as the next day, giving 8 hours.
Can I add up several durations?
Use the Time Duration Calculator for adding and subtracting lists of durations like 1:30 + 2:45.
How it knows a shift crosses midnight
The calculator simply checks whether the end time is earlier than the start time on the clock — if so, it assumes the shift ran into the next day and adds 24 hours to the end time before subtracting. That single rule is what turns an entry like 10:00 PM to 6:00 AM into a correct 8-hour overnight shift instead of a negative, nonsensical duration.
Worked example: Hours Calculator
9:00 AM to 5:30 PM with a 30-minute unpaid break comes out to exactly 8h 00m (8.00 decimal hours) — a standard full day. 10:00 PM to 6:15 AM with no break gives 8h 15m (8.25 decimal hours), correctly spanning midnight. For payroll, 8:45 AM to 5:00 PM with a 45-minute break and a $20/hour rate works out to 450 minutes (7.5 hours) worked, for $150 in pay — the decimal-hours conversion (450 ÷ 60 = 7.5) is exactly the step that trips people up doing it by hand, since 45 minutes isn't 0.45 of an hour.
When to reach for the duration calculator instead
This tool compares exactly two clock times for one shift. If you need to add up several separate entries — a week of daily totals, or multiple breaks logged throughout a day — the Time Duration Calculator handles a whole list of durations at once, including negative lines for subtracting breaks.
Why a break longer than the shift is rejected outright
If the unpaid break you enter exceeds the actual time between the start and end (after the overnight adjustment, if any), the calculator refuses to produce a negative worked-time figure and shows an error instead of quietly returning something like '-0h 30m'. That's a deliberate guard rather than an oversight: a negative number of hours worked has no sensible real-world meaning here, so rejecting the input forces a second look at whichever field was actually mistyped — usually the break length — rather than letting a nonsensical result flow through to a pay calculation.
Pay appears only after you type a rate
The hourly-rate box starts empty, and while it is empty there is no pay line at all, not a pay line of zero. Type a rate and pay is the decimal hours times that rate. A blank break is treated as zero minutes rather than an error, which is different from a break that is longer than the shift, which is rejected. When the end time is earlier than the start, the main label changes from Hours worked to Hours worked (overnight), so you can see that the shift was treated as crossing midnight without redoing the subtraction. Times can be typed as 24-hour values or with am and pm, so 8:45 am and 08:45 are the same start. Decimal hours are shown to two places, and total minutes are a whole number.
Related tools
- Date Difference Calculator (Days Between Dates)
Count the days, weeks, months and years between two dates, including or excluding the end date, and the number of business days.
- Military Time & Decimal Hours Converter
Convert between 12-hour and 24-hour (military) time, and between hours:minutes and decimal hours for timesheets (1:45 = 1.75).
- Time Duration Calculator (Add & Subtract Time)
Add or subtract lists of hours and minutes — like 1:30 + 2:45 − 0:20 — and get the total in h:mm, decimal hours and days.
- Shift Schedule / Rota Maker
Generate a rotating shift schedule for your teams — 2-2-3 Panama, DuPont, 4-on-4-off, 24/48 and more — with coverage and hours per week.
- Weekly Timesheet Calculator
Add up a week of start and end times with breaks, get total hours in hours:minutes and decimal, and calculate pay with overtime over 40 hours.
- Driving Distance & Time Calculator (with Fuel Cost)
Find the driving distance and travel time between two places anywhere in the world, plus the fuel cost for your car's mpg or L/100 km — using OpenStreetMap road data.