Count Hours Calculator

How many hours did you work between two specific times?

Calculate total hours between start and end times, including overnight shifts and multi-day periods. Handles AM/PM times and displays results in hours and minutes.

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

Think of time calculation like measuring distance on a road trip, but instead of miles between cities, you are measuring minutes between clock times. Your start time is point A, your end time is point B, and the calculator finds the exact duration between them.

The calculator converts both times into minutes since midnight, subtracts to find the difference, then converts back to hours and minutes. When dates are involved, it adds 24 hours for each additional day. Break time gets subtracted from the total working period.

Decimal hours appear because most payroll and billing systems use them. Instead of 8 hours 30 minutes, you see 8.5 hours. Each 15-minute increment equals 0.25 hours, making it easy to multiply by hourly rates or compare against standard work weeks.

When To Use This
Right tool, right situation

Use this calculator whenever you need precise time tracking for payroll, billing, or project management. Freelancers use it to convert work sessions into billable hours. Employees use it to verify timesheet accuracy, especially for irregular shifts or overtime calculations.

It works well for single continuous work periods, project sprints, event durations, and shift scheduling. Contractors find it essential for client billing, while managers use it for resource planning and time allocation analysis.

Do not use this for complex scheduling with multiple break periods throughout the day, or when you need to track time across different time zones. For those situations, dedicated time tracking software handles the complexity better than manual calculation.

Common Mistakes
Why results sometimes look wrong

The biggest mistake is forgetting to account for unpaid breaks when calculating billable or payable hours. Many people calculate 9 AM to 6 PM as 9 hours, but with a 1-hour lunch break, you actually worked 8 hours. This error costs freelancers money and creates payroll problems for employees.

Another common error occurs with overnight shifts where people forget to specify dates. Calculating 11 PM to 7 AM without dates gives negative 16 hours instead of positive 8 hours. Always include start and end dates when your shift crosses midnight.

Rounding errors happen when people convert decimal hours manually. Instead of converting 7.75 hours to 7 hours 45 minutes, they guess 7 hours 30 minutes. Use a calculator for decimal-to-minutes conversion, or stick with decimal format for billing purposes.

The Math
Worked examples and deeper derivation

Time calculation relies on converting everything to a common unit, typically minutes, then converting back to readable format. Each hour contains exactly 60 minutes, so 8.5 hours equals 8 hours plus 30 minutes.

For overnight shifts, the calculator adds 24 hours (1,440 minutes) for each date transition. A shift from 11 PM to 7 AM spans 8 hours, calculated as 7:00 AM (420 minutes from midnight) minus 11:00 PM (previous day, so 420 + 1440 - 1380 = 480 minutes total).

Break time subtracts directly from total time. If you work 9 hours with a 1-hour lunch, your billable time is exactly 8 hours. The math stays simple: total duration minus break duration equals working duration.

Freelancer billing client for project work
Started at 9:15 AM, finished at 6:45 PM, took 45 minutes for lunch
Total working time is 8 hours 45 minutes, which equals 8.75 decimal hours. Bill the client for 8.75 hours at your hourly rate.
Night shift nurse calculating overtime
11 PM Sunday to 7:30 AM Monday with two 15-minute breaks
Total span is 8.5 hours, minus 30 minutes breaks equals 8 hours worked. Any hours over your standard shift count toward overtime pay.
Project manager tracking sprint duration
Sprint started Monday 9 AM, ended Friday 5 PM across 5 days
Total elapsed time is 104 hours, but actual working hours depend on your team schedule. Use this for sprint retrospectives and planning.
Expert Unlock
The thing most explanations skip

Most time tracking errors stem from inconsistent break handling across different calculation methods. Some systems automatically deduct standard break times, while others require manual entry. When auditing timesheets, always verify whether break time was included or excluded in the original calculation to avoid double-counting deductions.

How do I handle overnight shifts and time zones?

How do I calculate hours for overnight shifts?
Enter the start date and end date along with your times. For example, if you work 11 PM Sunday to 7 AM Monday, enter Sunday as start date and Monday as end date. The calculator automatically handles the day transition.
Should I include lunch breaks in my time calculation?
Include unpaid break time in the break field to get accurate working hours. Most employers require deducting 30-60 minutes for lunch breaks. Paid breaks typically stay included in your total time.
Can I use this for calculating billable hours across multiple projects?
This calculator works for single time periods only. For multiple projects, calculate each time block separately then add the decimal hours together. Most billing systems require separate line items per project anyway.

Need something this doesn't cover?

Suggest a tool — we'll build it →