Hour Cap
Free time calculator

Time Duration Calculator

Enter a start time, an end time and any break to see the duration between two times in hours, minutes and decimal hours instantly. It handles unpaid breaks and shifts that run past midnight. No signup, and a link you can share.

Updated June 2026 · Free, no signup, multi-currency

Your times

When the period began.

When the period ended.

Unpaid break time to subtract. Leave at 0 for none.

Duration
Decimal hours
Total minutes

The end time is earlier than the start time, so it has been treated as the next day. This is normal for overnight shifts.

How to calculate the duration between two times

The duration between two times is the end time minus the start time, with any unpaid break taken off. The only twist is what happens after midnight: if the end time reads earlier than the start, the period rolled over to the next day, so you add 24 hours before subtracting.

Duration = End − Start − Break
If End < Start → add 24 hours to End
Decimal hours = Total minutes ÷ 60

The reliable way to do this by hand is to convert each time to minutes since midnight, subtract, take off the break, then convert back. Working in minutes the whole way through avoids the classic mistake of adding 45 and 30 minutes and forgetting that it rolls into an extra hour.

Minutes to decimal hours reference

Keep this handy when you are converting time for a timesheet or an invoice. Each minute is one sixtieth of an hour, so the conversions repeat in a steady pattern.

Duration Minutes Decimal hours
15 minutes150.25
30 minutes300.50
45 minutes450.75
1 hour601.00
1 hour 30 minutes901.50
7 hours 45 minutes4657.75
8 hours4808.00

Worked example

Say you started at 09:00, finished at 17:30, and took a 30 minute lunch. Convert the times to minutes, subtract, then take off the break.

  • Gross span: 17:30 − 09:00 = 8 hours 30 minutes (510 minutes)
  • Less break: 510 − 30 = 480 minutes
  • Result: 8h 0m, or 8.00 decimal hours

Now an overnight example. A support shift runs from 22:00 to 06:00 with no break. Because 06:00 is earlier than 22:00, the shift crossed midnight, so treat the end time as 06:00 the next day.

  • Adjusted end: 06:00 next day = 30:00 (1800 minutes)
  • Span: 1800 − 1320 = 480 minutes
  • Result: 8h 0m, or 8.00 decimal hours

The calculator above flags the midnight crossing for you, so you never have to remember the plus 24 hours step yourself.

Why decimal hours matter for billing

An invoice multiplies time by a rate, and that is far cleaner in decimal hours. At 120 per hour, 1.5 hours is plainly 180, while 1 hour 30 minutes tempts you into multiplying the hours and minutes apart and getting it wrong. Decimal hours also add up across dozens of entries without any rollover at the 60 minute mark.

That is why timesheets, payroll runs and accounting tools store time as a decimal. Reading hh:mm is friendlier on the eye, but the moment money is involved, decimal hours are the format that keeps the totals honest.

How Hour Cap helps

This calculator settles a single span. Hour Cap captures every span as a real time entry, so you never type the duration in twice. You can let the timer run, or type a duration however it comes to mind: 1h30m, 1:30 or 8h all parse to the same minutes, because the built-in duration parser reads them all.

Every entry carries its decimal hours and its rate, totals roll up per project and per client, and the clean total pushes straight to Xero as an invoice. The hh:mm you read on a clock and the decimal hours your invoice needs stay in sync, with no manual conversion in between.

Frequently asked questions

How do you calculate the duration between two times?

Convert both times to minutes since midnight, then subtract the start from the end. For example, 09:00 is 540 minutes and 17:30 is 1050 minutes, so 1050 minus 540 is 510 minutes, which is 8 hours and 30 minutes. If you took a break, subtract those break minutes from the total before converting back to hours and minutes.

How do you subtract a break from the total time?

Work out the gross duration between the start and end times first, then take the break off in minutes. A shift from 09:00 to 17:30 is 8 hours 30 minutes gross, so a 30 minute lunch leaves 8 hours of paid or billable time. The calculator above handles this for you when you enter a break value, so the result is always the net duration.

How do you convert minutes to decimal hours?

Divide the minutes by 60. So 15 minutes is 0.25 hours, 30 minutes is 0.50 hours, and 45 minutes is 0.75 hours. For a mixed duration like 8 hours 30 minutes, keep the whole hours and add the decimal share of the leftover minutes, giving 8.50 hours. Decimal hours are what most billing and payroll systems expect.

How do you handle times that cross midnight?

When the end time is earlier than the start time, the shift has rolled past midnight, so add 24 hours to the end time before subtracting. A shift from 22:00 to 06:00 looks like a negative number until you treat 06:00 as the next day, which gives 8 hours. The calculator detects this automatically and shows a note when it has assumed the end time is on the following day.

What is the difference between hh:mm and decimal hours?

The hh:mm format splits time into hours and whole minutes, which is how a clock reads. Decimal hours express the same span as a single number where the fraction is a share of an hour, so 7 hours 45 minutes becomes 7.75. They describe the same duration. People read hh:mm more easily, but billing, timesheets and payroll almost always work in decimal hours.

How do you add up multiple durations?

Add the minutes of every duration together first, then convert the total back into hours and minutes at the end. Adding the hh:mm values directly is where mistakes creep in, because 45 minutes plus 30 minutes is 75 minutes, which rolls over into an extra hour. Summing in minutes, or in decimal hours, avoids the rollover problem entirely.

Why does billing use decimal hours instead of hours and minutes?

Billing multiplies time by a rate, and multiplying a decimal is far simpler than multiplying hours and minutes separately. At a rate of 120 per hour, 1.5 hours is plainly 180, while 1 hour 30 minutes invites errors. Decimal hours also add up cleanly across many entries, which is why invoices, timesheets and accounting tools store time this way.

How should I round time durations?

Pick one rounding rule and apply it consistently. Common choices are rounding to the nearest 6 minutes (a tenth of an hour), the nearest quarter hour, or not rounding at all. Rounding every entry the same way keeps totals fair and predictable. Whatever you choose, agree it with clients up front so the rounded duration on the invoice is never a surprise.

How do I calculate hours worked in a day?

Enter your clock-in time as the start and your clock-out time as the end, then enter your unpaid break in minutes. The result is your net hours worked for the day, shown in both hh:mm and decimal hours. To total a week, calculate each day, add the minutes together, and convert once at the end. The time card calculator does this across a full week.

Does the calculator work for shifts longer than 24 hours?

This tool is built for a single span between two clock times, so it assumes any end time earlier than the start falls on the next day. That covers normal day and overnight shifts up to 24 hours. For anything spanning multiple days, split it into per-day durations and add the minutes together, which keeps each figure accurate.

What does the result mean if the duration shows zero?

A zero result usually means the break you entered is equal to or larger than the gap between the start and end times, or that one of the time fields is empty. Check that both times are filled in and that the break in minutes is smaller than the total span. The calculator never returns a negative duration, so it clamps at zero instead.

Can I share my result with someone else?

Yes. Use the copy link button under the inputs and the calculator saves your start time, end time and break into the web address. Anyone who opens that link sees the same numbers you do, which is handy for confirming a shift or a billable block with a colleague or client without re-typing anything.

Embed this calculator

Drop this calculator into your own blog or site. Free to use, just keep the Hour Cap link.

<iframe src="https://hourcap.com/free-tools/time-duration-calculator/embed" width="100%" height="760" style="border:0;max-width:680px" loading="lazy" title="Time Duration Calculator by Hour Cap"></iframe>

Stop calculating this by hand

Hour Cap tracks the hours, rates and budgets behind these numbers automatically, then pushes clean invoices straight to Xero. No spreadsheets.

Free forever plan
No credit card
Built for Xero