productivity.cihat.dev

Time duration calculator

How long from one time to another, minus breaks, in hours and minutes and in decimal hours.

How to use it

  1. Type a start time and an end time. An end earlier than the start is read as the next day.
  2. Add any unpaid break in minutes; it is taken off that day.
  3. Add more days for a week, and an hourly rate if you want the pay worked out.

How the calculation works

Each time is turned into minutes after midnight: 08:45 is 525 and 17:15 is 1,035. The end minus the start gives 510 minutes. If the result is negative, the shift crossed midnight, so 1,440 minutes (24 hours) are added. The break comes off next: 510 − 30 = 480 minutes. Divided by 60, that is 8 hours exactly, or 8.00 in decimal hours.

StartEndBreakWorkedDecimal
08:4517:1530 min8 h 00 min8.00
09:0017:3060 min7 h 30 min7.50
07:5016:2045 min7 h 45 min7.75
13:1018:3505 h 25 min5.42
22:0006:0030 min7 h 30 min7.50

Hours and minutes or decimal hours

Timesheets and payroll often want decimal hours: 7 hours 45 minutes is 7.75 hours, because 45 minutes is three quarters of an hour. Divide the minutes by 60 to convert. The calculator shows both, so you can copy whichever your form asks for.

MinutesDecimal hours
150.25
200.33
300.5
400.67
450.75
500.83

Night shifts and daylight saving

An end time earlier than the start time means the shift ran past midnight: 22:00 to 06:00 is eight hours. The calculator works with clock times only, so on the one night a year when clocks go back or forward, a shift that crosses the change is an hour longer or shorter than shown.

A week on one time card

Five days of 08:45 to 17:15 with a 30-minute lunch give 8 hours a day and 40 hours, or 40.00, for the week. At an example rate of 20 an hour, the pay line shows 800. Change one day to 08:45 to 18:00 and that day becomes 8 h 45 min, so the week becomes 40 h 45 min, or 40.75: the extra three quarters of an hour show up as .75, not .45, which is the usual mistake when hours and minutes are typed into a decimal form.

Which breaks to take off (United States)

Under the US federal rules for hours worked, short rest breaks of about 5 to 20 minutes are common, are usually paid, and must be counted as hours worked (29 CFR 785.18). A bona fide meal period is not work time, as long as the employee is fully relieved from duty; 30 minutes or more is ordinarily long enough (29 CFR 785.19). So enter the unpaid meal break in the break field and leave coffee breaks in.

Many time clocks round start and stop times to the nearest 5 minutes, tenth of an hour or quarter hour. The same regulation accepts that only when it averages out so employees are paid for all the time they actually work (29 CFR 785.48). This calculator does not round: it counts to the minute.

The same sum in Excel or Google Sheets

Spreadsheets store a time as a fraction of a day, so a difference times 24 gives hours. With the start in A2 and the end in B2, =(B2-A2)*24 returns decimal hours, as in Microsoft’s own example (Microsoft Support: calculate the difference between two times). For a shift past midnight, =MOD(B2-A2,1)*24 keeps the result positive, because MOD returns a result with the same sign as the divisor (Microsoft Support: MOD). To take off a break in minutes from C2, add -C2/60.

To add up hours and minutes you already have, such as 7:45 + 8:20, use the hours calculator. For nights of sleep, the sleep duration calculator does the same sum with bedtimes. And to plan the hours before you count them, TaskCard turns each task’s start time and duration into a block on a 24-hour grid, and the weekly timetable maker prints a week.

Sources

Rules and formulas on this page:

Questions people ask

How do I calculate the time between two times?

Subtract the start from the end. If the end is earlier than the start, add 24 hours. Then take off any break. The calculator does it and shows hours and minutes and decimal hours.

How do I convert minutes to decimal hours?

Divide by 60. 45 minutes is 0.75 hours, 20 minutes is 0.33 hours, so 8 hours 20 minutes is 8.33 hours.

How many hours is 9 to 5?

Eight hours. With a 30-minute unpaid lunch it is 7 hours 30 minutes, or 7.50 decimal hours.

Do breaks count as hours worked?

Under US federal rules, short rest breaks of about 5 to 20 minutes count as hours worked; a meal break of usually 30 minutes or more, free of all duties, does not. Your state or contract may add rules.

What is the Excel formula for hours between two times?

=(B2-A2)*24 gives decimal hours. If the shift can pass midnight, use =MOD(B2-A2,1)*24.

Can I use it as a weekly time card?

Yes. Add a line per day; the total and the decimal total cover the whole week. The days are kept on this device.

How is pay worked out?

Decimal hours times the hourly rate you type. It does not apply overtime rules, tax or deductions.