Hours Calculator
Calculate the number of hours between two times.
Did this tool answer your question?
Thanks — this helps us improve the tool.
How to use this tool
- Enter start time and end time in the fields above.
- Results update instantly as you type — or click Calculate.
- Read your hours and the full breakdown beneath it.
Calculate the number of hours between two times.
Formula
Hours = End Time (decimal) − Start Time (decimal)
where Time (decimal) = Hours + Minutes ÷ 60. If the result is negative (overnight span), 24 is added.
How it works
This calculator finds the elapsed time in decimal hours between two HH:MM times by converting each time to a fractional hour value and subtracting start from end.
An overnight correction adds 24 hours when the end time is earlier than the start time, supporting shifts that cross midnight (e.g., 22:00 to 06:00 = 8 hours). The result is a decimal number; for example, 8.5 means 8 hours and 30 minutes.
Worked example
- Start time = 09:00; end time = 17:00.
- Convert start: 9 + 0 ÷ 60 = 9.0 decimal hours.
- Convert end: 17 + 0 ÷ 60 = 17.0 decimal hours.
- Elapsed = 17.0 − 9.0 = 8.0 hours.
Hours elapsed = 8.
Common mistakes to avoid
- Entering times in 12-hour format without adjusting for PM -- 1:00 PM is 13:00, not 1:00.
- Forgetting that the overnight auto-correction only handles a single overnight span; shifts longer than 24 hours require manual addition.
- Inputting minutes as a decimal fraction of an hour (e.g., writing 1.5 for 1 hour 30 minutes instead of entering 1:30).
Key terms
- Decimal hours
- Time expressed as a single number where the fractional part represents minutes as a proportion of 60 (e.g., 8.5 h = 8 h 30 min).
- Overnight shift
- A work period that starts before midnight and ends after midnight; handled by adding 24 to a negative elapsed-time result.
- HH:MM format
- 24-hour time notation using two digits for hours (00–23) and two digits for minutes (00–59), separated by a colon.
- Elapsed time
- The total duration between a start event and an end event, measured in consistent units.
- Clock-in / clock-out
- Common terms for the start and end times of a work session, used when tracking payable hours.
Frequently asked questions
- How do I calculate hours for a shift that spans midnight?
- Enter the start time (e.g., 10:00 PM as 22:00) and end time (e.g., 6:00 AM as 06:00). The calculator detects the negative result and adds 24 hours automatically.
- How do I convert the decimal result back to hours and minutes?
- Multiply the decimal portion by 60. For example, 7.75 hours = 7 hours and 45 minutes (0.75 x 60).
- Can I calculate total hours over multiple shifts in a week?
- Run the calculator separately for each shift, sum the decimal results, then convert the total to hours and minutes at the end.