CalcOpenly
English

Hours calculator: hours between two times and weekly timesheet

Calculate work hours, breaks and weekly timesheets. Use dates and a time zone for overnight shifts across daylight-saving changes and repeated hours.

Drafted with AI writing toolsUpdated Checked examples: 8

One shift assumes the next day when the end is at or before the start. Dates & time zone uses the exact dates you enter.
Minutes, or a form such as 1h 15m.
Try
Hours worked
h
Hours worked: 8 h
Maximum decimal places: 2; Nearest, ties away from zero
Time worked
8 h / 8:00
Crosses midnight
No

From 09:00 to 17:30 minus a 30 min break is 8 hours (8:00).

The shift

8 hworked
Worked8 hBreak30 min
How it's calculated S
  1. Shift length

    17:30−09:00−30 min=8:0017{:}30 - 09{:}00 - 30\ \text{min} = 8{:}00
  2. Decimal hours

    28,800 s3600=8 h\frac{28{,}800\ \text{s}}{3600} = 8\ \text{h}

About the hours calculator

In the formula, h is hours worked, s_i is the elapsed duration of shift i in seconds, and b_i is its unpaid break in seconds.

The start time is subtracted from the end time; when the end is at or before the start, the shift is taken to finish the next day, so 24 hours are added first. The unpaid break is then taken off, and the result is shown in decimal hours (seconds ÷ 3,600) and as hours and minutes. The weekly timesheet adds one shift per line and splits the total into regular hours and overtime above a weekly threshold, 40 hours by default, the US Fair Labor Standards Act figure.

A night shift from 22:00 to 06:15 with a 45-minute break is 7.5 hours. The default week, four days of 09:00 to 17:30 and a Friday finishing at 17:00, each with a 30-minute break, comes to 39.5 hours.

One shift and Weekly timesheet use clock time. Choose Dates & time zone to measure actual elapsed time across midnight, multiple days or a daylight-saving change. A repeated clock time has two possible instants: choose its first or second occurrence. A skipped time is rejected so you can correct the recorded punch.

Calculate hours between two times

Hours worked are the end time minus the start time, less any unpaid break. On the 24-hour clock, 08:30 to 17:15 is 8 hours 45 minutes; less a 30-minute lunch, that is 8 hours 15 minutes, or 8.25 hours on a decimal timesheet.

Clock notation and decimal hours are two ways of writing the same amount: 8:15 is 8.25 hours, and 7:45 is 7.75 hours, not 7.45. Use the decimal figure when multiplying by a pay rate.

Pick the method that matches your record:

  • One shift: an end time at or before the start means the shift finished the next day, so matching times mean a full 24 hours.
  • Weekly timesheet: one shift per line as label, times and break minutes, such as Tue 22:00-06:15 45; times such as 9am-5:30pm also work. Lines are counted by clock time, and the total is split at a weekly overtime threshold, 40 hours unless you change it.
  • Dates & time zone: both dates, both times and one IANA zone such as America/New_York, for shifts longer than a day or across a daylight-saving change.
  • Breaks are unpaid time in minutes or a form such as 1h 15m, and can't be longer than the shift.

For whole calendar dates rather than clock times, use the days between dates calculator.

How to calculate hours worked by hand

  1. Write both times on the 24-hour clock: 5:15 pm is 17:15, and 12:00 am (midnight) is 00:00.
  2. Subtract the minutes. If the end minutes are smaller, borrow an hour: add 60 to the end minutes and take 1 from the end hour.
  3. Subtract the hours.
  4. Take off the unpaid break.
  5. Divide the leftover minutes by 60 to get decimal hours.

For a shift from 08:40 to 17:15 with a 45-minute unpaid lunch, 15 − 40 is negative, so borrow an hour: 75 − 40 = 35 minutes, then 16 − 8 = 8 hours. The shift spans 8 hours 35 minutes, and less the break it is 7 hours 50 minutes.

As a decimal, 50 ÷ 60 = 0.8333, so the time worked is 7.83 hours. This last step is where pay goes wrong: at $18.50 an hour, 7.8333 hours earns $144.92, while reading 7:50 as 7.50 hours pays $138.75, $6.17 short for one day.

Shifts that cross midnight

When the end time is earlier than the start, the shift finished the next day, so add 24 hours to the end time before subtracting. From 21:30 to 05:45 with a 30-minute break is (05:45 + 24:00) − 21:30 = 8 hours 15 minutes, less 30 minutes: 7 hours 45 minutes, or 7.75 hours.

Clock readings alone repeat every 24 hours, so 09:00 to 10:00 could mean 1 hour or 25. For a shift longer than a day, work from both dates.

Hours worked across daylight-saving changes

When a shift crosses a clock change, the hours worked differ from the clock difference by the size of the change.

Work from the local date and time of each punch and the IANA name of the zone where they were recorded, such as America/New_York or Europe/London. A fixed abbreviation such as EST keeps one offset all year, while the city's clock changes.

Convert each punch to UTC and subtract the two instants. If the punches were made in different zones, convert both to UTC with the time zone converter first.

In New York in 2026, two overnight shifts that both read 23:00 to 07:30, with a 30-minute unpaid break, come out differently:

Local datesClock differenceActual elapsed timeWorked time after break
7–8 March 20268 hours 30 minutes7 hours 30 minutes7 hours
31 October–1 November 20268 hours 30 minutes9 hours 30 minutes9 hours

These results match the US Department of Labor's daylight-saving shift example. Not every change is an hour: Lord Howe Island in Australia moves its clocks 30 minutes, so 00:00 to 04:00 there on 4 October 2026 is 3.5 hours.

A break is elapsed time too. If a break itself spans the clock change, subtract the time it actually lasted.

Repeated and skipped clock times

When clocks go back, one clock time happens twice. In New York on 1 November 2026, the first 01:30 is 05:30 UTC and the second is 06:30 UTC, so a shift from the first 01:30 to the second is one hour, though both punches read 01:30.

When clocks go forward, some times never happen: New York skips from 02:00 to 03:00 on 8 March 2026, so a punch recorded at 02:30 that day is an error to check against the original record, not a time to guess.

TC39's time-zone documentation explains the difference between exact instants and ambiguous local readings.

Clock-change rules come from the time-zone database in your browser. Governments can change future rules, so an older browser may hold older data, and leap seconds are not counted.

Minutes to decimal hours

Payroll systems and many timesheets want hours as a decimal. Each minute is 1/60 of an hour, so divide the minutes by 60. The table rounds to two decimal places, the usual precision on a timesheet.

MinutesHoursMinutesHoursMinutesHours
10.02210.35410.68
20.03220.37420.70
30.05230.38430.72
40.07240.40440.73
50.08250.42450.75
60.10260.43460.77
70.12270.45470.78
80.13280.47480.80
90.15290.48490.82
100.17300.50500.83
110.18310.52510.85
120.20320.53520.87
130.22330.55530.88
140.23340.57540.90
150.25350.58550.92
160.27360.60560.93
170.28370.62570.95
180.30380.63580.97
190.32390.65590.98
200.33400.67601.00

Only multiples of 3 minutes come out exact at two decimals. The rest are rounded, and the rounding adds up: 7.83 hours at $18.50 is $144.86, six cents less than pay for the exact 7 hours 50 minutes.

Add up the minutes for the whole week and convert the total, not each day. To go the other way, multiply the decimal part by 60: 0.4 hours is 24 minutes.

Breaks and clock rounding

Count only unpaid time as the break. If a shift has a 30-minute lunch and two paid 10-minute rest breaks, the break is 30 minutes; for a split lunch, add the pieces together.

Meal-break rules vary by state: California Labor Code §512 generally requires a meal period of at least 30 minutes for a work period of more than 5 hours a day, which employer and employee can waive by mutual consent when the day is no more than 6 hours. The section also sets exceptions and second-meal rules.

Many time clocks round punches to the nearest 5 minutes, tenth of an hour (6 minutes) or quarter-hour. The US Department of Labor accepts that under 29 CFR 785.48(b) only if it averages out so that, over time, employees are paid for all the time they actually work.

To match a payslip, round the punches the way your employer's policy does before subtracting.

Overtime under the FLSA

The US Fair Labor Standards Act requires employers to pay covered, non-exempt employees at least 1.5 times the regular rate for hours over 40 in a workweek (29 CFR 778.107; Fact Sheet #23). Two rules decide which hours count:

  • The workweek is a fixed, regularly recurring period of 168 hours, seven consecutive 24-hour periods. It can start on any day and at any hour, so it need not run Monday to Sunday (29 CFR 778.105).
  • Each workweek stands alone. Hours can't be averaged over two or more weeks, so 30 hours one week and 50 the next means 10 overtime hours, even though the fortnight averages 40 (29 CFR 778.104).

Five days of 08:00 to 17:30 with a 30-minute unpaid lunch make 9 hours a day and 45 hours a week: 40 regular hours and 5 overtime hours. At $22 an hour, pay is 40 × $22 = $880 plus 5 × $33 = $165, a total of $1,045.

The FLSA counts only weekly hours, but some states also set daily overtime. Under California Labor Code §510, work over 8 hours in a workday is paid at 1.5 times the regular rate and work over 12 hours at double, alongside the weekly 40-hour rule.

Four days of 07:00 to 17:30 with a 30-minute lunch total 40 hours, so a weekly threshold finds no overtime. Under California's daily rule, 2 hours of each 10-hour day are overtime, and at $22 an hour the week pays 32 × $22 + 8 × $33 = $968 instead of $880.

California's exceptions include certain alternative workweeks and collective agreements covered by §§511, 514 and 554. The timesheet split applies only a weekly threshold, so work out daily overtime line by line.

Adding shifts and converting pay

To add durations you have already measured, such as shifts worked out with dates across a clock change, use the time calculator. To turn an hourly rate into weekly or yearly pay, use the salary to hourly calculator.

Worked examples

Day shift with a half-hour break

Calculate
One shift
Start time
09:00
End time
17:30
Unpaid break
30 min
Hours worked
8 h
Time worked
8:00
Crosses midnight
No

Checked against: 8.5 h − 0.5 h = 8 h by hand

Overnight shift

Calculate
One shift
Start time
22:00
End time
06:15
Unpaid break
45 min
Hours worked
7.5 h
Time worked
7 h 30 min
Crosses midnight
Yes

Checked against: 22:00 → 06:15 next day = 8 h 15 min; minus 45 min = 7 h 30 min = 27000 s, by hand

Default week

Calculate
Weekly timesheet
Shifts, one per line
Mon 09:00-17:30 30 Tue 09:00-17:30 30 Wed 09:00-17:30 30 Thu 09:00-17:30 30 F…
Overtime after
40 hours a week
Hours worked
39.5 h
Regular hours
39.5 h
Overtime hours
0 h

Checked against: 4 × (8.5 − 0.5) + (8 − 0.5) = 39.5 h by hand

Week with a night shift and overtime

Calculate
Weekly timesheet
Shifts, one per line
Mon 07:00-19:00 60 Tue 22:00-08:00 30 Wed 08:00-18:00 45 Thu 08:00-18:00 45 F…
Overtime after
40 hours a week
Hours worked
43 h
Regular hours
40 h
Overtime hours
3 h

Checked against: 11 + 9.5 + 9.25 + 9.25 + 4 = 43 h; 43 − 40 = 3 h overtime, by hand

Questions

How do I calculate hours worked between two times?

Subtract the start time from the end time, take off any unpaid break, then turn the minutes into a fraction of an hour. 09:00 to 17:30 is 8 hours 30 minutes; less a 30-minute break it is 8 hours. 08:45 to 17:15 less 45 minutes is 7 hours 45 minutes, which is 7.75 hours on a timesheet that asks for decimals.

How do I calculate hours for a shift that goes past midnight?

Add 24 hours to the end time before subtracting. From 22:00 to 06:15 the next day is (06:15 + 24:00) − 22:00 = 8 hours 15 minutes; with a 45-minute break that is 7 hours 30 minutes, or 7.5 hours. Enter the end time as it appears on the clock and the calculator adds the day itself.

How many hours do I work when daylight saving time changes?

Choose Dates & time zone and enter both dates and the zone where the punches were recorded. In New York, 23:00 on 7 March 2026 to 07:30 on 8 March, less a 30-minute break, is 7 worked hours. The equivalent shift on 31 October to 1 November is 9 hours. The calculator compares the actual instants and shows the clock-change adjustment; it does not assume every change is one hour.

What if 1:30 am happens twice, or a time does not exist?

For a repeated time, select First occurrence or Second occurrence separately for the start and end. On 1 November 2026 in New York, the first 01:30 to the second 01:30 is one elapsed hour. A time skipped by a forward change, such as 02:30 on 8 March 2026 in New York, is an input error; check the original record rather than inventing a time.

When do overtime hours start?

Under the US Fair Labor Standards Act, covered, non-exempt employees earn at least 1.5 times their regular rate for hours over 40 in a workweek, so a 43-hour week has 3 overtime hours. In the UK there is no automatic statutory overtime premium, though a contract may provide one and average pay must not fall below the National Minimum Wage. For adult workers the general limit is an average of 48 hours a week, normally over 17 weeks, with exceptions and possible voluntary opt-outs.

Do breaks count as hours worked?

Short rest breaks usually do and meal breaks usually don't. US rules (29 CFR 785.18 and 785.19) count breaks of 5 to about 20 minutes as paid work time, while a meal period of ordinarily 30 minutes or more is unpaid if the employee is completely relieved from duty. In the UK adult workers are usually entitled to an uninterrupted 20-minute break when working more than 6 hours a day; exceptions apply and payment depends on the employment contract.

About this calculator

h=∑isi−bi3600h = \sum_i \frac{s_i-b_i}{3600}

Sources

  1. US Department of Labor — Fact Sheet #22: Hours Worked Under the FLSA
  2. US Department of Labor — Fact Sheet #23: Overtime Pay Requirements of the FLSA (over 40 hours a week)
  3. US Department of Labor — daylight-saving shift examples
  4. IANA Time Zone Database
  5. TC39 Temporal — time zones and resolving ambiguity

Checked against references

This calculator includes 8 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.