What is a time difference calculator?
A time difference calculator measures the length of the span between two clock times: you give it a start time and an end time, and it returns how much time sits between them, as hours, minutes and seconds, as a decimal number of hours, and as total minutes and total seconds. People arrive at it with plain questions. What are the hours between two times? How many hours between the start of my shift and the end of it? A time duration calculator, a time difference calculator and an hours-between calculator are three names for the same arithmetic, and this page answers all three at once, because the honest answer is one subtraction looked at from several angles, not three different numbers.
The subtraction sounds trivial until you try it in your head at the end of a long day. Clock arithmetic is awkward because it borrows in sixties, not tens: taking 09:15 away from 17:45 is easy, but taking 09:50 away from 17:20 means borrowing an hour as 60 minutes, and an overnight span such as 22:30 to 06:15 breaks the same-day method completely. Those two cases, borrowing across the hour and crossing midnight, are where mental arithmetic and rough spreadsheet formulas most often go wrong, and they are exactly the cases this tool is built to handle without fuss.
This page is built around two worked examples so you can verify everything before trusting it with your own times. The calculator opens pre-filled with 09:15 to 17:45, a span of 8 hours 30 minutes, and the guide also works the overnight example of 22:30 to 06:15 the next day, a span of 7 hours 45 minutes. If both examples check out by hand, the method is doing what it claims, and every other pair of times follows the same arithmetic.
How this time difference calculator works
The engine does one thing, and does it the way a careful person would do it on paper. First, both times are converted into seconds since midnight: hours multiplied by 3,600, plus minutes multiplied by 60, plus the seconds if you entered any. Second, the day handling is applied: if the end time is set to the next day, 86,400 seconds, one full day, are added to it, and any extra whole days you enter are added the same way. If you supplied full dates instead, the number of calendar days between the dates supplies that day part. Third, the start is subtracted from the end, and the single resulting number of seconds is read back in every unit: hours, minutes and seconds for the clock reading, a decimal for timesheets, and totals for anyone who needs the whole span in one unit.
Because every output comes from that one subtraction, the outputs can never contradict each other. If the clock reading says 8 hours 30 minutes, the total minutes must say 510 and the total seconds must say 30,600, because they are the same quantity wearing different units. Tools that calculate each figure separately can drift apart through rounding; this one cannot, and that is a deliberate design choice, not an accident.
Everything runs in your own browser. No time you type is sent anywhere, stored anywhere or attached to any account, because there is no account and no server-side step in the calculation at all. The page works the same offline as online once it has loaded, which is as it should be for arithmetic this simple.
The method, worked step by step
Worked example one: 09:15 to 17:45 on the same day. Convert 09:15 to minutes since midnight: 9 times 60 is 540, plus 15 is 555 minutes. Convert 17:45 the same way: 17 times 60 is 1,020, plus 45 is 1,065 minutes. Subtract: 1,065 minus 555 is 510 minutes. Read 510 minutes back as a clock span: 510 divided by 60 is 8 hours with 30 minutes left over, so the difference is 8 hours 30 minutes. As a decimal that is 510 divided by 60, exactly 8.5 hours. In seconds it is 510 times 60, which is 30,600 seconds. Every figure the calculator shows for this example is one of those numbers, and you can reproduce each one with nothing more than a pencil.
Worked example two: 22:30 to 06:15, crossing midnight. The same-day method fails here because 06:15 is earlier than 22:30, so split the span at midnight instead. From 22:30 to midnight is 1 hour 30 minutes. From midnight to 06:15 is 6 hours 15 minutes. Add the two parts: 7 hours 45 minutes. The calculator reaches the same answer its own way: it adds a full day to the end time, making it 30:15 in extended hours, then subtracts 22:30 to get 7 hours 45 minutes, which is 465 total minutes, 27,900 total seconds and 7.75 decimal hours. Two different routes, one answer, which is what you want from arithmetic you plan to rely on.
The borrowing case sits between those two examples. From 09:50 to 17:20, the minutes cannot be subtracted directly, because 20 is smaller than 50. Borrow one hour from the end time as 60 minutes: 17:20 becomes 16:80, and 16:80 minus 09:50 is 7 hours 30 minutes. The seconds-since-midnight method never needs this step explicitly, because the borrowing is built into the subtraction of two plain numbers, which is the practical reason the engine works that way.
Common shift-length differences table
The table below collects the spans people most often need: standard shift patterns, common working days and typical overnight duties, each with its decimal hours and total minutes worked out with the same method as the examples above. Find the row nearest your own pattern to sanity-check a result, or use the decimal column directly on a timesheet. Breaks are not deducted in any row: each figure is the full span from start to finish, so subtract your own unpaid break before using a figure for pay.
| Start | End | Day handling | Difference | Decimal hours | Total minutes |
|---|---|---|---|---|---|
| 09:00 | 17:00 | Same day | 8 h 0 min | 8 | 480 |
| 09:15 | 17:45 | Same day | 8 h 30 min | 8.5 | 510 |
| 08:00 | 16:30 | Same day | 8 h 30 min | 8.5 | 510 |
| 07:00 | 19:00 | Same day | 12 h 0 min | 12 | 720 |
| 19:00 | 07:00 | Next day | 12 h 0 min | 12 | 720 |
| 22:30 | 06:15 | Next day | 7 h 45 min | 7.75 | 465 |
| 22:00 | 06:00 | Next day | 8 h 0 min | 8 | 480 |
| 23:00 | 07:30 | Next day | 8 h 30 min | 8.5 | 510 |
| 06:00 | 14:00 | Same day | 8 h 0 min | 8 | 480 |
| 14:00 | 22:00 | Same day | 8 h 0 min | 8 | 480 |
| 09:00 | 13:00 | Same day | 4 h 0 min | 4 | 240 |
| 17:30 | 21:45 | Same day | 4 h 15 min | 4.25 | 255 |
Two patterns are worth noticing. First, the three classic eight-hour shifts, morning, evening and night, all measure exactly 8 hours even though the night shift crosses midnight; the day handling, not the clock readings, is what makes the night row work. Second, quarter hours repeat constantly in real schedules, and their decimals are the friendly ones: 15 minutes is 0.25, 30 minutes is 0.5 and 45 minutes is 0.75. Minutes that are not quarters, such as 10 or 20 minutes, produce repeating decimals, 0.1667 and 0.3333, and this calculator shows decimals rounded to four places so a timesheet total stays honest.
Reading your result: clock, decimal and totals
The headline result is the clock format: hours, minutes and seconds, the way you would say the span out loud. Under it sit three totals, and each has its own job. Total hours in decimal form is the payroll and invoicing number, the one that can be multiplied straight by an hourly rate or added up across a week of shifts without borrowing in sixties. Total minutes is the unit of schedules, appointments and exam papers, where a span is naturally a count of minutes. Total seconds is the unit of timing, logging and anything measured precisely, and it is exact whenever you entered seconds yourself.
A useful habit is to read at least two of the formats before using any of them. They are conversions of one another, so they act as a built-in check: 7 hours 45 minutes, 7.75 hours, 465 minutes and 27,900 seconds all describe the same overnight span, and if a figure you copied into a timesheet does not convert back to the clock reading you remember, the copying went wrong somewhere. Catching that at the calculator is cheaper than catching it on a payslip.
Rounding deserves one honest sentence. Clock readings and totals in minutes and seconds are exact. Decimal hours are shown rounded to four decimal places, which is far more precision than any timesheet needs; a week of daily rounding at that level cannot move a total by even a second. If your employer rounds to two decimal places or to the nearest quarter hour, apply their rule to the exact figures shown here, not the other way round.
Crossing midnight and overnight shifts
Midnight is where time arithmetic earns its keep. A span that crosses it has an end time that looks earlier than its start time, and any method that simply subtracts will produce a negative answer or, worse, a quietly wrong positive one. The fix is conceptually simple: a time after midnight belongs to the next day, so a full 24 hours belongs in the calculation. On this page that is a single control, the end-day setting, and choosing next day adds exactly one day to the end before the subtraction happens.
Night work is the everyday case. Nurses, security staff, bakers, drivers and carers routinely work spans like 19:00 to 07:00 or 22:30 to 06:15, and their hours are the ones most likely to be mis-added by hand, because tired people at the end of a night shift are doing the borrowing-in-sixties arithmetic at the worst possible moment. The table above includes the standard night patterns so a result can be checked against a known row in seconds.
One honest limit belongs in this section rather than the fine print. This calculator measures the difference between clock readings. On the two nights a year when the clocks themselves change for daylight saving, the clock-reading difference and the truly elapsed time differ by an hour, and no amount of careful subtraction of readings can paper over that. The limits section below states the position plainly; for an ordinary night, with no clock change inside it, the overnight arithmetic here is exact.
Multi-day spans, plus days and dates
Some spans are longer than a day: a hire that runs from Monday morning to Wednesday evening, a piece of equipment booked out for a long weekend, a vigil, a fast, a long-haul duty pattern. Two routes handle them here. The quick route is the plus-days field: count the whole days between the two clock times and add them, so Monday 09:00 to Wednesday 17:00 is 2 extra days over an 8 hour clock difference, giving 56 hours in total. The careful route is the optional date fields: give both ends a full date and time, and the calculator counts the calendar days between the dates itself, which removes the one step a person can miscount.
The results scale without any change of method. A span of several days is still reported as a clock reading, now with hours that can run well past 24, alongside decimal hours, total minutes and total seconds. 56 hours is also 3,360 minutes and 201,600 seconds, and each of those figures is the same subtraction in a different unit, exactly as with the shorter examples.
Which route should you choose? For one extra day, the next-day setting is enough and dates are unnecessary. For anything longer, dates are worth the extra few seconds of typing, because the most common multi-day error is an off-by-one in the day count, and the date route makes that error impossible. If both routes are available for your span, doing it both ways and comparing is a genuinely good check, not a waste of time.
12-hour and 24-hour input, and seconds
The world splits into two clock notations, and this calculator accepts both. The 24-hour clock runs from 00:00 to 23:59 and is the notation of timetables, hospitals, the military and most of Europe and Asia. The 12-hour clock runs from 1 to 12 twice a day and needs AM and PM to say which half of the day a time belongs to; it is the everyday notation in the United States, India, Pakistan, the Philippines and much of the English-speaking world. The format selector switches the input between the two, and in 12-hour mode each time carries its own AM or PM selector.
Two moments cause almost all 12-hour mistakes. Noon is 12 PM, not 12 AM, and midnight is 12 AM, not 12 PM. The rule that makes it memorable is that 12 AM is the start of the day and 12 PM is its middle. This calculator converts 12 AM to 00 and 12 PM to 12 internally, the standard convention, so a span from 12:00 AM to 12:00 PM measures 12 hours, as it should.
Seconds are there when you need them and invisible when you do not. Leave them out and they count as zero. Add them, in the form 09:15:30, and they flow through the clock reading and make the total seconds figure exact to the second rather than to the minute. Timers, lab work, sports splits and call logs are the usual reasons to bother; for shifts and study sessions, minutes are nearly always enough.
Common uses: shifts, payroll, study and travel
Shift work is the most common reason people land here, and the pattern is always the same: a start, a finish, and a need for decimal hours that a timesheet or payroll system will accept. The second most common is checking someone else arithmetic: a rota, an invoice for hourly work, a care visit log or a contractor timesheet, where the honest question is simply whether the claimed hours match the stated start and finish. Running the pair of times through an independent calculator is the fastest possible audit.
Beyond work, the same subtraction answers everyday questions. Students total up study sessions and revision blocks. Travellers work out the length of a journey from departure to arrival on the same clock, or the gap between a landing and a connection at the same airport. Coaches and athletes measure sessions and rest intervals. Anyone timing a slow cooker, a charge cycle, a parking limit or a medication interval is doing time difference arithmetic whether they call it that or not.
One use deserves a caution rather than encouragement. Working out how long you have been awake, or how long you have to sleep before an early start, is legitimate arithmetic, but no calculator can tell you how much rest you actually need. Treat the number as information, not as permission to cut sleep short.
What this calculator cannot do
Honesty about limits is part of the tool, so here they are in one place. This calculator does not convert between time zones. It has no city database, no offsets and no knowledge of where your times were recorded; it assumes both times come off the same clock, and if they do not, the difference it gives is not the answer to the question you actually have. For that question you need a time zone converter, which is a different tool.
It does not know about daylight saving time. Clock changes are rules made by governments, applied on particular dates in particular places, and pure clock arithmetic cannot see them. A span that includes a clock change will be out by exactly one hour against real elapsed time, in one direction in spring and the other in autumn. For payroll, legal or medical records covering a clock-change night, follow your local rules and your employer policy rather than any calculator, including this one.
Finally, it does not subtract breaks, apply overtime rules, round to your employer quarter-hour policy or judge whether a shift pattern is lawful or safe. It measures the span between two times, exactly, and stops there. Everything built on top of that measurement, pay, rest rules and rostering, remains a human decision, and the exact figure this page gives is the right foundation for it.
Sources and References
- National Institute of Standards and Technology (NIST) - Time and Frequency Division, the United States time standards authority
- timeanddate.com - Time zone, clock and time information resources
- timeanddate.com - Date Duration Calculator, the length of spans between dates
- Wikipedia - Time, its measurement and units
- Wikipedia - Duration, a span of time and how it is expressed
- Wikipedia - 24-hour clock, the notation this calculator uses internally
- Wikipedia - 12-hour clock, AM and PM conventions including noon and midnight
Every figure in this guide was calculated with this page own stated method of pure clock arithmetic, so you can reproduce each one exactly by entering the same times above. All seven sources above were verified as reachable when this page was published, and exactly seven sources are listed.