Skip to content
CalculatorAtlas

Hours Calculator

Tested

Total hours worked.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

min

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

Hours worked is the time between the start and end of a shift minus the unpaid break. Enter the start time, end time and break length in minutes and the calculator returns the hours worked in hours and minutes and as decimal hours for pay.

If the end is earlier than the start the shift is taken to cross midnight. Decimal hours are the figure to multiply by an hourly rate: 8 h 30 min is 8.5.

Related tools: Time Card Calculator: Total hours, overtime and gross pay from daily start and end times. Time Duration Calculator: Elapsed time between two clock times, including across midnight. Days Between Dates Calculator: Number of days, weeks and months between two dates.

How to use the Hours Calculator

  1. Type start time, for example HH:MM (24-hour).
  2. Type end time, for example HH:MM (24-hour).
  3. Optionally, enter unpaid break (min) (a whole number, between 0 and 1440).
  4. Press Calculate to see the result, and use Reset to start again.
Inputs of the Hours Calculator
InputWhat to enterAllowed values
Start timeText, such as HH:MM (24-hour)—
End timeText, such as HH:MM (24-hour)—
Unpaid break (optional)A whole number, in min≥ 0, ≤ 1440

Formula and method

Formula

hours worked = (end − start) mod 24 h − break

Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects.

Crosses midnight when the end is earlier than the start.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Start time = 09:00; End time = 17:30; Unpaid break = 30.

Results of example 1
ResultValue
Hours worked8 h 0 min
Decimal hours8

Example 2

Inputs: Start time = 22:00; End time = 06:00; Unpaid break = 45.

Results of example 2
ResultValue
Hours worked7 h 15 min
Decimal hours7.25

The first line is the headline result (hours worked). Below it the hours Calculator lists decimal hours, which describe the same case from other angles. Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects.

Worked example

A shift from 09:00 to 17:30 is 8 h 30 min. With a 30 minute unpaid break, hours worked is 8 h 0 min, which is 8 decimal hours.

Hours worked with breaks

09:00 to 17:30 with a 30-minute unpaid break is 8 h 0 min, or 8.0 decimal hours. An overnight shift such as 22:00 to 06:00 is 8 hours before the break.

For a week, add each day's result or use a time card calculator.

A 09:00 to 17:30 shift with different breaks

Every figure in this table comes from running this calculator, so it matches what the form returns.

A 09:00 to 17:30 shift with different breaks
Break (minutes)Hours workedDecimal hours
08 h 30 min8.5
308 h 0 min8
457 h 45 min7.75
607 h 30 min7.5

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Unpaid break: entering "90" shows "The break cannot be longer than the shift." beside that field and no result.

Choosing between the Hours Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Hours Calculator and similar calculators
CalculatorYou enterIt returns
[Time Card Calculator](/time/time-card-calculator/)start times, end times and unpaid break per dayTotal time
[Time Duration Calculator](/time/time-duration-calculator/)start time and end timeDuration
[Days Between Dates Calculator](/date-calendar/days-between-dates-calculator/)start date, end date and count end date?Days between
[Date Calculator](/date-calendar/date-calculator/)start date and operationResulting date
[Time Until Calculator](/time/time-until-calculator/)current time and target timeTime remaining

Background: dates and times

Date and time results depend on the conventions a tool uses: whether the end date counts, whether weekends and holidays are skipped, how months of different lengths are handled and whether time zones are applied. This page states its convention, and the worked examples show it.

Dates use the Gregorian calendar and calendar days unless the page says otherwise; check deadlines against the rule in your contract or regulation.

Assumptions and limitations

  • Break longer than the shift is rejected

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for unpaid break to confirm this.

Frequently asked questions

Does it handle shifts that cross midnight?

Yes. If the end is earlier than the start, the end is treated as the next day.

How do I total a whole week?

Add each day's hours, or use the time card calculator.

What does the Hours Calculator calculate?

Hours worked between a start and end time, minus breaks. It returns Hours worked and Decimal hours.

What formula does the Hours Calculator use?

hours worked = (end − start) mod 24 h − break. Crosses midnight when the end is earlier than the start.

What do I need to enter in the hours Calculator?

You enter Start time and End time. Optional: Unpaid break (min).

How is the result rounded or limited?

Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects. Break longer than the shift is rejected.

What is an example of a hours result?

With start time 09:00, end time 17:30 and unpaid break 30, the hours worked is 8 h 0 min.

Sources

  • ISO 8601-1: Date and time, representations for information interchange (calendar dates, ordinal dates and week dates)
  • Gregorian calendar reform, papal bull Inter gravissimas (1582): the leap-year rule used for all dates

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.