Hours Calculator
Add up hours worked between a start and end time, minus breaks — with overnight shifts and optional pay.
Last reviewed July 1, 2026
Handles overnight shifts (when the end time is earlier than the start).
Totting up a timesheet or working out a shift's length shouldn't need a spreadsheet. This calculator takes a start time, an end time, and any unpaid break, and gives you the hours worked — both in hours-and-minutes and as decimal hours for payroll. Add your hourly rate and it works out the gross pay too.
It correctly handles overnight shifts, where the end time falls earlier in the day than the start.
The Hours formula
Hours worked = (End time − Start time) − Break; Decimal hours = hours + minutes ÷ 60; Pay = Decimal hours × RateStart and End = the clock-in and clock-out times · Break = unpaid break time · Rate = hourly pay. For overnight shifts, add 24 hours when the end time is before the start.
Worked example
A 09:00–17:30 shift is 8 hours 30 minutes; subtract a 30-minute unpaid lunch for 8.0 hours. At $20 an hour that's 8.0 × 20 = $160 gross pay.
Hours and minutes vs. decimal hours
Payroll systems usually want decimal hours, not hours and minutes — so 8 hours 30 minutes becomes 8.5. The conversion is minutes ÷ 60. This calculator shows both, so you can read the shift naturally and still enter the right number for pay.
Remember to subtract unpaid breaks: an 09:00–17:30 shift is 8.5 hours before a break, but 8.0 hours once a 30-minute lunch is deducted.
Frequently asked questions
▶How do I calculate hours worked?
Subtract the start time from the end time, then subtract any unpaid break. This calculator does it automatically, including overnight shifts, and shows decimal hours for payroll.
▶How do I convert minutes to decimal hours?
Divide the minutes by 60. So 45 minutes is 0.75 hours, and 8 hours 15 minutes is 8.25. The calculator shows the decimal figure for you.
▶How does the calculator handle overnight shifts?
If the end time is earlier in the day than the start, it treats the shift as crossing midnight and adds 24 hours, so a 22:00–06:00 shift correctly reads as 8 hours.
▶How do I work out gross pay from hours worked?
Multiply the total hours (in decimal) by your hourly rate. For 8.5 hours at $20 an hour that's 8.5 × 20 = $170. Enter your rate above to see gross pay automatically.
▶Should I subtract my lunch break from hours worked?
Yes, if it's unpaid. Enter the break length and the calculator deducts it, so a 09:00–17:30 shift with a 30-minute lunch counts as 8 hours, not 8.5.
▶How many hours is 9 to 5?
A 09:00–17:00 shift is 8 hours before breaks, or 7.5 hours once a 30-minute unpaid lunch is deducted. The calculator handles both with your own times and break.
Related calculators
Convert an hourly wage into annual, monthly and weekly salary — and back.
Open calculator →Count the exact time between two dates in years, months, days, weeks and hours.
Open calculator →Find your exact age in years, months and days — plus total weeks, days and hours.
Open calculator →Disclaimer: Hours Calculator results are estimates for general information and education only, and are not financial, tax, legal or medical advice. Verify important decisions with a qualified professional.