GameParticles
Date & time

How to Calculate Hours Worked: Formula and Decimal Chart

How to calculate hours worked from start and end times: subtract unpaid breaks, handle overnight shifts and convert timesheet minutes to decimal hours.

Updated

To calculate hours worked, subtract the start time from the end time, then subtract any unpaid breaks. Convert the leftover minutes to a decimal by dividing by 60, so 8 hours 30 minutes becomes 8.5 hours. Multiply the decimal hours by the hourly rate to get pay.

The four steps

  1. Write both times on a 24-hour clock. Add 12 to any pm hour except 12: 5:15 pm becomes 17:15. 12:00 am is 00:00 and 12:00 pm is 12:00.
  2. Subtract start from end. If the end minutes are smaller than the start minutes, borrow 60 minutes from the hours.
  3. Subtract unpaid break time.
  4. Convert minutes to a decimal: minutes / 60.

Worked example: clock in 8:45 am, clock out 5:15 pm, 30 minute unpaid lunch.

  • 17:15 - 8:45: 15 is less than 45, so borrow an hour. 16:75 - 8:45 = 8:30.
  • Minus the break: 8:30 - 0:30 = 8:00.
  • Paid time is 8.0 hours.

A shortcut that avoids borrowing is to convert everything to minutes first. 17:15 is 17 x 60 + 15 = 1035 minutes and 8:45 is 525. 1035 - 525 - 30 = 480 minutes, and 480 / 60 = 8 hours.

Minutes to decimal hours chart

Payroll multiplies hours by a rate, and that only works with decimal hours. The most common timesheet error is writing 7 hours 45 minutes as 7.45. It is 7.75.

MinutesDecimal hoursMinutesDecimal hours
10.02310.52
30.05330.55
50.08350.58
60.10360.60
90.15390.65
100.17400.67
120.20420.70
150.25450.75
180.30480.80
200.33500.83
240.40540.90
250.42550.92
270.45570.95
300.50601.00

To go the other way, multiply the decimal part by 60: 0.4 hours is 0.4 x 60 = 24 minutes.

Lunch and other breaks

Only unpaid breaks come off the total. Which breaks are paid depends on your country, your state and your contract. Under US federal rules, short rest breaks of about 5 to 20 minutes count as paid working time, while a genuine meal period, usually 30 minutes or longer with no duties, does not have to be paid. Many states and most other countries have their own rules, so check the one that applies to you.

If a day has several unpaid breaks, add them up and subtract once:

  • On site: 7:00 to 16:00 = 9 hours.
  • Unpaid: 30 minute lunch + 15 minute break = 45 minutes.
  • Paid: 9:00 - 0:45 = 8:15, which is 8.25 hours.

Overnight shifts

When a shift crosses midnight, the end time is a smaller number than the start, and plain subtraction gives a negative result. Two fixes:

  • Add 24 hours to the end. For 22:00 to 06:30: 30:30 - 22:00 = 8:30.
  • Split at midnight. 24:00 - 22:00 = 2:00 before midnight, plus 6:30 after, gives 8:30.

Either way the answer is 8.5 hours before breaks. For payroll, also note which day or week the hours belong to. Employers define a fixed workweek, and a shift that spans the boundary may be split between two weeks.

One edge case: on the night clocks change for daylight saving time, an overnight shift is really one hour shorter or longer than the clock times suggest. Daylight saving time explained covers when that happens.

Weekly totals, rounding and overtime

Add the daily figures in decimal form, or add hours and minutes separately and carry every 60 minutes into the hours.

DayInOutUnpaid breakHours
Mon8:4517:150:308.00
Tue8:5017:350:308.25
Wed9:0018:000:308.50
Thu8:4517:450:308.50
Fri8:3016:450:307.75
Total41.00

At a rate of 22 an hour, 41 hours of straight time is 41 x 22 = 902.

In the US, the Fair Labor Standards Act requires overtime pay of at least 1.5 times the regular rate for hours over 40 in a workweek for employees it covers. In the example that is 40 hours at 22 plus 1 hour at 33, which is 913. Other countries and some US states use different thresholds, including daily ones.

Many employers round clock times before calculating. US rules permit rounding to the nearest 5 minutes, tenth of an hour (6 minutes) or quarter hour, as long as it does not consistently favour the employer over time. With quarter-hour rounding, 1 to 7 minutes past rounds down and 8 to 14 rounds up, which is often called the 7-minute rule. So a punch at 8:07 counts as 8:00 and 8:08 counts as 8:15.

The Percentage Calculator is useful for the pay side, such as working out what share of the week was overtime.

In a spreadsheet

Spreadsheets store a time as a fraction of a day, so multiply a difference by 24 to get hours:

  • Same-day shift: =(B2-A2)*24
  • Shift that may cross midnight: =MOD(B2-A2,1)*24
  • With an unpaid break in minutes in C2: =MOD(B2-A2,1)*24-C2/60

Format the result cell as a number, not a time, or 8.5 will display as something like 12:00.

Using the Duration Calculator for a shift

The Duration Calculator takes a start date and time and an end date and time, so it handles overnight shifts without any trick: enter the next day's date for the clock-out. It shows the gap as hours and minutes, and as a total in minutes.

It does not subtract breaks or output decimal hours, so finish the last two steps yourself: take Total Minutes, subtract your unpaid break minutes, and divide by 60. A 22:00 to 06:30 shift shows 510 total minutes. Minus a 30 minute break is 480, and 480 / 60 = 8.0 hours.

If you would sooner time the work as it happens than reconstruct it afterwards, the Stopwatch records elapsed time with laps, which suits task-based billing.

Try it

Enter yesterday at 22:00 and today at 06:30 in the Duration Calculator. You should see 8 hours 30 minutes and 510 total minutes. Subtract your break and divide by 60 for the decimal figure your timesheet needs.

Tools in this guide

Frequently asked questions

How do I convert minutes to decimal hours?

Divide the minutes by 60. 15 minutes is 0.25 hours, 30 minutes is 0.5, 45 minutes is 0.75 and 20 minutes is 0.33. So 7 hours 45 minutes is 7.75 hours, not 7.45.

How do I calculate hours worked with a lunch break?

Subtract the start time from the end time, then subtract the unpaid break. A shift from 9:00 to 17:30 is 8 hours 30 minutes on site. With a 30 minute unpaid lunch, the paid time is 8 hours.

How do I calculate hours for an overnight shift?

Add 24 hours to the end time before subtracting, or count to midnight and from midnight separately. A shift from 22:00 to 06:00 is 2 hours before midnight plus 6 hours after, which is 8 hours.

How many hours is 8am to 5pm?

8:00 am to 5:00 pm is 9 hours. With a one hour unpaid lunch it is 8 paid hours, and with a 30 minute lunch it is 8.5. Five such days with a one hour lunch make a 40 hour week.

More date & time guides

JSON Formatter
Developer · Format, validate and minify JSON with syntax highlighting.
↵
Base64 Encode / Decode
Developer · Encode text to Base64 or decode Base64 back to plain text.
↵
URL Encoder / Decoder
Developer · Encode or decode URL components and query strings.
↵
Hash Generator
Developer · Generate MD5, SHA-1, SHA-256 and SHA-512 hashes.
↵
UUID Generator
Developer · Generate UUIDs v4 (random) in bulk with one click.
↵
Regex Tester
Developer · Test regular expressions against text with live match highlighting.
↵
Word Counter
Text · Count words, characters, sentences, paragraphs and reading time.
↵
Case Converter
Text · Convert text between UPPER, lower, Title, camelCase, snake_case and more.
↵
List Sorter
Text · Sort, reverse, deduplicate and shuffle lists of text.
↵
Markdown Preview
Text · Write Markdown and see a live rendered preview side by side.
↵
Percentage Calculator
Numbers · Calculate percentages, increases, decreases and what % one number is of another.
↵
Color Converter
Colors · Convert colors between HEX, RGB, HSL and HSV instantly.
↵
Snake
Arcade · Eat food, grow longer, don't hit the walls. A timeless classic.
↵
2048
Puzzle · Slide tiles and combine them to reach the legendary 2048 tile.
↵
Word Grid
Puzzle · Guess the hidden five letter word in six tries using color clues.
↵
Sudoku
Puzzle · Fill the 9x9 grid with logic. Four difficulties from easy to expert.
↵
Minesweeper
Strategy · Use number clues to clear the minefield. Classic logic, three levels.
↵
Breakout
Arcade · Smash every brick with paddle and ball. Power-ups, combos, endless levels.
↵
Typing Practice
Casual · Build your WPM and accuracy with timed drills from 30 seconds to 5 minutes. Find your weak keys.
↵
TypeRunner
Arcade · Multiplayer typing race. Race friends by link, beat computer runners, or chase your own ghost.
↵
Typing Blocks
Arcade · Type each word before its wooden block lands. Miss, and the pile climbs toward the line.
↵
Bubble Shooter
Arcade · Aim, bank shots off the walls, and pop groups of three or more bubbles.
↵
Road Rush
Arcade · Race seven rivals through traffic and punch your way to the front.
↵