Skip to content
Other

Count Hours Calculator

Enter a start time and end time to count the exact number of hours and minutes between them. Optionally subtract a break, handle overnight shifts, and convert the result to decimal hours for payroll or timesheets. Results update as you type.

Your details

Hour part of the start time (0-23, 24-hour clock).
h
Minute part of the start time (0-59).
min
Hour part of the end time (0-23). For midnight enter 0.
h
Minute part of the end time (0-59).
min
Total unpaid break time to subtract (lunch, pauses). Leave at 0 to skip.
min
Controls what happens when the end time is earlier than the start time.
Total timeStandard shift
8 h

Hours and minutes between the two times, after deducting the break.

Decimal hours8h
Total minutes480min
Full hours (floor)8h
Remaining minutes0min
8 h
Part-time<4Standard4-8Long shift8-12Extended12+

Net shift: 8 h (8.00 decimal hours)

  • From 09:00 to 17:30 is 8 h 30 min gross, minus 30 min break = 8 h net.
  • In decimal hours: 8.00 h. Multiply by your hourly rate to get pay for this shift.

Next stepUse the decimal hours figure when filling in a payroll timesheet.

Shift breakdown

SegmentClockMinutesDecimal hNote
Shift start09:00---------
Break---300.50Unpaid
Shift end17:30---------
Gross time---5108.50Before break
Net time---4808.00After break

Decimal hours = minutes / 60. Use this figure for payroll calculations.

Formula

Net hours=(Tend−Tstart)−Tbreak60Net\ hours = \dfrac{(T_{end} - T_{start}) - T_{break}}{60}

Worked example

Start 09:00, end 17:30, 30 min break: (17:30 - 09:00) = 510 min gross; 510 - 30 = 480 min net; 480 / 60 = 8.00 decimal hours.

How to count hours between two times

To count the hours between two times, convert both to minutes from midnight, subtract the start from the end, then divide by 60. For example, 09:00 is 540 minutes and 17:30 is 1050 minutes; the difference is 510 minutes, or 8.50 decimal hours. This calculator does all of that automatically and also subtracts any break time you enter, so the result is the net paid duration you can enter directly into a payroll system.

Decimal hours vs. hours and minutes

Payroll software almost always requires decimal hours rather than the hh:mm format you read on a clock. To convert minutes to a decimal fraction, divide by 60: 15 min = 0.25 h, 30 min = 0.50 h, 45 min = 0.75 h. This calculator shows both formats side by side so you never have to do that conversion by hand. If your rate is, for example, $18 per hour and you worked 7.75 decimal hours, your gross pay is $18 x 7.75 = $139.50.

Overnight and night-shift calculations

When the end time is earlier on the clock than the start time (e.g. you start at 22:00 and finish at 06:00), the calculator automatically adds 24 hours to the end time so the math stays correct. The default setting is "auto-detect," which triggers whenever end < start. If your work day runs from an unusual pattern and the auto-detect is wrong, you can override it with "same day" (end must be strictly after start) or "force next day" (always treat the end as the following calendar day).

Break deductions and labor law

Most employment laws require that unpaid breaks are not included in hours worked. A typical 8-hour shift includes a 30-minute unpaid lunch, leaving 7.5 paid hours. Enter your total unpaid break time in minutes and the calculator subtracts it before showing the net result. If you have multiple breaks, add them together first. Note that laws on mandatory break lengths vary by country, state, and industry - always check your jurisdiction.

Common shift lengths and decimal equivalents

Shift durationDecimal hoursTypical use
2 h 00 min2.00Short call / on-call
3 h 00 min3.00Half-day part-time
4 h 00 min4.00Standard part-time
6 h 00 min6.00Short full shift
7 h 30 min7.509:00-17:00 with 30 min break
8 h 00 min8.00Standard 8-hour shift
8 h 30 min8.509:00-18:00 with 30 min break
10 h 00 min10.00Extended/10-hour shift
12 h 00 min12.0012-hour shift (hospital, plant)
12 h 30 min12.5012-hour shift with 30 min break

Quick reference for converting hours:minutes to decimal hours used in payroll.

Frequently asked questions

How do I count hours worked for payroll?

Enter your clock-in time as the start and your clock-out time as the end, then enter any unpaid break in minutes. The calculator shows both the hh:mm total and the decimal-hour equivalent. Use the decimal hours number in your payroll system and multiply it by your hourly wage for gross pay. For a full week, repeat for each day and sum the daily decimal totals.

What are decimal hours and why do they matter?

Decimal hours express a time duration as a single number with a decimal fraction instead of separate hours and minutes. For example, 7 hours and 30 minutes = 7.50 decimal hours. Payroll spreadsheets and most timekeeping software require this format because you can multiply it directly by an hourly rate. The conversion is simple: divide the minutes part by 60 and add it to the whole hours (30 min / 60 = 0.50, so 7 h 30 min = 7.50 h).

How does overnight shift calculation work?

When the end time is earlier than the start time (e.g. start at 22:00, end at 06:00), this calculator automatically adds 24 hours (1440 minutes) to the end time before subtracting. The result is 06:00 + 24h - 22:00 = 30:00 - 22:00 = 8 hours, which is correct for an overnight shift. You can also set the overnight toggle to "force next day" if you always want this behavior.

How do I convert 7 hours 45 minutes to decimal?

Divide the minutes by 60: 45 / 60 = 0.75. Add that to the hours: 7 + 0.75 = 7.75 decimal hours. For any number of minutes, the formula is: decimal hours = whole hours + (minutes / 60). This calculator does the conversion automatically - you just read the "decimal hours" output field.

Can I calculate hours between two times that cross midnight?

Yes. Set the overnight toggle to "auto-detect" (the default) or "force next day." When the end time is earlier than the start time, the calculator treats the end as being on the following day. For example, 23:00 to 07:00 is calculated as 8 hours. If both times are within the same calendar day (end is after start), the overnight option has no effect.

How many hours is 9am to 5pm?

From 9:00 to 17:00 is exactly 8 hours (480 minutes). If you take a 30-minute unpaid lunch break, the net worked time is 7 hours 30 minutes, or 7.50 decimal hours. Many standard office schedules use this pattern: 9am to 5pm with a 30-minute break yields 7.5 paid hours per day, or 37.5 hours for a standard five-day week.

What is the difference between gross hours and net hours?

Gross hours is the total time from the moment you clock in to the moment you clock out, including any breaks. Net hours (or paid hours) is what remains after subtracting unpaid break time. If you clock in at 08:00 and out at 16:30 and take a 30-minute unpaid break, gross hours = 8.50 h and net hours = 8.00 h. Payroll uses net hours.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…