how many hours calculator

How Many Hours Between Two Times?

Use this time duration calculator to find total hours worked, including optional break deduction and automatic overnight shift handling.

Results

Why a “How Many Hours” Calculator Is Useful

A good work hours calculator helps you answer one of the most common daily questions: How long was I actually on the clock? Whether you are tracking payroll, freelancing, planning study blocks, or recording shift work, quick and accurate time math prevents errors and saves effort.

Many people make mistakes when calculating hours manually—especially when shifts cross midnight or include breaks. This calculator solves that in seconds and gives you results in multiple formats.

What This Calculator Does

  • Calculates the duration between a start time and end time.
  • Automatically handles overnight shifts (for example, 10:00 PM to 6:00 AM).
  • Subtracts unpaid break minutes.
  • Optionally rounds to the nearest 5, 15, or 30 minutes.
  • Displays total time as HH:MM, decimal hours, and total minutes.

How the Time Calculation Works

1) Convert each time into minutes

For each time input, we convert hours and minutes into total minutes from midnight.

2) Find the difference

End minus start gives the raw duration. If the result is negative, we add 24 hours (1440 minutes) to support overnight shifts.

3) Subtract break time

Any unpaid break is deducted from the shift duration.

4) Apply optional rounding

If selected, the final minutes are rounded to the nearest interval.

Common Real-World Uses

  • Payroll tracking: Keep cleaner records before submitting timesheets.
  • Freelance billing: Convert logged work into decimal hours for invoices.
  • Student planning: Track focused study sessions and breaks.
  • Shift scheduling: Quickly verify planned vs. actual shift duration.

Examples

Example A: Standard day shift

Start: 9:00 AM, End: 5:00 PM, Break: 30 minutes → Total: 7 hours 30 minutes (7.50 hours).

Example B: Overnight shift

Start: 10:00 PM, End: 6:00 AM, Break: 45 minutes → Total: 7 hours 15 minutes (7.25 hours).

Example C: Rounded reporting

Start: 8:07 AM, End: 4:52 PM, Break: 30 minutes, Round to 15 minutes → Useful for simplified timesheet entries.

Tips for Better Time Tracking

  • Record your start and end time immediately to reduce memory errors.
  • Be consistent with break policies (paid vs unpaid).
  • Use decimal hours for billing and HH:MM for scheduling clarity.
  • Review overnight entries carefully if your organization has shift rules.

FAQ

Does this calculator support overnight shifts?

Yes. If your end time is earlier than your start time, the calculator treats it as the next day.

Can I use this as a work hours calculator for payroll?

Yes. It is ideal for quick, accurate estimates. Always confirm with your company’s payroll policy for rounding and overtime rules.

Why show decimal hours?

Decimal hours make invoicing and spreadsheet calculations easier—for example, 7 hours 30 minutes becomes 7.50 hours.

Is my data stored?

No. This single-page calculator runs in your browser and does not submit your inputs to a server.

🔗 Related Calculators