Hours Calculator

Multi-mode hours calculator.

Time & Date 3 modes Crosses midnight
Rate this calculator · 5.0 (1)

Hours calculator

Between times · add/subtract · HH:MM ↔ decimal

Instructions — Hours Calculator

1

Pick a mode

"Between two times" computes elapsed hours between a start and end clock time, including overnight shifts. "Add / subtract" works with raw HH:MM durations. "Convert" flips between HH:MM and decimal hours.

2

Enter your inputs

The time pickers use a 24-hour clock by default. Add an optional break in minutes for the between-times mode. The decimal-conversion mode is bidirectional — type into either side.

3

Read the breakdown

Each mode shows the headline result plus a four-cell breakdown with decimal hours, total minutes, and gross/net duration where relevant.

Overnight shifts: end time earlier than start time is treated as crossing midnight. 22:00 to 06:00 = 8 hours, not -16.
Payroll trick: decimal hours make timecard math easy. 7h 30m = 7.5 h, 7h 45m = 7.75 h, 7h 15m = 7.25 h. Multiply by hourly rate directly.

Formulas

Time math is mostly clean modular arithmetic. The tricky cases are midnight rollover and the conversion between sexagesimal (base 60) and decimal representations.

Time between two clock times
$$ \Delta = (h_2 \times 60 + m_2) - (h_1 \times 60 + m_1) $$
Convert each time to minutes from midnight, subtract. If result is negative, add 24 × 60 = 1440 to handle overnight crossing.
HH:MM to decimal hours
$$ \text{decimal} = h + \frac{m}{60} $$
2h 30m = 2 + 30/60 = 2.5 hours. Direct division. Payroll, billable hours, and engineering time tracking all use decimal hours.
Decimal hours to HH:MM
$$ h = \lfloor x \rfloor, \;\; m = (x - h) \times 60 $$
2.75 h = 2 hours + 0.75 × 60 = 45 minutes = 2h 45m. Watch for rounding: 2.7333... h rounds to 2h 44m.
Net hours with break
$$ \text{net} = \text{gross} - \text{break (min)} $$
9 to 5 (8 hours) with a 30-minute unpaid lunch = 7.5 paid hours. US Fair Labor Standards Act allows unpaid breaks of 30+ minutes if the employee is fully relieved of duties.
Adding durations
$$ \text{sum} = (h_a + h_b) + \frac{(m_a + m_b)}{60} $$
When minutes overflow, carry: 45 + 30 = 75 min = 1h 15m. The hours digit increases by 1.
Subtracting durations
$$ \text{diff} = (h_a - h_b) - \frac{(m_b - m_a)}{60} $$
When minute B exceeds minute A, borrow: 3h 15m - 1h 45m = 2h - 30m = 1h 30m.

Reference

Common payroll conversions
HH:MMDecimal hoursFraction
0h 15m0.25 h1/4
0h 30m0.50 h1/2
0h 45m0.75 h3/4
1h 00m1.00 h1
1h 30m1.50 h1 1/2
4h 00m4.00 hhalf-day
7h 30m7.50 hstandard shift
8h 00m8.00 hfull shift
40h 00m40.00 hworkweek (US/EU)

Time conversion tables

From the NIST and BIPM unit definitions.

Hours to other units
1 hour =
Minutes60
Seconds3,600
Days0.04167
Weeks0.00595
Year (Gregorian)0.0001142
Typical schedule lengths
ScheduleHours
Standard US workweek40
EU Working Time Directive cap48
Part-time threshold (US)30
FLSA overtime trigger40+
School year (US, total instruction)~1,000

Note: many payroll systems round time entries to the nearest 6 minutes (0.1 hour) or 15 minutes (0.25 hour). The FLSA permits this if rounding is neutral over time — it cannot systematically shave employee hours.

Article — Hours Calculator

Hours calculator: between times, add/subtract, decimal conversion

An hours calculator handles three common time math problems: finding the duration between two clock times, adding or subtracting hour-and-minute durations, and converting between HH:MM format and decimal hours. The calculator above does all three. 9 AM to 5 PM with a 30-minute break equals 7.5 paid hours; 2h 45m plus 1h 30m equals 4h 15m; and 7h 15m equals 7.25 decimal hours.

Each mode targets a different workflow. Payroll uses decimal hours. Shift workers care about start-to-end clock math, including overnight rollovers. Project managers add and subtract billable durations. The mathematics is straightforward, the formatting is where most errors creep in.

What is an hours calculator?

An hours calculator is a tool for arithmetic on durations and clock times. The challenge is that time is base 60 for minutes and seconds, base 12 or 24 for hours, and base 7 for days. Most arithmetic in everyday life uses base 10, so manual time math demands constant base-conversion: 75 minutes is 1 hour 15 minutes, 90 minutes is 1.5 hours.

The calculator above shifts that mental burden onto code. Type the inputs in whichever format you have them (clock times, HH:MM durations, decimal hours), pick the operation, and read the result in the format you need.

Hours between two times

The most common hours calculation: how long is the span between a start time and an end time? The math is straightforward when both times are on the same day. Subtract the start from the end in minutes, divide by 60.

Time between two clock times
minutes = (h2 × 60 + m2) - (h1 × 60 + m1) hours = minutes / 60

Worked example. 9:00 to 17:30. End is 17 × 60 + 30 = 1050 minutes from midnight. Start is 9 × 60 = 540 minutes. Difference is 510 minutes, or 8.5 hours. Subtract a 30-minute lunch and the net work duration is 8 hours flat.

Adding and subtracting hours

Adding HH:MM durations is one of the few times base-60 math actually matters. 45 + 30 = 75 minutes, but the convention is 1h 15m. The "carry" digit moves to the hours column whenever minutes total 60 or more.

Did you know

The 60-minute hour traces back to ancient Babylonian astronomy. Babylonian mathematicians used base 60 because it has many divisors (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60), making fractional calculations easy with only addition and subtraction. Their system survived the Greeks, the Romans, and every subsequent calendar reform. Every modern computer's clock chip still does base-60 arithmetic at the minute boundary.

Subtraction has the mirror-image rule: when the smaller-minutes value sits below the larger, you borrow from the hours column. 3h 15m minus 1h 45m. The minutes 15 minus 45 is negative, so borrow one hour (60 minutes): now 75 minus 45 = 30. The hours 3 minus 1 minus 1 (borrowed) = 1. Result: 1h 30m. The calculator does all of this in one step.

Hours to decimal conversion

Decimal hours are easier to multiply and add in spreadsheets and payroll systems. The conversion is straightforward: divide minutes by 60 and add to the hours integer. Common fractions:

  • 0h 15m = 0.25 h (quarter hour)
  • 0h 20m = 0.333 h (one-third)
  • 0h 30m = 0.50 h (half hour)
  • 0h 45m = 0.75 h (three quarters)
  • 1h 06m = 1.10 h (rounded to tenth)
  • 7h 30m = 7.50 h (standard shift)
  • 8h 00m = 8.00 h (full shift)
  • 40h 00m = 40.00 h (US workweek)

The reverse direction takes a decimal hour value and produces HH:MM. The integer part is the hour count. The fractional part times 60 gives minutes. 7.75 hours equals 7 hours + 0.75 × 60 = 7h 45m. Watch the rounding: 7.7333... hours is 7h 44m, not 7h 43m or 7h 45m. The calculator above rounds to the nearest minute.

Payroll hours calculation

US payroll runs in decimal hours. A timecard logging 7:45, 8:00, 7:30 across three days totals 23 hours 15 minutes in HH:MM, or 23.25 hours in decimal. The decimal form multiplies cleanly with hourly rate: 23.25 hours × $25/hr = $581.25.

Tip

If your employer rounds time entries, check whether the rounding is neutral. The FLSA permits rounding to the nearest 6 minutes (0.1 hour) or 15 minutes (0.25 hour) so long as the rounding doesn't systematically shave employee hours. A 7:43 clock-out rounded to 7:45 is fine; one that always rounds down to 7:30 is wage theft.

Some industries use tenths of an hour (6-minute increments). Legal billing, IT contracting, and consulting are common examples. 6 minutes is exactly 0.1 hour, which makes the rounding intuitive: 0.0, 0.1, 0.2,... 0.9, 1.0. A task that took 14 minutes rounds to 0.2 hours (12 min) or 0.3 hours (18 min) depending on the firm's policy.

Hours and overtime rules

US federal law (FLSA) sets overtime at any hours worked beyond 40 in a workweek. The overtime rate is 1.5 times the regular rate. California and a few other states have daily overtime: any hours over 8 in a single day trigger 1.5x; over 12 in a single day trigger 2x.

European Union states use the Working Time Directive: 48 hours per week maximum (averaged over 17 weeks), with most member states defaulting to a 40-hour standard week and paying overtime above that. France's famous 35-hour week is a labor-contract default, not an absolute cap.

US (FLSA)
40 h / week
overtime = 1.5x rate
EU (WTD)
48 h cap / week
~40 h typical standard

Crossing midnight: overnight hours

An overnight shift is the classic edge case in hours math. A worker clocks in at 22:00 and out at 06:00 the next morning. Naive subtraction gives 06:00 minus 22:00 = -16:00, which is obviously wrong.

The fix: when the end time is numerically smaller than the start time, add 24 hours to the end. 06:00 plus 24:00 = 30:00, minus 22:00 = 8:00. The shift was 8 hours. The calculator above detects this case automatically and flags "crosses midnight" in the breakdown.

Watch out for shifts that span exactly 24 hours or more. Most shift schedules have legal caps (US trucking: 11 driving hours per day, EU: 9 base hours with extensions). If you see "23h 59m" as a duration, double-check that both times are entered correctly.

Common hours calculation mistakes

Mixing decimal and HH:MM mid-calculation. 2.5 + 1h 45m is not 2.95 — it's 4h 15m. Convert everything to one format before adding.

Subtracting break time from clock duration in the wrong direction. Net work hours = gross duration minus break. A 9-to-5 day with a 30-minute lunch is 7.5 paid hours, not 8.5.

Spreadsheet time math is a trap

Excel and Google Sheets treat time as fractions of a day under the hood. Adding two cells that display "01:30" each gives "03:00" only if you format the result cell as time. If you format it as a number, you get 0.125 (which is three hours expressed as a fraction of a 24-hour day). Verify formatting before trusting payroll totals.

FAQ

Subtract the start clock time from the end clock time. Convert both to total minutes (h × 60 + m), subtract, then divide by 60 for decimal hours. For overnight shifts, add 24 hours if the end time is numerically smaller. 22:00 to 06:00 looks like −16 hours numerically but is actually 8 hours real-world.
2h 30m = 2.50 hours. The math: 2 + 30/60 = 2.5. Payroll and billable-hours systems use decimal hours because they multiply cleanly with hourly rates. 2.5 hours × $30/hr = $75.
5 PM (17:00). 9 + 8 = 17, which is 5 PM on a 24-hour clock. With a typical 30-minute unpaid lunch break, paid hours total 7.5. A full 8-hour shift starting at 9 AM ends at 5 PM regardless of breaks taken.
When the end time is earlier than the start time, the calculator adds 24 hours and notes that the shift crosses midnight. A 22:00 to 06:30 shift returns 8h 30m. The "crosses midnight" flag appears in the breakdown so you know which interpretation was used.
1h 45m + 2h 30m = 4h 15m. Add hours and minutes separately, then carry: 1+2 = 3 hours, 45+30 = 75 minutes = 1h 15m, total 3h + 1h 15m = 4h 15m. The Add/subtract tab does this automatically.
7.25 h = 7h 15m. The math: 0.25 hours × 60 = 15 minutes. Quarter-hour fractions are common in payroll because they convert cleanly: 0.25, 0.50, 0.75 map to 15, 30, 45 minutes.
Yes if the break is unpaid. US FLSA standards: breaks under 20 minutes are paid; meal breaks of 30+ minutes can be unpaid if the employee is fully relieved of duties. State law sometimes mandates paid breaks. This calculator subtracts whatever break minutes you enter from the gross duration.
40 hours is the US standard, set by the Fair Labor Standards Act in 1938. Most EU states use the same 40-hour week but cap weekly hours (including overtime) at 48 via the Working Time Directive. France famously moved to 35 hours by statute in 2000; the rule is widely interpreted as a threshold for overtime pay rather than an absolute cap.