Hours Calculator OnlineEvery minute, where it actually went.

How to calculate hours worked

Guide · last reviewed 1 November 2026 · Hours Calculator Online

Skip the arithmetic: the Hours Calculator does the how to calculate hours worked sums on this page for you, with the same tested formulas used in the worked examples below.

In short

Convert the start and end time to minutes since midnight, subtract the start from the end, take off any unpaid break, then divide the leftover minutes by 60 to get decimal hours for payroll. A shift from 8:45 AM to 5:15 PM with a 30-minute lunch is 1035 − 525 = 510 minutes, minus 30 = 480 minutes, which is 8.00 hours. The only two places people go wrong are the AM/PM flip at noon and treating 7:30 as 7.30 instead of 7.5.

The one method that always works

Clock arithmetic feels harder than it is because the numbers wrap around twice a day. The fix is to stop thinking in clock faces and start thinking in minutes since midnight. Midnight is 0. Noon is 720. 11:59 PM is 1439. Every time on a time card is a single number on that scale, and subtraction on a single scale never surprises you.

Four steps, every time:

  1. Put both times on a 24-hour clock. Anything PM except 12 PM gets 12 added to the hour: 5:15 PM becomes 17:15. 12:30 AM becomes 00:30; 12:30 PM stays 12:30.
  2. Turn each into minutes since midnight: hours × 60 + minutes. So 17:15 → 17 × 60 + 15 = 1035.
  3. Subtract, then deduct the unpaid break. End minus start gives the time on the clock; the break is a flat subtraction in minutes.
  4. Convert to decimal hours by dividing by 60, and round to two decimals only at the very end.

Why minutes and not hours-and-minutes? Because borrowing across a base-60 boundary is where mistakes breed. 17:15 − 8:45 tempts you to write −30 minutes in the minute column. Converting to 1035 and 525 first removes the temptation entirely. The time card calculator works exactly this way internally — every value is parsed into whole minutes and all arithmetic is integer minute arithmetic, so there is no floating-point drift.

Worked day one: a standard office shift

In 8:45 AM, out 5:15 PM, unpaid lunch 30 minutes.

08:45 → 8 × 60 + 45 = 525

17:15 → 17 × 60 + 15 = 1035

1035 − 525 = 510 minutes on the clock

510 − 30 break = 480 paid minutes

480 ÷ 60 = 8.00 decimal hours

Eight hours flat. Notice that the clock span was 8 h 30 min — the figure your badge reader would show — and the paid figure is 8 h 00 min. Those two numbers answer different questions, and confusing them is the most common payroll dispute there is.

Worked day two: awkward minutes and two breaks

In 6:52 AM, out 3:41 PM, a 20-minute unpaid meal plus a second 15-minute unpaid break.

06:52 → 412    15:41 → 941

941 − 412 = 529 minutes

529 − 20 − 15 = 494 paid minutes

494 ÷ 60 = 8.2333… → 8.23 decimal hours

494 minutes is 8 h 14 min. In decimal that is 8.2333 recurring, and payroll will show 8.23. Multiple breaks just add together before you subtract; there is no rule that says you must handle them one at a time. Whether a short rest break like that 15 minutes should have been unpaid in the first place is a separate question — see lunch breaks: paid or unpaid? for how the two kinds of break are usually treated differently.

Worked day three: the shift that crosses midnight

In 9:30 PM Tuesday, out 6:00 AM Wednesday, unpaid meal 45 minutes.

21:30 → 1290    06:00 → 360

360 is smaller than 1290, so add a day: 360 + 1440 = 1800

1800 − 1290 = 510 minutes

510 − 45 = 465 paid minutes → 465 ÷ 60 = 7.75 hours

The rule is mechanical: if the out time is numerically earlier than the in time, add 1440 minutes (one full day) to the out time before subtracting. That is precisely what the calculators on this site do, so an overnight shift needs no special handling from you. The longer treatment, including which calendar day the hours belong to, is in calculating hours across midnight.

Doing it in a spreadsheet

Spreadsheets store a time as a fraction of one day. 6:00 AM is 0.25. Noon is 0.5. 6:00 PM is 0.75. Understand that single fact and every formula below stops being magic.

Put the start time in A2 and the end time in B2, both typed as real times (8:45 AM or 8:45, not text). Then:

Spreadsheet formulas for a single day, start in A2, end in B2, break minutes in C2
GoalFormulaFormat the cell as
Clock span as h:mm=B2-A2[h]:mm
Clock span in decimal hours=(B2-A2)*24Number, 2 decimals
Paid hours after the break=(B2-A2)*24-C2/60Number, 2 decimals
Paid hours, overnight-safe=MOD(B2-A2,1)*24-C2/60Number, 2 decimals
Week total in decimal=SUM(D2:D8)Number, 2 decimals
Week total as h:mm=SUM(D2:D8)/24[h]:mm

Why the square brackets in [h]:mm matter

A plain h:mm format wraps at 24 hours, so a 41-hour week displays as 17:00 and you quietly lose a day and a half of pay. The bracketed [h]:mm tells the spreadsheet to let the hour count run past 24. If a weekly total ever looks implausibly small, check the number format before you check your arithmetic — nine times out of ten that is the bug.

Why multiplying by 24 gives decimal hours

Since a time is a fraction of a day, a difference of two times is also a fraction of a day. 8 h 30 min is 0.354166… of a day. Multiply by 24 and you get 8.5 — hours instead of days. That is the whole trick. =(B2-A2)*24 is the single most useful formula on a timesheet, because decimal hours are what you multiply by an hourly rate.

Subtract the break as C2/60, not as a time value, when your break column holds plain numbers like 30. If you instead type the break as 0:30 in a time-formatted cell, subtract it before the *24: =(B2-A2-C2)*24. Mixing the two conventions in one column is how a half-hour lunch turns into a 30-hour deduction.

MOD for overnight rows

=MOD(B2-A2,1) returns the positive remainder, so 06:00 − 21:30 comes back as 0.354166 rather than a negative number or a string of hash marks. Use it on any sheet that might contain a night shift. It costs nothing on day shifts and saves the whole column on night shifts.

Mental shortcuts for when you have no tool

You do not always need the full method. These three shortcuts cover most real shifts in a few seconds.

Count to the hour, then past it. From 8:45 to 5:15: it is 15 minutes to 9:00, then 8 hours to 5:00, then 15 more minutes. 15 + 480 + 15 = 510 minutes. People are much better at counting forward in chunks than at borrowing in base 60.

Use the 12-hour pivot. From 7:20 AM to 4:10 PM: 7:20 to noon is 4 h 40 min; noon to 4:10 is 4 h 10 min; total 8 h 50 min. Splitting at noon kills the AM/PM problem outright.

Round to the nearest hour, then correct. 8:52 to 5:08 is roughly 9:00 to 5:00 (8 hours) plus 8 minutes at the front plus 8 at the back, so 8 h 16 min. Fast and accurate if you keep the signs straight: earlier start adds, earlier finish subtracts.

A worked week, start to finish

Here is a real-shaped week for one non-exempt employee. The break column is unpaid minutes. Decimal hours are rounded to two places on each row, which is what almost every payroll system does.

One week: clock times, break deduction, and paid hours in both formats
DayInOutBreakPaid h:mmDecimal
Monday8:00 AM4:30 PM308:008.00
Tuesday7:48 AM5:06 PM458:338.55
Wednesday8:00 AM12:20 PM04:204.33
Thursday9:15 AM7:40 PM609:259.42
Friday8:05 AM4:35 PM308:008.00
Saturday10:00 PM6:00 AM307:307.50
Total19545:4845.80

Check the week the honest way: add the paid minutes, not the rounded decimals. 480 + 513 + 260 + 565 + 480 + 450 = 2748 minutes. 2748 ÷ 60 = 45.8 hours exactly, and 2748 minutes is 45 h 48 min. The row-by-row decimals happen to sum to the same 45.80 here, but they will not always — two-decimal rounding can shift a weekly total by a hundredth or two. Summing minutes first and converting once is the version that always reconciles.

With 45.8 hours in a single workweek, a non-exempt employee is owed 40 hours at the regular rate and 5.8 hours at one and a half times it under the federal FLSA. That split is the subject of overtime rules explained; the overtime calculator will do the split and the pay in one pass.

Common mistakes, ranked by how much pay they cost

Frequent hours-worked errors and the fix
MistakeWhat it looks likeFix
Reading h:mm as decimal7:45 entered as 7.45 instead of 7.75Divide minutes by 60: see minutes to decimal hours
Noon/midnight flip12:30 PM typed as 00:3012 PM is 12:00; 12 AM is 00:00
Forgetting the break8:30 clock span paid as 8.5 hDeduct unpaid minutes before converting
h:mm wrap at 24 h41-hour week shows as 17:00Format as [h]:mm
Rounding every stepWeekly total off by a few hundredthsKeep minutes; round once at the end
Counting paid leave toward 40Holiday pay pushes the week into overtimePaid leave generally does not count as hours worked

Checking your work

Two quick sanity tests catch nearly everything. First, the paid total can never exceed the clock span — if it does, a break was added instead of subtracted. Second, decimal hours and h:mm must agree: multiply the decimal part by 60 and you should get your minutes back. 8.55 → 0.55 × 60 = 33 minutes → 8:33. If that round trip fails, one of the two figures is wrong.

For a single shift, the hours calculator on the home page gives you both formats at once. For a whole week, the timesheet calculator keeps your entries in your own browser via localStorage and never uploads them. If you only need the gap between two clock times with no break logic, the time duration calculator is the shortest path, and the add time calculator handles the reverse question — what time is it 7 h 20 min after 2:40 PM. All of it runs client-side with no account and no network request; the arithmetic is covered by 50 automated unit tests, and you can read the detail on how it works.

One caveat worth stating plainly: this guide explains arithmetic and general practice. It is general information, not legal or payroll advice, and break, overtime and recordkeeping rules differ by state and by country — check your state labor agency or your employer's written policy before changing how anyone is paid.

Frequently asked questions

Common questions

How do you calculate hours worked by hand?

Convert both clock times to minutes since midnight, subtract the start from the end, take off the unpaid break minutes, then divide by 60. For a 7:30 AM to 4:00 PM shift with a 30-minute lunch: 7:30 is 450 minutes, 16:00 is 960 minutes, 960 − 450 = 510, minus 30 = 480 paid minutes, and 480 ÷ 60 = 8.00 hours.

Working in minutes avoids borrowing across the base-60 boundary, which is where most hand calculations go wrong. Round to two decimals only once, at the very end — never at each step.

What is 7 hours 45 minutes in decimal hours?

It is 7.75 hours, not 7.45. Minutes are sixtieths of an hour, so you divide them by 60: 45 ÷ 60 = 0.75. Add that to the whole hours and you get 7.75.

The same logic gives 7:20 = 7.33 and 7:10 = 7.17. Payroll uses decimal hours because an hourly rate multiplies cleanly against them: 7.75 hours at $20 is $155.00, whereas multiplying 7.45 by $20 would short the employee by $6.

What does =B2-A2 do in a spreadsheet?

It returns the difference between two times as a fraction of one day, because spreadsheets store times that way — noon is 0.5, 6 PM is 0.75. Format the result cell as [h]:mm and it displays as hours and minutes, for example 8:30.

Use the square brackets rather than plain h:mm. Without them the display wraps at 24 hours, so a 41-hour weekly total shows as 17:00 and you silently lose a day and a half of pay.

Why do you multiply by 24 to get decimal hours in Excel?

Because the raw difference is measured in days, not hours. An 8 h 30 min gap is stored as 0.354166 of a day; multiplying by 24 converts days to hours and gives 8.5.

So =(B2-A2)*24 produces the decimal hours payroll wants, and =(B2-A2)*24-C2/60 does the same after deducting a break held as plain minutes in C2. Format those cells as ordinary numbers with two decimals, not as times, or the result will be reinterpreted as a clock value.

How do I calculate hours for a shift that crosses midnight?

If the end time is numerically earlier than the start time, add 1440 minutes — one full day — to the end before subtracting. A 10:15 PM to 6:45 AM shift becomes 1845 − 1335 = 510 minutes, or 8 h 30 min before any break deduction.

In a spreadsheet, wrap the subtraction in MOD: =MOD(B2-A2,1)*24. On this site, any end time earlier than the start time is automatically treated as crossing midnight, so overnight shifts need no special entry.

Do I subtract the lunch break before or after converting to decimal?

Either order gives the same answer if you are consistent, but subtracting in minutes first is safer. Work out the clock span in minutes, take off the unpaid break minutes, then divide the remainder by 60 once.

Doing it the other way round means converting the break to decimal too — a 45-minute lunch is 0.75 hours, not 0.45 — and that is an easy place to slip. Keeping everything in whole minutes until the final division removes the risk entirely.

How many hours is 9 AM to 5 PM with a 30 minute lunch?

Seven and a half paid hours. The clock span from 9:00 AM to 5:00 PM is exactly 8 hours, or 480 minutes; deduct 30 unpaid minutes and 450 minutes remain, which is 7:30 in h:mm and 7.50 in decimal hours.

If the lunch is paid, the figure stays at 8.00. Whether a meal period is paid depends on your employer's policy and on state rules, so check the written policy before assuming one way or the other.

Should I round each day's hours or only the weekly total?

Keep every day in whole minutes, add the minutes, and convert the weekly total once. Rounding each day to two decimals and then adding can move a weekly figure by a hundredth or two, which looks like a mistake even when nothing is wrong.

Example: six days totalling 2748 minutes is 45.80 hours exactly and 45 h 48 min. Summing minutes first always reconciles with the h:mm figure, which is what makes an audit trail easy to defend.

What is the difference between clock hours and paid hours?

Clock hours are the raw span between punch in and punch out. Paid hours are clock hours minus whatever time was not worked and not compensated — typically an unpaid meal period.

A badge reader showing 8 h 30 min on the premises with a 30-minute unpaid lunch means 8.00 paid hours. Confusing the two is the single most common source of time card disputes, so label the columns clearly on any timesheet you build.

Do paid holidays count toward the 40-hour overtime threshold?

Generally no. Under the federal FLSA, overtime is owed for hours actually worked over 40 in a workweek, and paid time off such as holidays, vacation and sick leave is usually not counted as hours worked.

So 32 worked hours plus an 8-hour paid holiday normally totals 40 paid hours with no overtime. Some employers choose to count holiday hours toward overtime by contract or collective agreement, and some states add their own rules, so check your policy or state labor agency. This is general information, not legal advice.

Last reviewed 1 November 2026. Corrections welcome at our contact page.

Read next

Guides that explain the numbers