All tools › Everyday Calculators › Date & Time
Find the hours worked between two dates and times, minus breaks, with optional pay.
What the hours calculator does
This hours calculator tells you how many hours you worked between a start date and time and an end date and time. It takes off unpaid breaks, shows the answer both as hours and minutes and as decimal hours, and, if you enter an hourly rate, works out the pay for that shift.
Because the start and the end each have their own date, it handles night shifts that run past midnight and long jobs that stretch over several days. It is useful for checking a single shift against a pay stub, billing a client for one block of work, or logging on-call, travel or volunteer hours.
How to use the hours calculator
- Pick the Start date and type the Start time.
- Pick the End date and type the End time. For a shift that ends after midnight, the end date is the next day.
- In Unpaid breaks in total enter the minutes of all unpaid breaks added together. Enter 0 if breaks are paid or there were none.
- To see pay, type your Hourly pay rate (optional). Leave it empty to see hours only.
How the hours are calculated
The tool finds the full span from start to end, then subtracts the breaks.
span = (days between the two dates x 24 hours) + end time – start time
hours worked = span – unpaid breaks
pay = decimal hours (rounded to 2 places) x hourly rate
- Days between the two dates is 0 for a same-day shift and 1 when the shift ends the next day.
- Decimal hours is the worked time divided by 60 minutes per hour and rounded to two decimal places: 8 hours 15 minutes is 8.25.
- Pay uses that rounded decimal figure, so it can differ by a few cents from pay worked out to the exact minute.
If the end comes before the start, or the breaks are longer than the span, the tool shows a message instead of a result.
Worked example: a night shift
Inputs used: Start date March 15, 2030, Start time 9:30 PM; End date March 16, 2030, End time 6:15 AM; Unpaid breaks in total 30 minutes; Hourly pay rate $18.40.
| Result | Value |
|---|---|
| Hours worked | 8 hours 15 minutes |
| Decimal hours | 8.25 |
| Total minutes | 495 |
| Time span before breaks | 8 h 45 min |
| From | Friday, March 15, 2030, 9:30 PM |
| To | Saturday, March 16, 2030, 6:15 AM |
| Pay at $18.40 an hour | $151.80 |
From 9:30 PM to midnight is 2 hours 30 minutes, and midnight to 6:15 AM is 6 hours 15 minutes: 8 hours 45 minutes in all. Taking off the 30-minute break leaves 8 hours 15 minutes, and 8.25 x $18.40 is $151.80.
If both dates in that example were left as March 15, the end would fall before the start and the tool would ask you to check the dates and times.
Hours and minutes versus decimal hours
The two figures say the same thing in different ways, and mixing them up is the most common timesheet mistake. 8 hours 15 minutes is 8.25 hours, not 8.15.
| Minutes | Decimal hours |
|---|---|
| 6 | 0.10 |
| 15 | 0.25 |
| 30 | 0.50 |
| 45 | 0.75 |
To convert by hand, divide the minutes by 60. Many payroll forms ask for decimal hours; people usually think in hours and minutes.
What the calculator does not cover
- It counts clock time only. It does not adjust for daylight saving changes, so a night shift across a clock change is shown one hour longer or shorter than what was really worked.
- It has no overtime, shift differential, tips, taxes or deductions. The pay figure is gross pay at one flat rate.
- Breaks are one total in minutes. The tool does not know which breaks are paid or unpaid; only enter the unpaid ones.
- It covers one start and one end. For a split shift, run each part and add the results, or use a weekly time card.
Frequently asked questions
How do I enter a shift that crosses midnight?
Set the end date to the day after the start date. The tool then counts straight through midnight.
Can I count hours across several days?
Yes. Set the start and end dates as far apart as you need. From 8:00 PM on one day to 8:00 AM two days later is 36 hours.
What if my break was paid?
Leave it out. Enter 0 in the breaks box, or only the minutes that were unpaid.
Do I have to enter a pay rate?
No. The pay rate is optional. Without it the tool shows hours, decimal hours and total minutes only.
Why is the pay a few cents off my own math?
The tool multiplies the rate by decimal hours rounded to two places. 8 hours 10 minutes is used as 8.17 hours, so at $15.00 an hour it shows $122.55.
Related calculators
- Time Card Calculator – a whole week of shifts with overtime and gross pay.
- Time Duration Calculator – a quick gap between two clock times.
- Time Calculator – add or subtract amounts of time, such as several shifts.
- Percentage Calculator – work out a raise or a deduction as a percent.
