Time Duration Calculator

Enter a start and an end (times optional) and get the exact duration between them: a clean breakdown in days, hours, and minutes, plus the total expressed in weeks, days, hours, minutes, and seconds.

Put this calculator on your website for free

Copy one snippet and give your visitors a working Time Duration Calculator.

How the time duration calculator works

You give it two moments; it gives you the exact stretch of time between them, once as a human-readable breakdown (days, hours, minutes) and once as a total in every unit you might need. The date part rides on the calendar itself, so month lengths and leap years are handled without you counting on your fingers across February. Leave the times blank and it counts whole days, midnight to midnight, and says so. Enter the end before the start and it quietly measures the other way and tells you it did, because a duration is a distance and distance does not go negative.

The borrow and carry of time arithmetic

duration = (end day − start day) days + (end minute of day − start minute of day)

Every clock time is really a minute number: hours × 60 + minutes. So 9:30 AM is minute 570 of its day, and 2:15 PM is minute 855. Once both moments are a day count plus a minute number, the subtraction is grade-school column arithmetic, except the columns carry at 60 and 24 instead of 10.

The interesting case is the borrow. Say you left at 11:30 PM (minute 1,410) and got back at 1:15 AM the next day (minute 75). You cannot take 1,410 from 75, so you borrow one day, which is worth 1,440 minutes: 75 + 1,440 − 1,410 = 105 minutes, and the day column drops by one. Carry 105 minutes back into hours (105 ÷ 60 = 1 remainder 45) and you get 1 hour, 45 minutes. That borrow step is where nearly every by-hand mistake lives, which is why the calculator shows it with your actual numbers every time it happens.

One duration, five rulers

The same span reads differently depending on the unit, and different jobs want different units: payroll wants decimal hours, project plans want days or weeks, timers and APIs want seconds. The conversion chain is fixed:

UnitEquals
1 minute60 seconds
1 hour60 minutes, or 3,600 seconds
1 day24 hours, or 1,440 minutes, or 86,400 seconds
1 week7 days, or 168 hours, or 10,080 minutes

Months are deliberately missing: at 28 to 31 days each, a month is not a fixed ruler, so this page totals in the units that are. If you want a months-and-days style answer for a pure date span, the date calculator does that breakdown.

Worked example

January 15, 2026 at 9:30 AM to July 19, 2026 at 2:15 PM.

Convert the times: 9:30 AM is minute 570 of its day (9 × 60 + 30) and 2:15 PM is minute 855 (14 × 60 + 15). The calendar says July 19 is 185 days after January 15 in 2026 (February has 28 days that year; the calendar handles it). Subtract the minutes: 855 − 570 = 285, no borrow needed. Carry: 285 ÷ 60 = 4 remainder 45. Answer: 185 days, 4 hours, 45 minutes.

Totals from total minutes: 185 × 1,440 + 285 = 266,685 minutes, which is 4,444.75 hours, 185.1979 days, 26.4568 weeks, or 16,001,100 seconds.

The honest note about time zones and DST

This calculator reads both moments as local clock time and does no time zone math at all. That is the right behavior for almost everything people use it for, but it has one known blind spot: daylight saving time. A span that crosses a spring-forward night is really one hour shorter than the clock arithmetic says, and a fall-back night one hour longer. For a fasting window or a project span, nobody cares. For billing a precise overnight shift on the changeover night, care. And nobody should schedule surgery by it. If your two moments live in different time zones (a flight, a call across an ocean), convert both to one zone first, then enter them; feeding it a departure in local Tokyo time and an arrival in local Denver time gives you a number that means nothing.

What people actually use this for

How long was I actually gone: enter when you left and when you got back, and settle it with minutes. Project spans: kickoff to launch, in days for the retro and weeks for the slide. How long until: today to the wedding, the deadline, the release date. Fasting windows: last bite to first bite, checked against the 16 hours you were aiming for. Flight-free travel: a train-and-ferry itinerary is a chain of local clock times, and this adds up what the journey really cost you.

If your span is really a question about a person's age, the age calculator speaks years and months. If it is a paid shift, the work hours calculator subtracts breaks and multiplies by your rate, and the time card calculator does the whole week. For pure date-to-date counting with weekday and weekend splits, use the date calculator.

Frequently asked questions

How do I calculate the duration between two dates and times?

Convert each moment to a day count plus a minute of the day, subtract, and carry. This calculator does exactly that: it counts calendar days between the two dates (leap years included), subtracts the minute-of-day values, borrows a day of 1,440 minutes if the end time is earlier in the day than the start time, then carries the leftover minutes into hours.

What if I only know the dates, not the times?

Leave both time fields blank and you get a whole-day count, midnight to midnight, and the result says so. If you enter a time on only one side, the missing one is treated as 12:00 AM and the result notes that too, so a shared link never hides an assumption.

Does the calculator handle leap years?

Yes, automatically. The day count comes from the calendar itself, so February 29 is counted in leap years and skipped otherwise. When your span actually crosses a leap day, the result points it out, because that missing or extra day is the usual reason two people get different answers by hand.

Does it account for daylight saving time or time zones?

No, and we would rather tell you than pretend. Both moments are read as local clock time with no zone attached. A span that crosses a spring-forward or fall-back night is off by one hour, which matters for billing a precise overnight shift but not for much else. For moments in two different time zones, convert both to one zone first, then enter them.

What happens if my end time is before my start time?

The calculator swaps them and says so in the result. A duration is a distance between two moments, and distance does not go negative. This also means overnight spans just work: 11:30 PM to 1:15 AM the next day comes back as 1 hour, 45 minutes.

How do I convert the result to decimal hours?

Read the Total hours row: it is total minutes divided by 60, so 185 days, 4 hours, 45 minutes shows as 4,444.75 hours. Decimal hours are what invoices and payroll systems want, and the .75 is the 45 minutes (45 divided by 60).

How many hours are in a day, a week, a month?

A day is 24 hours, a week is 168, and a month is the awkward one: 28 to 31 days means 672 to 744 hours, which is why this calculator totals in weeks, days, hours, minutes, and seconds but not months. When you need a month-style breakdown of a pure date span, the date calculator on this site does that.

Related calculators