Hours Calculator — Free Online Hours Between Two Times
Calculate the hours and minutes between any two times of day. Supports overnight calculations with a midnight crossing toggle and provides results in multiple formats.
Start Time
End Time
Time Duration
Total Minutes
480
Decimal Hours
8.00
Formatted Duration
8h 00m
From 09:00 to 17:00
How to Use the Hours Calculator
- Enter the start time: Use the Hour (0-23) and Minute (0-59) fields under "Start Time" to set when your time period begins. The calculator uses 24-hour format, so 3:00 PM is entered as hour 15. The default start time is 9:00, representing a typical workday start.
- Enter the end time: Use the corresponding Hour and Minute fields under "End Time" to set when your time period ends. The default is 17:00 (5:00 PM), the standard end of an 8-hour workday.
- Enable Crosses Midnight if applicable: If your end time is on the following day (for example, a night shift from 22:00 to 06:00), toggle the "Crosses Midnight" switch. This tells the calculator to add 24 hours to the end time internally, producing the correct duration instead of a 16-hour backward calculation.
- Review the results: The results panel shows the duration in hours and minutes prominently, along with total minutes, decimal hours, and a formatted summary showing the time range. Decimal hours are particularly useful for payroll and billing applications where time needs to be multiplied by hourly rates.
All results update instantly as you change inputs. Try different time combinations to compare shift lengths, plan meetings, or estimate travel durations.
Hours Calculation Formula
Duration = End Time - Start Time (in minutes) If Crosses Midnight: Duration = (End Time + 1440) - Start Time Decimal Hours = Total Minutes / 60 Variables Explained
- Start Time (minutes): Calculated as Start Hour x 60 + Start Minute. For example, 9:30 becomes (9 x 60) + 30 = 570 minutes from midnight.
- End Time (minutes): Calculated as End Hour x 60 + End Minute. For 17:00, this is (17 x 60) + 0 = 1,020 minutes from midnight.
- 1,440: The total number of minutes in a 24-hour day. This constant is added to the end time when the Crosses Midnight option is enabled to account for the day transition.
- Duration (minutes): The absolute difference between end and start times, expressed in total minutes. This is then divided by 60 to extract hours and the remainder gives minutes.
- Decimal Hours: The duration expressed as a decimal number. Calculated by dividing total minutes by 60. For example, 480 minutes / 60 = 8.00 decimal hours.
Step-by-Step Example
Calculate hours from 9:15 to 17:45:
- Convert start time: (9 x 60) + 15 = 555 minutes
- Convert end time: (17 x 60) + 45 = 1,065 minutes
- Calculate difference: 1,065 - 555 = 510 minutes
- Extract hours: floor(510 / 60) = 8 hours
- Extract remaining minutes: 510 mod 60 = 30 minutes
- Calculate decimal hours: 510 / 60 = 8.50
- Result: 8 hours 30 minutes (8.50 decimal hours)
Practical Examples
Example 1: David's Standard Workday
David works from 8:30 AM to 5:00 PM with a 30-minute lunch break. He needs to log his hours for his timesheet. Using the hours calculator with start time 8:30 and end time 17:00:
- Start: 08:30, End: 17:00
- Total time: 8 hours 30 minutes (510 minutes)
- Minus 30-minute lunch: 8 hours 0 minutes
- Decimal hours for timesheet: 8.00
David logs 8.00 hours on his timesheet. His company pays overtime after 40 hours per week, so he uses the calculator each day to track whether he is approaching the overtime threshold. For weekly tracking with automatic break deductions, our time card calculator handles this automatically.
Example 2: Maria's Night Shift
Maria is a nurse working the night shift from 11:00 PM to 7:30 AM. She enables the Crosses Midnight toggle since her shift spans two calendar days:
- Start: 23:00, End: 07:30, Crosses Midnight: On
- Total time: 8 hours 30 minutes
- Total minutes: 510
- Decimal hours: 8.50
Without the Crosses Midnight toggle, the calculator would show 15 hours 30 minutes (the backward duration from 07:30 to 23:00). The toggle correctly interprets the overnight shift as 8 hours 30 minutes. Maria converts this to 8.50 decimal hours for her payroll system.
Example 3: Tom's Freelance Billing
Tom is a freelance web developer who bills clients hourly at $120/hour. He started working on a project at 13:15 and finished at 18:45. He needs to calculate billable hours for his invoice:
- Start: 13:15, End: 18:45
- Duration: 5 hours 30 minutes
- Decimal hours: 5.50
- Invoice amount: 5.50 x $120 = $660
Tom bills 5.50 hours at $120/hour for a total of $660. The decimal hours format makes multiplication straightforward, which is why many billing systems prefer this format over hours-and-minutes. For financial calculations, our days between dates calculator can help track project timelines.
Example 4: Lisa's Study Session Planning
Lisa is preparing for final exams and wants to track her study hours. She studies from 19:00 to 23:45 on weekday evenings. She wants to know how many hours she is putting in per session:
- Start: 19:00, End: 23:45
- Duration: 4 hours 45 minutes
- Total minutes: 285
- Decimal hours: 4.75
Lisa studies 4.75 hours per session. Over a five-day week, that totals 23.75 hours of focused study time. She can adjust her schedule based on these calculations to meet her target of 25 study hours per week.
Decimal Hours Conversion Reference Table
| Minutes | Decimal Hours | Fraction | Common Use |
|---|---|---|---|
| 5 min | 0.08 | 1/12 | Quick phone call |
| 10 min | 0.17 | 1/6 | Minimum billing increment |
| 15 min | 0.25 | 1/4 | Quarter-hour billing |
| 20 min | 0.33 | 1/3 | Standard break |
| 30 min | 0.50 | 1/2 | Lunch break / half hour |
| 45 min | 0.75 | 3/4 | Class period / meeting |
Tips and Complete Guide
Payroll and Timesheet Applications
For payroll purposes, most employers require time entries in decimal hours because it simplifies wage calculations. To convert your hours and minutes to decimal format, divide the minutes portion by 60 and add it to the whole hours. For example, 7 hours 45 minutes becomes 7 + (45/60) = 7.75 hours. At a rate of $25/hour, that equals $193.75. Our calculator automatically provides this decimal conversion, saving you the manual math. Many payroll systems round to the nearest quarter hour (0.25), so check your employer's rounding policy.
Understanding the Fair Labor Standards Act
Under the U.S. Fair Labor Standards Act (FLSA), non-exempt employees must receive overtime pay at 1.5 times their regular rate for hours worked beyond 40 in a workweek. Accurate hour calculation is essential for both employers and employees. If you work 42.5 hours in a week, 40 hours are paid at the regular rate and 2.5 hours at 1.5x. Our hours calculator helps you track daily hours precisely so you can determine whether you are approaching or exceeding the weekly overtime threshold.
Working with Different Time Zones
If you are tracking hours for a remote team across time zones, first convert all times to a common time zone (usually UTC or your company's headquarters time zone) before calculating durations. For example, if a team member in London (UTC+0) works from 9:00 to 17:00, and you are tracking in New York time (UTC-5), their work hours translate to 4:00 AM to 12:00 PM ET. Our time zone calculator can help with these conversions.
Common Mistakes to Avoid
- Forgetting the midnight toggle for overnight shifts: If your end time is earlier than your start time and you do not enable Crosses Midnight, the calculator computes the reverse duration. Always check that the result matches your expectation for overnight periods.
- Confusing decimal hours with hours and minutes: 7.5 decimal hours is 7 hours 30 minutes, not 7 hours 50 minutes. The decimal portion represents a fraction of 60 minutes, not a percentage. This is the most common error in payroll calculations.
- Not deducting break time: The hours calculator shows total time between start and end. If you take breaks, you need to subtract them manually. For automatic break handling, use the time card calculator.
- Using 12-hour format values: Entering 5 when you mean 5:00 PM (17:00) will calculate from morning, not afternoon. Double-check that you have converted PM times by adding 12 to the hour.
- Rounding too early: If you need decimal hours for billing, use the exact decimal value rather than rounding the hours and minutes separately. Rounding 7 hours 22 minutes to 7 hours 20 minutes before converting loses 2 minutes of billable time per entry.
Frequently Asked Questions
The 'Crosses Midnight' toggle tells the calculator that the end time is on the following day, not the same day as the start time. Without this option, if you enter a start time of 22:00 and an end time of 06:00, the calculator computes the absolute difference (16 hours). With Crosses Midnight enabled, it correctly calculates 8 hours by adding 24 hours to the end time before computing the difference. Always enable this toggle when the end time represents a time on the next calendar day relative to the start time.
Decimal hours express time as a decimal fraction of an hour rather than hours and minutes. For example, 7 hours 30 minutes equals 7.50 decimal hours, and 2 hours 15 minutes equals 2.25 decimal hours. Decimal hours are commonly used in payroll systems, billing software, and project management tools because they simplify mathematical operations like multiplication (hours x hourly rate = pay). Many timesheet and accounting programs require time entries in decimal format.
To convert minutes to decimal hours, divide the minutes by 60. Common conversions: 15 minutes = 0.25 hours, 30 minutes = 0.50 hours, 45 minutes = 0.75 hours. For odd values, 10 minutes = 0.17 hours, 20 minutes = 0.33 hours, 40 minutes = 0.67 hours. Our calculator automatically provides the decimal hours conversion alongside the standard hours and minutes display, so you do not need to perform this conversion manually.
Yes, this calculator is ideal for shift work. Enter your shift start time and end time, and enable Crosses Midnight if your shift spans overnight. For example, a night shift from 23:00 to 07:00 with Crosses Midnight enabled correctly shows 8 hours. For tracking multiple shifts across a week with break deductions, use our time card calculator which provides weekly totals and overtime calculations.
The hours calculator focuses on finding the total duration between a start and end time, making it ideal for work hours, shift lengths, and scheduling. The time difference calculator adds directional information (which time is earlier or later) and is designed more for comparing two arbitrary times, such as determining how far apart two events are. Both use the same underlying calculation, but the presentation and typical use cases differ.
The calculation is accurate to the minute. It uses integer arithmetic to compute the difference in total minutes between the start and end times, then converts to hours and remaining minutes. There is no rounding error because the calculation works entirely in whole minutes. For second-level precision, use our time duration calculator which accepts hours, minutes, and seconds.
Yes, you can calculate any duration from 0 minutes to 24 hours (or beyond with the Crosses Midnight option). Simply enter any valid start and end time. Common partial-day calculations include half days (4 hours), school days (6-7 hours), standard work shifts (8 hours), and extended shifts (10-12 hours). The calculator handles all durations within the 0-24 hour range directly, and beyond 24 hours when Crosses Midnight is enabled.
For a single day with a lunch break, calculate the total time from start to end, then mentally subtract your break duration. For example, 9:00 to 17:00 is 8 hours; subtract a 30-minute lunch for 7.5 hours of actual work. For automatic break deductions across multiple days, use our time card calculator, which includes a break column for each day entry and deducts breaks before computing totals.
Related Calculators
Time Calculator
Add or subtract hours, minutes, and seconds from any time with day overflow detection.
Time Card Calculator
Track weekly work hours with daily entries, break deductions, and overtime calculations.
Time Duration Calculator
Find the exact duration between two times in hours, minutes, seconds, and decimal hours.
Time Difference Calculator
Calculate the difference between two times with direction indicator and midnight crossing.
Days Between Dates
Calculate the exact number of days, weeks, and months between any two calendar dates.
Salary Calculator
Calculate annual, monthly, biweekly, and hourly salary equivalents with tax estimates.
Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.
Last updated: February 23, 2026
Sources
- U.S. Department of Labor — Fair Labor Standards Act, Overtime Requirements
- ISO 8601 Date and Time Standard — International Organization for Standardization
- timeanddate.com — Time Zone and Duration Calculator Reference