Hours Calculator
Calculate the hours and minutes between two times, including overnight shifts and seconds. See decimal hours, minutes and days at a glance.
Hours between
8.50 h
As hh:mm
08:30
08:30:00
In minutes
510
= 30,600 seconds
In days
0.00
Full 24-hour days
Choose “next day” when the end time falls after midnight, such as an overnight shift. In 12-hour format, remember that 12:00 AM is midnight and 12:00 PM is noon.
Last updated: January 2026
How this calculator is verified
Checked by True Calculator automated test suite on
- Formula verified against a published worked example in the automated test suite
- Edge cases (zero, negative, boundary and unit-mismatch inputs) covered by unit tests
The full verification method is on our how we verify page. Found an error? Tell us and we will re-check it.
When to Use This Calculator
Counting hours between two times is one of the most common time calculations, and this calculator does it in seconds. Employees use it to verify their daily working hours before filling time sheets, and managers use it to check attendance records without manual arithmetic. Payroll staff convert the results into decimal hours, like 8.5, for salary calculations. Students use it to measure study sessions or the time between classes. Freelancers track billable time on client projects by counting hours between login and logout. Parents measure how long a child's school day or nap lasts, and travellers calculate flight and train durations between departure and arrival times. The calculator shows the result four ways at once, in decimal hours, hh:mm, total minutes and days, so it fits payroll spreadsheets and written records with no further conversion.
How to Use This Calculator
- Step 1: Pick a clock format: 24-hour for international time, or 12-hour with an AM/PM selector.
- Step 2: Enter the start and end times using the hour, minute and second fields, or press "Use current time".
- Step 3: Choose "same day" or "next day" depending on whether the end time falls after midnight.
- Step 4: Read the result in decimal hours, hh:mm, minutes and days; press "Swap times" to reverse the order.
Worked Example
An employee clocks in at 8:13 in the morning and out at 4:55 in the afternoon. With the 24-hour format selected, the calculator reports 8 hours 42 minutes, shown as 08:42, which is 8.7 decimal hours and 522 minutes. A night worker who starts at 4:07 pm and finishes at 8:13 am chooses the next-day option, and the tool returns 16 hours 6 minutes across midnight. Entering seconds, such as 09:00:30 to 17:30:00, adds the exact seconds to every result.
Tips and Common Mistakes
- •Tip 1: Use the 12-hour format carefully — 12:00 AM is midnight and 12:00 PM is noon.
- •Tip 2: Use the decimal hours result, like 8.7, for payroll, since pay is usually calculated in decimal hours.
- •Tip 3: For a 24-hour rotation, set both times the same and choose "next day" to get exactly 24 hours.
- ✗Mistake 1: Choosing "same day" for an overnight shift, which makes the calculator reject the times because the end comes before the start.
- ✗Mistake 2: Forgetting to subtract unpaid breaks, since this tool measures the raw gap between the two clock times.
Expert Note
The decimal-hours output (e.g., 8.7) is what payroll systems expect. For Indian employees, the Shops and Establishments Act in each state defines maximum daily working hours (typically 8-9 hours). Always subtract unpaid breaks manually — this tool measures raw elapsed time only.
Sources and References
- •IST reference: UTC+5:30 — Department of Science and Technology, Government of India
- •12-hour vs 24-hour clock — National Institute of Standards and Technology
Official sources are linked so you can confirm the current rate yourself. Check the linked page for the latest notification before relying on these figures.
Frequently Asked Questions
How do I count hours between two times?
Enter the start and end times and choose whether the end is on the next day. For a 09:00 to 17:30 shift, you get 8 hours 30 minutes.
What should I choose for an overnight shift?
Select "next day" when the end time is after midnight, such as a 22:00 to 06:30 night shift. The calculator counts the hours correctly across midnight.
What is the difference between decimal hours and hh:mm?
Decimal hours express the total as a fraction, like 8.5 hours. The hh:mm format keeps hours and minutes separate, like 08:30. Both are shown in the results.
Can I see the result in minutes too?
Yes, the total in minutes is displayed alongside hours. For example, 8 hours 30 minutes is 510 minutes, which is useful for payroll and time tracking.
Why does the calculator reject an end time before the start?
On the same day, an end time before the start would give a negative duration. Choose "next day" if the end actually falls after midnight.
Compare these tools
- Time Calculator — Add or subtract hours and minutes from any time of day
- Time Duration Calculator — Calculate the duration between two times or two date-times in hours, minutes and seconds
- World Time Zone Converter (IST, EST & GMT) — Convert times between 40+ world cities with 12-hour and 24-hour formats and day-shift flags
You might also need
Related calculators from other categories
Date
Date Difference Calculator
Count the exact days, weeks, months, years and business days between two dates, with hours and minutes too. Perfect for deadlines, leave and projects.
Date
Month Calculator
Count the full months between two dates, or add and subtract months from any date with end-of-month clamping for accurate results.
Date
Years Calculator
Calculate whole and fractional years between two dates, plus months, days and total days. Ideal for tenure, age and service periods.
Date
Age Difference Calculator
Find the age difference between two dates in years, months and days, plus total days, weeks and months. See who is older at a glance.