Hours Calculator
How many hours between two times?
Calculate the exact hours and minutes between any start and end time, automatically handling overnight shifts and day crossings for accurate time tracking.
—
Send feedback
💡 Share your idea or report a problem
✓ Thanks! We'll take a look.
Learn more
How It Works
The formula, explained simply
Think of time calculation like measuring distance on a clock face. When you drive from mile marker 10 to mile marker 50, you traveled 40 miles. Similarly, from 2:00 PM to 6:00 PM, you worked 4 hours. The calculator converts times to minutes since midnight, subtracts start from end, then converts back to readable hours and minutes.
The tricky part happens with overnight shifts. If you start at 11 PM and end at 3 AM, the calculator recognizes that 3 AM means the next day. It adds 24 hours to the end time before calculating the difference. This prevents the impossible result of negative hours.
Decimal hours appear because payroll systems and billing software often require time in decimal format. Instead of 8 hours and 30 minutes, you need 8.5 hours. The calculator provides both formats so you can use whichever your system requires without manual conversion.
When To Use This
Right tool, right situation
Use this calculator for any time tracking that requires precision: employee timesheets, freelance billing, project management, or study session tracking. It handles the two most common scenarios: standard day shifts and overnight shifts that cross midnight.
The calculator works perfectly for single-location time tracking where everyone uses the same timezone. It also handles any duration up to 24 hours, covering double shifts, overnight duties, or extended work sessions.
Do not use this calculator for multi-day periods, different timezone calculations, or duration tracking that includes breaks. For payroll across multiple days, calculate each day separately and sum the totals. For timezone-sensitive scheduling, convert all times to the same timezone first, then calculate duration.
Common Mistakes
Why results sometimes look wrong
The most common mistake is forgetting that 0.5 hours equals 30 minutes, not 50 minutes. People often think 1.3 hours means 1 hour and 30 minutes, when it actually means 1 hour and 18 minutes. This decimal confusion leads to payroll errors and billing disputes.
Another frequent error involves overnight calculations. Many people manually calculate 11 PM to 3 AM as 4 hours by counting backwards, but then double-check by going forward and get confused. The key insight is that any end time before start time automatically means the next day.
Rounding creates the third major mistake. Some people round 37 minutes to 40 minutes for easier math, but this 3-minute error compounds across multiple shifts. Over a two-week pay period, this could mean 30 minutes of unpaid time or overpayment, depending on the rounding direction.
The Math
Worked examples and deeper derivation
Time calculation uses base-60 arithmetic inherited from ancient Babylonian mathematics. Unlike our base-10 number system, time counts 60 minutes per hour and 60 seconds per minute. This creates conversion complexity that most people handle poorly without a calculator.
To convert minutes to decimal hours, divide by 60. To convert decimal hours back to hours and minutes, multiply the decimal portion by 60. For example, 2.75 hours equals 2 hours plus 0.75 × 60 = 45 minutes. The calculator performs these conversions instantly while avoiding rounding errors.
Crossing midnight adds another layer of complexity. The calculator treats any end time earlier than start time as occurring the next day. This assumes a maximum 24-hour duration, which covers nearly all real-world time tracking scenarios. For longer periods, break the calculation into multiple days.
Expert Unlock
The thing most explanations skip
Professional time tracking systems often require 15-minute increments for billing purposes. If your result shows 2 hours and 37 minutes, you might need to round to 2 hours and 45 minutes depending on your billing policy. Some industries round down, others round up, and some round to the nearest quarter-hour.
How does the hours calculator handle overnight shifts?
Need something this doesn't cover?
Suggest a tool — we'll build it →