Hours Calculator (Time Duration + Pay)
Duration between two times as hours, minutes, and decimal. Overnight shifts, breaks, and pay.
- Runs in your browser
- No sign-up
- No watermark
- No installs
What this tool does
Works out how long it is between a start time and an end time, then shows that duration three ways: as hours and minutes, as decimal hours (8 hours 30 minutes is 8.5), and, if you enter a rate, as gross pay. If the end time is earlier than the start time it assumes the shift ran past midnight and adds 24 hours. You can subtract an unpaid break in minutes. Everything runs in your browser; open DevTools and watch the Network tab to confirm zero requests.
How to use it
Set the start and end times using the 24-hour time pickers. The result updates live as you type. Add an unpaid break in minutes to remove lunch or rest time from the total, and enter an hourly rate to see gross pay for the shift. Example: 09:00 to 17:30 with no break is 8 hours 30 minutes, or 8.5 decimal hours. A 22:00 to 06:00 overnight shift is 8 hours.
Common use cases
- Adding up a work shift or timesheet entry to the minute.
- Converting hours and minutes into the decimal hours that payroll and invoicing systems expect.
- Checking billable time for freelance or contract work, then multiplying by your rate.
- Measuring an overnight shift that clocks out the next morning.
- Subtracting an unpaid lunch break to get paid hours.
Common pitfalls
- Decimal hours are not the same as HH:MM. 8.5 hours means 8 hours 30 minutes, not 8 hours 50 minutes. Divide minutes by 60 to convert: 15 minutes is 0.25, 20 minutes is 0.33.
- Overnight shifts. If your end time is earlier than your start time the tool assumes you crossed midnight and adds 24 hours. A shift that is genuinely zero-length, or longer than 24 hours, needs a different approach.
- Breaks and overtime. This tool subtracts a single unpaid break and gives a flat gross figure. It does not apply overtime multipliers, daily or weekly overtime thresholds, or tax. Split those into separate blocks and add them up.
Frequently asked questions
- How do I calculate hours between two times?
- Enter a start time and an end time. The tool subtracts the start from the end and shows the result as hours and minutes and as decimal hours. If the end time is earlier than the start, it assumes the shift crossed midnight and adds 24 hours. You can also subtract an unpaid break and multiply by an hourly rate to see gross pay.
- What are decimal hours and why do payroll systems use them?
- Decimal hours express minutes as a fraction of an hour, so 8 hours 30 minutes becomes 8.5 and 8 hours 15 minutes becomes 8.25. Payroll and invoicing systems multiply decimal hours by a rate directly, which avoids the errors that come from treating 8.30 as eight hours and thirty hundredths. To convert, divide the minutes by 60: 30 divided by 60 is 0.5.
- How does the tool handle a shift that crosses midnight?
- When the end time is earlier than the start time, the tool assumes you clocked out on the following day and adds 24 hours before subtracting. So 22:00 to 06:00 is treated as 8 hours, not a negative number. A note appears above the result whenever this overnight assumption is applied.
- Does it subtract lunch or other unpaid breaks?
- Yes. Enter the total unpaid break in minutes and the tool removes that time from the worked total before computing decimal hours and pay. A 9 hour span with a 60 minute lunch counts as 8 paid hours. If the break is longer than the shift, the tool clamps the worked time to zero and shows a warning.
- Can it calculate gross pay for the shift?
- Enter an hourly rate and the tool multiplies it by the decimal hours worked to show gross pay in the same currency as the rate you typed. This is a simple gross figure before taxes, overtime multipliers, or deductions. For overtime past 40 hours in a week or daily overtime rules, calculate each block separately.
- Is my data sent anywhere?
- No. Every calculation happens in your browser using plain JavaScript. Nothing you type is uploaded, logged, or shared. You can open the DevTools Network tab and confirm that using the tool triggers zero requests.
Cite this tool
For academic, journalistic, or technical references. Pick a format:
Citations use 2026 as the publication year. Access date is left as a fillable placeholder where the citation style expects one.