Date & Time

Instant, private, and free

Hours Calculator.

Calculate time duration between two times

On-device calculationNo signup
01

Set your values

Results update as you type.

Time Entries

Entry 1

Duration: 7 hours 30 minutes (7.5 hours)
Duration: 7 hours 30 minutes

Duration

7 hours 30 minutes

Breakdown

Decimal Hours7.5 hrs
Total Entries1

How to Use

12-hour format:
  • • 9:00 AM
  • • 5:30 PM
  • • 12:00 PM (noon)
  • • 12:00 AM (midnight)
24-hour format:
  • • 09:00
  • • 17:30
  • • 12:00
  • • 00:00

Tip: Overnight shifts are automatically detected. If the end time is earlier than the start time, the calculator assumes it's the next day.

FAQs

How do I calculate hours worked?

Enter your start time and end time (e.g., 9:00 AM to 5:00 PM). The calculator automatically computes the duration. If you took a break, enter the break minutes to deduct them from the total.

Does this calculator handle overnight shifts?

Yes! If your end time is earlier than your start time, the calculator automatically assumes the shift crosses midnight. For example, 11:00 PM to 7:00 AM = 8 hours.

Can I use both 12-hour and 24-hour time formats?

Yes! You can use either format. For 12-hour, use AM/PM (e.g., 9:00 AM). For 24-hour, use HH:MM format (e.g., 09:00).

Can I calculate weekly hours?

Yes! Click 'Add Entry' to add multiple days/shifts. The calculator will sum all entries and show you the total hours worked.

Cite this calculator

Canonical URL: https://mathify.one/zh/date/hours

Cite as: Mathify. (2026). 小时计算器. https://mathify.one/zh/date/hours

Use Cases

Track work hours for payroll

Employees and employers can accurately calculate daily or weekly work hours, including breaks and overnight shifts, for payroll purposes.

Example: Enter Monday's 9:00 AM to 5:30 PM with a 30-minute break, then add Tuesday's shift to see the weekly total.

Plan project or study schedules

Students and freelancers can measure time spent on tasks or study sessions to manage their time effectively.

Example: Calculate total study time across multiple sessions in a day.

Frequently Asked Questions

How does the hours calculator handle overnight shifts?
The calculator automatically detects when the end time is earlier than the start time, indicating an overnight shift, and calculates the duration across midnight correctly.
Can I deduct breaks from my total hours?
Yes, you can enter break durations for each time entry, and the calculator subtracts them from the total time worked.
Can I calculate weekly totals with this calculator?
Yes, the calculator supports multiple time entries, allowing you to add several shifts and get a combined weekly total.

Tips & Common Mistakes

Tips

  • Use the 24-hour format (e.g., 14:30) to avoid AM/PM confusion, especially for overnight shifts.
  • Double-check that break times are entered in the same unit (minutes or hours) as expected by the calculator.
  • For weekly totals, enter each day's shift as a separate time entry to get an accurate sum.
  • If you work overnight, ensure the end time is on the next day (e.g., 23:00 to 07:00) for correct calculation.

Common Mistakes to Avoid

  • Forgetting to account for breaks, leading to overestimating total hours worked.
  • Entering times in 12-hour format without specifying AM/PM, causing incorrect durations.
  • Not separating multiple shifts into distinct entries, which can skew weekly totals.

Last updated: August 13, 2026