Hours Calculator

How many hours between two times?

Calculate the exact hours and minutes between two times, with optional break deductions. Perfect for tracking work hours, project time, or any time-based calculations.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Time calculation works like a stopwatch, but in reverse. Instead of starting a timer, you tell the calculator when you started and stopped, and it figures out the elapsed time. The math subtracts your start time from your end time, then subtracts any unpaid breaks.

Most people think in hours and minutes (8 hours, 30 minutes), but payroll systems often need decimal hours (8.5 hours). This calculator shows both formats because different situations need different numbers. Freelancers billing clients usually quote decimal hours, while shift workers track hours and minutes.

Break time only counts if it is unpaid. Those 15-minute coffee breaks that most employers pay for should not be entered here. Only lunch breaks, long personal breaks, or other unpaid time gets deducted from your total.

When To Use This
Right tool, right situation

Use this calculator for timesheet tracking, freelance billing, project time logging, and any situation where you need precise time differences. It works perfectly for regular work shifts, client consultations, study sessions, and billable hours.

Do not use this for shifts longer than 24 hours or shifts that span multiple days. The calculator assumes start and end times are within the same calendar day. For multi-day projects, track each day separately then add the totals.

This tool is ideal when you need both traditional time format (hours and minutes) and decimal format for billing systems. Many payroll and invoicing systems require decimal hours, while humans prefer hours and minutes.

Common Mistakes
Why results sometimes look wrong

The biggest mistake is forgetting to convert 12-hour to 24-hour time in your head. 12:30 PM is not 12:30 in the afternoon — it is 30 minutes past noon. Many people accidentally enter 12:30 AM when they mean midnight, or 12:30 PM when they mean noon.

Another common error is including paid breaks in the break time field. If your employer pays you for short breaks, do not deduct that time. Only unpaid lunch breaks and extended personal time should be entered as break time.

The third mistake happens with overnight shifts. This calculator works for single-day shifts only. If you work from 11 PM Monday to 7 AM Tuesday, you need to split this into two calculations: 11 PM to midnight (1 hour) plus midnight to 7 AM (7 hours) equals 8 hours total.

The Math
Worked examples and deeper derivation

The calculation converts everything to minutes first, then converts back to hours. 9:30 AM becomes 570 minutes from midnight (9 × 60 + 30). 5:45 PM becomes 1065 minutes (17 × 60 + 45). The difference is 495 minutes, which equals 8 hours and 15 minutes.

Decimal hours divide total minutes by 60. So 495 minutes ÷ 60 = 8.25 hours. This decimal format makes it easy to multiply by hourly rates for billing. Someone earning $25 per hour who worked 8.25 hours earned $206.25.

For shifts that cross midnight, the calculator assumes your end time is the next day if it comes before your start time. A shift from 11 PM to 3 AM automatically calculates as 4 hours, not negative time.

Freelancer tracking project time
Started at 9:15 AM, finished at 2:30 PM, took 20 minutes for coffee breaks
Result shows 4 hours, 55 minutes (4.92 decimal hours). Perfect for invoicing clients who pay hourly rates.
Restaurant worker with split shift
Lunch shift 11:00 AM to 2:00 PM, no break since it was busy
Shows exactly 3 hours worked. Use this for each shift separately, then add them together for daily totals.
Student timing study session
Started studying at 7:30 PM, finished at 11:15 PM, took 15-minute break
Studied for 3 hours, 30 minutes (3.5 hours). Track productive study time by deducting phone breaks and interruptions.
Expert Unlock
The thing most explanations skip

Professional time tracking often requires precision to the nearest 6-minute increment (0.1 hours) for billing purposes. Many law firms and consulting companies round to these intervals. The decimal output makes this rounding easier — 8.23 hours rounds to 8.2, while 8.27 hours rounds to 8.3.

How do I calculate hours worked with breaks?

What time formats can I use?
Use standard formats like 9:00 AM, 5:30 PM, or 24-hour time like 21:30. The calculator accepts both AM/PM and military time formats. You can also enter times without minutes, like 9 AM or 17 for 5:00 PM.
How do I calculate overnight shifts?
This calculator works for shifts within the same day only. For overnight shifts that cross midnight, calculate each day separately then add the totals together.
Should I include paid breaks in break time?
Only enter unpaid break time in the break field. Paid breaks like 15-minute coffee breaks should not be deducted since you are compensated for that time.

Need something this doesn't cover?

Suggest a tool — we'll build it →