Work & Pay
Hours Between Times Calculator
How long between two times — including shifts that run past midnight — in hours and minutes, and in the decimal form you multiply by.
Enter a start time and an end time.
Optional. Comes off the total.
Optional. Paid on the decimal hours, which is the correct way.
How this calculator works
Both times are converted to minutes since midnight and subtracted. That handles the ordinary case, and the interesting one is what happens when the end time is earlier than the start.
A shift from 22:00 to 06:00 is eight hours, not minus sixteen. Any calculator that hands you a negative number there has subtracted without asking what the subtraction meant. This treats an earlier end time as the following day — and says so on the result, because that assumption is wrong for someone who typed the times the wrong way round.
The answer is given twice, and the second form is the one that matters. Seven hours and thirty minutes is 7.5 hours, not 7.30. Multiplying 7.30 by an hourly rate underpays by eighteen minutes for every hour worked, and it is the most common payroll arithmetic error there is.
Identical start and end times are refused rather than answered. That could mean no time at all or a full twenty-four hours; both are real, a typo is far more likely, and picking one silently would be wrong half the time.
The formula
Exactly what happens to your numbers, step by step.
The duration
minutes = end − start if end is earlier: minutes = end + 1440 − start1440 is the minutes in a day. This is what turns 22:00 to 06:00 into eight hours.
The two forms
clock = hours and minutes decimal = total minutes ÷ 60Multiply the decimal by an hourly rate. Never the clock form.
A worked example
A night shift from 22:00 to 06:30 with a 30-minute unpaid break, paid $22 an hour.
What you enter
- Start
- 22:00
- End
- 06:30
- Unpaid break
- 30 minutes
- Hourly rate
- $22.00
The working
- End is earlier, so add a day
- 06:30 + 24h = 30:30
- Gross duration
- 30:30 − 22:00 = 8h 30m
- Less the break
- 8h 30m − 30m = 8h 00m
- As a decimal
- 480 ÷ 60 = 8.00 hours
- Pay
- 8.00 × $22.00 = $176.00
8 hours · $176.00
Had the break been 15 minutes the shift would be 8h 15m — which is 8.25 hours, not 8.15. Paying on 8.15 costs you $2.20 for that one shift, and about $570 a year on five shifts a week.
Assumptions
Every result here rests on these. Change your inputs and the result changes with them.
- An end time earlier than the start means the following day.
- The break is unpaid and taken entirely within the shift.
- Times are on a 24-hour clock, with no time zone or daylight-saving change during the shift.
What this cannot tell you
- It cannot know whether your break is actually unpaid. Rules differ by employer and by state, and some short breaks must be paid under federal law.
- Overtime is not applied. This is the length of one shift, not a week — the Overtime and Time Card calculators handle weekly totals and premium rates.
- A shift spanning a daylight-saving change is genuinely 23 or 25 hours long on the clock, and this does not model that. It happens twice a year, on a Sunday morning.
- It assumes one continuous shift. A split shift with a long gap should be entered as two separate calculations.
Questions people ask
How many hours is 9 to 5:30?
Eight and a half hours, or 8.5 in decimal — minus any unpaid break. If you take 30 minutes it is exactly 8 hours. Enter the times above and it does the arithmetic including the break.
How do I calculate an overnight shift?
Add 24 hours to the end time before subtracting. 22:00 to 06:00 becomes 30:00 minus 22:00, which is 8 hours. This does it automatically whenever the end time is earlier than the start, and tells you it made that assumption.
Why is 7 hours 30 minutes not 7.30 hours?
Because minutes are sixtieths, not hundredths. Thirty minutes is half an hour, so it is 7.5. Using 7.30 on a timesheet underpays by 12 minutes of every hour on that shift, and the error compounds across a week.
Should I subtract my lunch break?
If it is unpaid, yes — enter it above and it comes off. Under federal law short breaks of roughly five to twenty minutes are generally paid, while genuine meal breaks of thirty minutes or more usually are not. Your employer or state may be more generous.
What if my start and end times are the same?
This refuses to guess, because it could mean nothing at all or a whole day and both are real. If you genuinely worked twenty-four hours, enter 23:59 as the end time and add a minute.
Related calculators
- Time Card CalculatorAdd up clock-in and clock-out times, subtract breaks, and get weekly hours and gross pay.Work & Pay
- Overtime CalculatorWork out overtime pay at time-and-a-half, double time, or a daily overtime rule.Work & Pay
- Salary CalculatorConvert pay between hourly, weekly, biweekly, monthly and annual.Work & Pay
- Date Difference CalculatorDays between two dates, in days, weeks, months and working days.Everyday
Sources and review
This calculator uses standard arithmetic with no external rules or published rates, so there is nothing to cite beyond the formulas shown above.
Methodology version 1.0.0 · Last reviewed