Hours CalculatorFree online other calculator — instant results, no sign-up
Hours and minutes between two times.
About the Hours Calculator
The Hours Calculator computes the exact elapsed time between a start time and an end time. It provides the total duration formatted in hours and minutes as well as in decimal hours, making it useful for tracking work shifts, project tasks, and billing.
- Start time
- The initial time in 24-hour HH:MM format (from 00:00 to 23:59).
- End time
- The concluding time in 24-hour HH:MM format (from 00:00 to 23:59).
Formula and method
d = (M_end - M_start + 1440) mod 1440; Decimal Hours = d / 60
- M_startStart time converted into total minutes from midnight (Hours × 60 + Minutes)
- M_endEnd time converted into total minutes from midnight (Hours × 60 + Minutes)
- dTotal elapsed duration in minutes
- 1440Total number of minutes in a standard 24-hour day
The tool converts both times into total minutes from midnight and subtracts the start time from the end time. If the resulting difference is negative, 1,440 minutes (24 hours) are added to account for spans that cross midnight. The total minutes are then formatted into hours and minutes and divided by 60 to provide decimal hours rounded to two decimal places.
Worked example
These are the calculator's starting values and the results it actually produces for them.
Inputs
- Start time09:00
- End time17:30
Results
- Duration8h 30m
- Decimal hours8.5
How to use the Hours Calculator
- 1Convert the start time and end time into total minutes past midnight (Hours × 60 + Minutes).
- 2Subtract the start time minutes from the end time minutes.
- 3If the difference is less than zero, add 1,440 minutes to account for crossing midnight.
- 4Format the resulting minutes into hours and minutes, and divide by 60 to calculate decimal hours.
Reading your result
Duration presents elapsed time as hours and minutes (e.g., 8h 30m). Decimal hours converts the same duration into a decimal figure rounded to two decimal places (e.g., 8.50), which is the standard format used for payroll systems and hourly invoicing.
Limitations
This calculator assumes all durations occur within a single 24-hour window; it cannot track multi-day spans exceeding 24 hours. It also does not automatically deduct unpaid meal breaks or account for daylight saving time shifts.
Common questions
How does the calculator handle shifts that end after midnight?+
If the end time is earlier than the start time (such as 22:00 to 06:00), the calculator adds 1,440 minutes (24 hours), correctly treating it as an overnight shift of 8 hours.
Why is the duration shown as a decimal?+
Payroll software and billing platforms typically require time entered as decimals rather than hours and minutes (for instance, 8 hours and 15 minutes is entered as 8.25 hours).
Can I calculate shifts longer than 24 hours?+
No, because the calculator only accepts clock times without calendar dates, any span entered is constrained to a maximum of 23 hours and 59 minutes.
Does the calculator save my information?+
Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.
Further reading
You might also like
Age Calculator
Exact age in years, months, days and more.
Date Calculator
Add or subtract days from a date.
Time Calculator
Add or subtract hours, minutes and seconds.
Time Card Calculator
Weekly hours and pay from daily shifts (start-end per line).
Time Zone Calculator
Convert a time between UTC offsets.
Time Duration Calculator
Duration between two dates.
Results are estimates for informational purposes and are not financial, medical or legal advice.