Hours Calculator
Find the hours and minutes between two times, or between two dates and times. Decimal hours, a break deduction, and rounding are included. The calculation runs in your browser. A weekly timesheet or gross pay belongs in a future Time Card Calculator, not on this page.
Hours in common periods
These are clock hours, 24 in each civil day. The average year uses the Gregorian mean length of 365.2425 days, so an average month is that year divided by 12. A real century can differ by one leap day when a year divisible by 100 is not divisible by 400.
| Period | Hours |
|---|---|
| Day | 24 hours |
| Week | 168 hours (7 × 24) |
| 28-day month | 672 hours |
| 29-day month | 696 hours |
| 30-day month | 720 hours |
| 31-day month | 744 hours |
| Average month | 730.485 hours |
| 365-day year | 8,760 hours |
| 366-day year | 8,784 hours |
| Average year | 8,765.82 hours |
| Decade | 87,658.2 hours |
| Century | 876,582 hours |
Hours Calculator for Times and Dates
An hours calculator answers a smaller question than a timesheet. You have a start and an end, and you want the length of that span in hours and minutes, as a decimal, and as a raw count of minutes and seconds.
This page does that twice. One calculator uses two clock times and treats an earlier end time as the next day. The other uses two dates with times, then splits the same elapsed interval into days, hours, and minutes. Both can subtract an unpaid break and round to the nearest 5, 6, 15, or 30 minutes.
It lives in the Calculators suite beside the age and BMI calculators. A weekly timesheet or a pay rate is a different job, and that belongs in a future Time Card Calculator rather than here.
How the elapsed time is measured
Each clock time is parsed with date-fns into an hour and minute on a calendar day. For two times with no dates, both start on today. If the end is earlier than the start, the end is moved one day forward with addDays, and the result says so. The length is differenceInSeconds between those two instants, converted to whole minutes because the fields only accept minutes.
An unpaid break is a whole number of minutes subtracted after that conversion and before rounding. Rounding uses ordinary half-up rounding to the nearest 5, 6, 15, or 30 minutes. Six minutes is one tenth of an hour. A span of 8 hours 20 minutes is 500 minutes, and the nearest multiple of 15 is 495 minutes, shown as 8 hours 15 minutes and 8.25 decimal hours. With no rounding, 9:00 AM to 5:30 PM is 8 hours 30 minutes, 8.50 decimal hours, 510 minutes, and 30,600 seconds.
Date ranges use the same elapsed-time rule on the exact instants you pick. From 1 January 2026 at 09:00 to 3 January 2026 at 15:30, the clock difference is 2 days, 6 hours, and 30 minutes when your timezone offset does not change. That is 54 hours 30 minutes, 54.50 decimal hours, 3,270 minutes, and 196,200 seconds. If the timezone offset at the start differs from the offset at the end, the page names the daylight-saving shift in minutes. Elapsed time then follows the real interval, not a subtraction of the two clock faces.
A 12-hour clock repeats the numbers 1 through 12 twice, so the AM/PM marker is part of the time. Midnight is 12:00 AM and noon is 12:00 PM. A 24-hour clock counts 00 through 23 and does not need a marker: 17:30 is the same moment as 5:30 PM. Switching the control on this page changes which hour field is accepted. It does not change the length of a span.
How to use the hours calculator
Choose two times or two dates
Two times is a pair of clock readings. Two dates adds a calendar date to each reading and shows a days, hours, and minutes breakdown as well as the total hours.
Set the 12-hour or 24-hour clock
In 12-hour mode each time has an hour, a minute, and AM or PM. In 24-hour mode the hour runs from 0 to 23 and the AM/PM selector is hidden.
Enter the times or press Now
Type the hour and minute, or press Now to fill that side from the current clock. On the date calculator, Today changes only the date and Now fills both the date and the time. Swap exchanges the two ends.
Subtract a break or round, if you need to
Leave the break blank for the full span. A break is removed before rounding. Choose no rounding or the nearest 5, 6, 15, or 30 minutes. The result updates as you type.
Copy the result or the link
Copy puts the hours, decimal, minutes, and seconds on the clipboard and shows a confirmation. Copy link copies the address, which already contains the current entries as query parameters, so the same calculation can be bookmarked. Reset restores the 9:00 AM to 5:30 PM example. Ctrl or Cmd + Enter moves to the result. Esc restores the example when you are not typing in a field.
Key Features
Hours between two times
Hour and minute fields, an AM/PM selector in 12-hour mode, and a Now button on each side. An earlier end time is counted on the next day and the result says so.
Hours between two dates
Each end has a date and a time, plus Today, Now, and Swap. The result lists total hours and the days, hours, and minutes inside that total.
Break and rounding
An optional unpaid break in whole minutes is removed before the result is rounded to the nearest 5, 6, 15, or 30 minutes.
Add or subtract a duration
Start from a clock time and add or subtract hours and minutes. The answer is the resulting clock time and whether that lands on the same day, a later day, or an earlier day.
Decimal conversion
7.75 decimal hours becomes 7 hours 45 minutes. The other direction turns 2 hours 15 minutes into 2.25 decimal hours.
Who Needs This Tool?
Anyone timing a single span
A shift, a meeting, a journey, or a rental is one start and one end. The hours and the decimal are the numbers a form usually wants.
People comparing a clock with a decimal
8 hours 30 minutes and 8.50 are the same length. Seeing both, plus the minute and second counts, makes a truncated decimal obvious.
Planners who already know the calendar date
When the question is which weekday a deadline lands on, the business days calculator skips Saturdays and Sundays. This page measures a duration, not a count of working dates.
Tips for Best Results
This is not a pay calculator
There is no hourly rate, overtime multiple, or weekly timesheet. Those belong in a future Time Card Calculator. The break field only shortens the duration.
Rounding changes the seconds as well
After rounding, the seconds are the rounded minutes multiplied by 60. They are not a leftover from the unrounded clock.
A week number is a different question
The hours table lists 168 hours in a week of seven 24-hour days. The week number finder returns the ISO week for a date you type, which does not tell you how long a shift lasted.
Frequently Asked Questions
What happens if the end time is earlier than the start?
On the two-times calculator the end is placed on the next day and the result includes a note that says so. 10:00 PM to 6:00 AM is 8 hours 0 minutes, 8.00 decimal hours, 480 minutes, and 28,800 seconds. On the two-dates calculator an earlier end is rejected, and Swap is there if the two ends were entered in the wrong order.
How are decimal hours calculated?
Decimal hours are the net minutes divided by 60, shown to two decimal places. 8 hours 30 minutes is 510 minutes, and 510 divided by 60 is 8.50. The same minute count multiplied by 60 is the total seconds.
Does a date range account for daylight saving?
Yes. The duration is the difference between the two instants, not a subtraction of the clock numbers alone. If your timezone offset changes between the start and the end, the result states how many minutes the clocks shift. That note only appears when the offsets actually differ.
How does the unpaid break work?
Enter whole minutes, or leave the field blank for no break. The minutes are removed from the span before rounding. A 9:00 AM to 5:30 PM span is 8 hours 30 minutes, and a 30-minute break leaves 8 hours 0 minutes. A break longer than the span is rejected.
Can I bookmark a calculation?
Yes. The page writes the current entries into the address as query parameters. Copy link puts that address on the clipboard. Opening it again restores the same times, dates, break, and rounding.
Are the times I enter uploaded?
No. The times and dates are calculated in your browser. The last entries are also saved in localStorage on this device so they are here when you come back, and Reset clears that saved copy. The site measures page views with analytics, but this calculator does not send the times anywhere to be processed.
What does rounding to the nearest 6 minutes mean?
Six minutes is 0.1 hour. After the break is removed, the minute total is rounded to the nearest multiple of 6. The 5, 15, and 30 minute choices use the same half-up rule with a different step. A span of 8 hours 20 minutes is 500 minutes, and the nearest multiple of 15 is 495 minutes, shown as 8 hours 15 minutes and 8.25 decimal hours.
Conclusion
Example 1. Start 9:00 AM, end 5:30 PM, 12-hour clock, no break, no rounding. The result is 8 hours 30 minutes, 8.50 decimal hours, 510 minutes, and 30,600 seconds. The end is later on the same day, so there is no next-day note.
Example 2. Start 10:00 PM, end 6:00 AM. The end is earlier, so it is counted on the next day. The result is 8 hours 0 minutes, 8.00 decimal hours, 480 minutes, and 28,800 seconds.
Example 3. Start 1 January 2026 at 09:00 and end 3 January 2026 at 15:30, with no break, no rounding, and no daylight-saving shift in your timezone. The result is 54 hours 30 minutes, which is 2 days, 6 hours, and 30 minutes. That is 54.50 decimal hours, 3,270 minutes, and 196,200 seconds. Adding 3 hours 30 minutes to 11:40 PM lands at 3:10 AM, one day later. 7.75 decimal hours is 7 hours 45 minutes, and 2 hours 15 minutes is 2.25 decimal hours.
More in Calculators
Age Calculator
Calculate your exact age in years, months, and days from your date of birth, plus total days lived and next birthday.
BMI Calculator
Calculate your Body Mass Index from height and weight, with the health category and ideal weight range.
JSON Formatter & Validator
Format, minify, and validate JSON with clear error messages plus key count and nesting depth statistics.
UUID Generator
Create cryptographically random RFC 4122 Version 4 UUIDs individually or in bulk.