Enter a start and end date/time to instantly calculate the total hours between them in your browser.
9:00 AM) or 24-hour (09:00) format. Add seconds if needed (9:00:30). The calculator parses both formats automatically.11:00 PM to 7:00 AM), enable the cross-midnight option or add a date to the inputs so the calculator wraps to the next day instead of returning a negative duration.H hours, M minutes, S seconds, as HH:MM:SS, and as decimal hours (the format payroll, billing, and spreadsheets use). All math runs in your browser — no sign-up, no upload.Time-arithmetic looks simple but breaks in three places: subtracting across midnight, converting h:m into decimal hours for billing or Excel, and handling the two days per year when local time skips or repeats an hour (DST). A pocket calculator gets all three wrong; this tool gets them right.
2:45 PM to 4:00 PM returns 1.25 h instantly, ready to drop into a billing entry.-16 hours; with the cross-midnight toggle it correctly returns 8 hours.=(End-Start)*24 produces decimal hours but returns a negative number across midnight; the calculator matches the corrected =MOD(End-Start,1)*24 formula so spreadsheet exports line up.Use this table to sanity-check decimal results or convert by hand:
| Minutes | Decimal hour | Minutes | Decimal hour |
|---|---|---|---|
| 5 | 0.083 | 35 | 0.583 |
| 10 | 0.167 | 40 | 0.667 |
| 15 | 0.25 | 45 | 0.75 |
| 20 | 0.333 | 50 | 0.833 |
| 25 | 0.417 | 55 | 0.917 |
| 30 | 0.50 | 60 | 1.00 |
Formula: decimal hour = minutes / 60. A reading of 3h 15m is 3.25 decimal hours; 7h 45m is 7.75; 8h 20m is 8.333…. Most payroll systems round to two or three decimal places.
| Scenario | What goes wrong | What the calculator does |
|---|---|---|
| End time earlier than start (e.g. 11 PM → 7 AM) | Naive subtraction returns a negative duration | Toggle cross-midnight or supply dates; wraps +24 h |
| Spring forward — March 8, 2026, 2:00 AM | Local time jumps to 3:00 AM; 2:30 AM never happens | With dates enabled, computes elapsed UTC and reports 11 h for a 9 PM → 9 AM Sat-Sun shift |
| Fall back — November 1, 2026, 2:00 AM | 1:00–2:00 AM occurs twice; ambiguous local time | Same 9 PM → 9 AM shift returns 13 h |
| 12-hour vs 24-hour confusion | 12:30 PM typed as 12:30 (midday) or 00:30 (post-midnight)? |
Accepts both AM/PM suffix and 24-hour input; preview echoes the parsed value before computing |
| Working hours minus lunch | Manual math: 8:30 − 0:30 = 8:00; easy to mis-tally weekly | Break minutes are subtracted in the same step; weekly totals stay in decimal |
Excel =(B2-A2)*24 across midnight |
Returns a negative decimal | Match =MOD(B2-A2,1)*24 (Exceljet recipe) — works only inside 24 h; use dates for longer |
Time-only inputs assume a single calendar day. 7:00 minus 23:00 is -16 hours. Fix it one of two ways: (a) enable the cross-midnight toggle so the calculator adds 24 hours when end < start, returning 8 h; or (b) enter both dates explicitly — Mon 23:00 to Tue 07:00. Method (b) is the only correct option if the gap is longer than 24 hours, because cross-midnight only adds a single day.
In 2026 the U.S. springs forward on March 8 at 2:00 AM (clocks jump to 3:00 AM — the hour 2:00–2:59 AM does not exist) and falls back on November 1 at 2:00 AM (clocks roll to 1:00 AM — the hour 1:00–1:59 AM happens twice). A "9 PM Saturday to 9 AM Sunday" interval is 11 hours across the spring forward and 13 hours across the fall back, even though both look like "12 hours" on a clock. Enable dates so the calculator anchors each timestamp to a specific civil time and computes the real elapsed duration.
Yes. 9:30 AM, 9:30 a.m., 09:30, and 9:30 (assumed AM) all parse the same. For evening times use 9:30 PM or 21:30. Mixing formats between the two inputs is fine — the calculator normalizes before subtracting. Watch out for 12:00 AM (midnight, = 00:00) versus 12:00 PM (noon, = 12:00); these are the two values people most often type backward.
A decimal hour is the duration written as a base-10 number instead of H:MM. Fifteen minutes is 0.25 hour, 30 minutes is 0.50 hour, 45 minutes is 0.75 hour. Payroll, legal billing, and consulting time-tracking use decimal hours because you multiply hours × rate to get dollars, and 7.75 × $80 is trivial while 7:45 × $80 is not. Most timekeeping systems (ADP, Gusto, QuickBooks Time, Clio) export in decimal hours to two or three decimal places.
Enter the total break minutes in the "Break" or "Lunch deduction" field. The result subtracts that many minutes from the gross duration. Example: 9:00 AM → 5:30 PM is 8.5 gross hours; with a 30-minute unpaid lunch the net is 8.0 hours. For multiple unpaid breaks (e.g. two 15-minute coffee breaks plus a 30-minute lunch), sum them to 60 minutes and enter that.
That depends on intent. If you meant a cross-midnight shift, enable the cross-midnight toggle so the calculator adds 24 hours. If the inputs are simply reversed, swap them. The calculator does not silently flip — it will either return a negative duration (so you notice) or wrap to the next day, depending on the toggle. This matches behavior of payroll software, which treats negative durations as input errors.
For times on the same day: =(End - Start) * 24 returns decimal hours (multiply by 24 because Excel stores time as a fraction of a day). For times that may cross midnight within 24 hours: =MOD(End - Start, 1) * 24 (Exceljet's recipe). For arbitrary date-times use =(EndDateTime - StartDateTime) * 24. Format the result cell as Number, not Time, so values like 8.5 display correctly instead of being interpreted as 8:30 AM.
The calculator works in seconds and outputs decimal hours to three decimal places (0.001 h = 3.6 seconds). For payroll, two decimals (0.01 h = 36 seconds) is industry standard. Legal billing typically rounds to the nearest tenth (0.1 h = 6 minutes). The calculator shows full precision so you can apply your own rounding rule.
This tool computes the duration between two civil-time stamps. If your start and end are in different time zones, convert both to a single zone first (or to UTC) before entering. For Unix epoch conversions paired with civil time, see Convert Date to Timestamp and Convert Timestamp to Date, both of which respect IANA time zones.
Yes. All parsing and arithmetic happen in your browser using client-side JavaScript. Once the page is loaded, no further network requests are made — the calculator works without an internet connection and never sends your times to a server.