TimeCalculator

Time Duration Calculator

Enter a start and an end, get the duration as a calendar breakdown and as a total in every single unit.

Duration between two dates and times

Set a start and an end. The calculator returns the gap in calendar units and in every single unit at once.

Start

End

Duration

8:30:00

8 hours and 30 minutes

The same duration in every unit

  • Accurate to the second
  • Leap years handled correctly
  • Working days counted for you
  • Runs entirely in your browser

Quick answer

A time duration calculator measures the interval between two points in time and reports it two ways at once: as a calendar breakdown in years, months, days, hours, minutes and seconds, and as a single total in days, hours, minutes, seconds, weeks or working days. Both answers describe the same interval. The calendar breakdown is easier to say out loud; the totals are the ones you can add, divide and put in a spreadsheet. The calculator subtracts two real timestamps, so leap years and 28-day Februaries are already accounted for.

start 2026-03-15 08:00:00 end 2026-07-10 06:30:00 diff 10,103,400 seconds = 3 months, 24 days, 22 hours, 30 minutes = 116.938 days = 2,806.5 hours

What a time duration calculator does

Duration is a length, not a moment. A clock reading such as 09:00 tells you where you are; a duration such as 8 hours 30 minutes tells you how far you travelled. The whole job of this calculator is to turn two moments into one length, and then express that length in whatever unit you need.

Underneath, the arithmetic is a single subtraction. Both the start and the end are converted into a count of seconds measured from a fixed reference instant, the later count is reduced by the earlier count, and what remains is the duration in seconds. Everything you see on screen is that one number reformatted. Total hours is the seconds divided by 3,600. Total days is the seconds divided by 86,400. The calendar breakdown takes more work, and the rest of this page explains exactly how it is produced and where it becomes genuinely ambiguous.

The reason a dedicated tool exists is that the two halves of a date and time value obey different rules. Hours, minutes and seconds are fixed: an hour is always 3,600 seconds, a minute is always 60. Months and years are not fixed. A month can be 28, 29, 30 or 31 days long, and a year is 365 or 366 days. So the moment your interval is long enough to be described in months, the answer stops being a pure unit conversion and starts depending on which months you happened to cross. That is not a flaw in the calculator; it is a property of the calendar.

If you only need the gap between two clock times on the same day, the Hours Calculator is quicker. If you want to add or subtract a span from a date rather than measure between two dates, use the Date Calculator. If your start point is a birth date and you want years and months in the conventional form, the Age Calculator phrases it the way people expect. This page is for the general case: any two instants, any distance apart, measured exactly.

86,400Seconds in a standard day
28 to 31Days in one calendar month
146,097Days in 400 Gregorian years
97Leap years per 400 years
6Units in the calendar breakdown

Three questions people arrive with, and where each is answered on this page: how long is it from A to B (the calendar breakdown, below), how many days or hours is that in total (the totals box), and how many of those are business days (the working days section).

Four steps

How to use the time duration calculator

Two dates, two times, and the result updates as you type. Nothing is submitted anywhere.

  1. Set the start date and time

    Pick the starting date in the first field and type the clock time beside it. The time field accepts seconds, so 09:15:30 is valid. Leave it at midnight if only the date matters.

  2. Set the end date and time

    Do the same for the end point. Use the button that fills in the current moment if you are measuring how long something has been running up to now.

  3. Read the calendar breakdown

    The first result box gives the interval in years, months, days, hours, minutes and seconds, plus the same span written as a plain HH:MM:SS total.

  4. Read the totals

    The second box restates the interval as total days, hours, minutes, seconds and weeks, and counts the working days. Copy whichever figure your form or spreadsheet needs.

Order matters less than you think. If you put the later moment in the start field, the calculator still returns the correct magnitude and simply flags that the end falls before the start. A duration has no sign in ordinary speech: the gap from Tuesday to Friday and the gap from Friday back to Tuesday are both three days.

Reading the output

Why there are two result boxes, and which one you want

A calendar breakdown and a total are not two views of the same number. They are two different answers to two different questions.

The calendar breakdown answers "how would a person describe this gap". The totals answer "what number do I put in the box". Confusing them is the single most common reason a duration looks wrong.

Take the interval from 15 March 2026 at 08:00 to 10 July 2026 at 06:30. The calendar breakdown is 3 months, 24 days, 22 hours and 30 minutes. The totals are 116.938 days, 2,806.5 hours, 168,390 minutes, 10,103,400 seconds and 16.705 weeks. Every one of those figures is correct and they all describe the same interval. But you cannot recover the totals from the breakdown by multiplying, because you do not know how long those three months were until you know which three months they were.

total seconds = end_timestamp − start_timestamp total hours = total seconds ÷ 3,600 total days = total seconds ÷ 86,400 total weeks = total seconds ÷ 604,800

Those four lines are exact and never vary. There is no equivalent single line for months or years, and that asymmetry is the whole reason the calculator prints two boxes instead of one. When a form asks for "duration in days", it wants the total. When a contract says "three months and twenty-four days", it wants the breakdown. When a payroll system asks for hours, it wants the total converted to decimal, which the Decimal Hours Converter handles if you need the conversion on its own.

Use the breakdown when

You are writing the answer in a sentence, quoting a notice period, describing someone's age, or reporting progress against a deadline that people think about in months.

Use the totals when

The figure will be added, averaged, divided or multiplied. Totals are the only form that survives arithmetic, because every unit in them has a fixed length.

Never do this

Do not turn a breakdown into a total by hand using 30 days per month. Three months can be 89, 90, 91 or 92 days depending on where in the year they fall.

Under the hood

How the year, month and day breakdown is built

The calendar breakdown uses a borrow algorithm, the same idea as column subtraction in primary school, except each column rolls over at a different number.

Start by subtracting each field of the start from the matching field of the end, independently. That gives six numbers, some of which may be negative. Then fix the negatives from the smallest unit upward, borrowing one unit from the column to the left each time.

1. seconds = end.sec − start.sec if < 0 : add 60, take 1 from minutes 2. minutes = end.min − start.min if < 0 : add 60, take 1 from hours 3. hours = end.hour − start.hour if < 0 : add 24, take 1 from days 4. days = end.day − start.day if < 0 : add the length of the month before the end month, take 1 from months 5. months = end.mon − start.mon if < 0 : add 12, take 1 from years 6. years = end.year − start.year

Steps 1, 2, 3 and 5 borrow a constant, because minutes, hours and months always contain 60, 60, 24 and 12 of the unit below them respectively. Step 4 is the odd one out. There is no constant to borrow, so the algorithm borrows the actual length of a specific real month: the month immediately before the end date's month. That choice is what makes the result reconstructable, meaning that if you add the breakdown back onto the start date in order, you land exactly on the end date.

Walking through a real case

Take 15 March 2026 at 08:00:00 as the start and 10 July 2026 at 06:30:00 as the end.

  • Seconds: 0 − 0 = 0. No borrow.
  • Minutes: 30 − 0 = 30. No borrow.
  • Hours: 6 − 8 = −2. Add 24 to get 22, and take one day.
  • Days: 10 − 15 = −5, minus the borrowed day = −6. The month before July is June, which has 30 days, so −6 + 30 = 24, and take one month.
  • Months: July is month 7 and March is month 3, so 7 − 3 = 4, minus the borrowed month = 3.
  • Years: 2026 − 2026 = 0.

The answer is 3 months, 24 days, 22 hours and 30 minutes. Check it by adding forward: 15 March plus 3 months is 15 June, plus 24 days is 9 July, plus 22 hours 30 minutes is 10 July at 06:30. It reconstructs exactly, which is the test any correct breakdown has to pass.

How one duration decomposes into years, months, days and hours

Timeline showing a two and a half year duration split into years, months, days and hours From 15 January 2024 at 09:00 to 24 July 2026 at 17:30 is 2 years, then 6 months, then 9 days, then 8 hours 30 minutes, totalling 921 days or 79,605,000 seconds. 2 years, 6 months, 9 days, 8 hours and 30 minutes Segments are ordered largest first. Widths are illustrative, not to scale. 2 years 6 months 9 days 8 h 30 m 2024-01-15 09:00 2026-01-15 09:00 2026-07-15 09:00 2026-07-24 09:00 2026-07-24 17:30 START END same interval as a total: 921 days = 22,112.5 hours = 79,605,000 seconds
Each segment lands you on a real date, which is how you verify the breakdown. The two-year hop covers 731 days because 2024 was a leap year, the six-month hop covers 181 days, the nine-day hop covers 9, and the final part is half a day. Add them and you get 921 days plus 8 hours 30 minutes.

Segment lengths in days: 2 years from 15 January 2024 is 366 + 365 = 731 days, six months from 15 January 2026 to 15 July 2026 is 31 + 28 + 31 + 30 + 31 + 30 = 181 days, then 9 days, giving 921 in total.

The hard part

Why "1 month" is not a fixed length

The calendar breakdown is exact about where you end up and vague about how far you travelled. Both statements are true at the same time.

Ask how many days are in a month and there is no answer, only a range: 28, 29, 30 or 31. That means "one month" is not a duration in the way that "one hour" is a duration. It is an instruction: move the date forward by one position in the month column and keep the day number the same. How many days that instruction consumes depends entirely on where you start.

One month from 1 January is 31 days. One month from 1 February in a common year is 28 days. That is three whole days of difference between two intervals that are both, correctly, "one month". Neither is a rounding error and neither can be fixed. If your calculation needs a fixed length, you must use days, and the calculator's totals box gives you exactly that.

The same "1 month" measured from five different start dates

Bar chart comparing the number of days in one calendar month from five different start dates One month from 1 January 2026 is 31 days, from 1 February 2026 is 28 days, from 1 February 2024 is 29 days, from 1 April 2026 is 30 days, and from 31 January 2026 is 28 days because the end date is clamped to 28 February. 1 Jan to 1 Feb 2026 1 Feb to 1 Mar 2026 1 Feb to 1 Mar 2024 1 Apr to 1 May 2026 31 Jan to 28 Feb 2026 31 days 28 days 29 days 30 days 28 days 28293031 Every bar is exactly one calendar month. The length of that month is not a constant.
Five identical instructions, four different answers. The teal bar is a leap February, which is why it is one day longer than the same month two years later. The bottom bar shows clamping: 31 January plus one month has no 31 February to land on, so it settles on the last day of February instead, and the interval measures 28 days.
Month lengths and cumulative day of yearCommon year values, with the leap year difference shown separately
MonthDaysDays before itDay of year at month endLeap year shift
January310310
February283159+1
March315990+1
April3090120+1
May31120151+1
June30151181+1
July31181212+1
August31212243+1
September30243273+1
October31273304+1
November30304334+1
December31334365+1

To find the day of year for any date, add the day number to the "days before it" column: 24 July is 181 + 24 = day 205 in a common year, and day 206 in a leap year. Subtracting two day-of-year numbers is the fastest hand method for finding the gap between two dates in the same year.

Month arithmetic is not reversible at month ends. Add one month to 31 January and you get 28 February, because 31 February does not exist. Subtract one month from 28 February and you get 28 January, not 31 January. Any interval that begins on the 29th, 30th or 31st of a month should be double checked in total days rather than trusted as a month count, and any contract that hinges on such a date should say which convention it means.

Reference

Duration reference tables

Exact conversions for the intervals people measure most often. Nothing here is rounded except where a decimal is unavoidable.

Common intervals in every unitFixed-length spans converted exactly
IntervalSecondsMinutesHoursDaysWeeks
1 minute6010.0166670.0006940.0000992
1 hour3,6006010.0416670.005952
1 day86,4001,4402410.142857
1 week604,80010,08016871
10 days864,00014,400240101.428571
2 weeks1,209,60020,160336142
30 days2,592,00043,200720304.285714
31 days2,678,40044,640744314.428571
90 days7,776,000129,6002,1609012.857143
100 days8,640,000144,0002,40010014.285714
365 days common year31,536,000525,6008,76036552.142857
366 days leap year31,622,400527,0408,78436652.285714

Every row here is a fixed number of days, which is why it converts cleanly. There is deliberately no "1 month" row: a month has no fixed length, so it cannot appear in an exact conversion table. If you need an average for estimating, the Gregorian mean month is 30.436875 days, from 365.2425 days per year divided by 12, but never use it to answer a question about two specific dates. Use the Time Calculator for pure unit conversion, or Minutes to Hours and Seconds to Minutes for the two most common single conversions.

Reading a duration in different notationsOne interval, six ways of writing it down
Notation2 h 30 min written this wayWhere it appears
Plain words2 hours 30 minutesSpeech, email, meeting invitations, anything a person reads.
Clock-style duration2:30:00Stopwatches, race results, video runtimes. Hours may exceed 24 because it is a length, not a time of day.
Decimal hours2.5Payroll, invoices, spreadsheets. Required whenever the duration is multiplied by a rate.
Total minutes150Scheduling systems, transit timetables, cooking and medical dosing intervals.
Total seconds9,000Databases, log files, API fields, and the internal representation used by this calculator.
ISO 8601 durationPT2H30MCalendar files, structured data, configuration, anywhere a machine has to parse it unambiguously.

The clock-style form is the one that causes trouble, because 2:30 looks like a time of day. Context decides: as a duration it means two and a half hours, as a clock reading it means half past two. A duration of 36:00:00 is perfectly valid and simply means a day and a half.

Calendar rules

Leap years, and the rule almost everyone gets half right

A year is a leap year if it is divisible by 4, except that century years are not, except that century years divisible by 400 are.

The Earth takes roughly 365.2422 days to orbit the Sun, so a 365-day calendar drifts by about a quarter of a day per year. Adding one day every four years overcorrects slightly, which is why the Gregorian calendar removes three of those extra days every 400 years. The result is an average year of exactly 365.2425 days, which is close enough that the calendar will not slip a full day against the seasons for thousands of years.

is_leap(y) = (y divisible by 4) AND ( (y not divisible by 100) OR (y divisible by 400) ) 400 years = 400 × 365 + 97 leap days = 146,000 + 97 = 146,097 days 146,097 ÷ 400 = 365.2425 days per year 146,097 ÷ 7 = 20,871 whole weeks, so the calendar repeats every 400 years

The count of 97 comes from the three-part rule directly. In any 400-year block there are 100 years divisible by 4. Four of those are also divisible by 100 and would normally be skipped. One of those four is divisible by 400 and is put back. So 100 − 4 + 1 = 97 leap years, not 100.

The leap year rule, worked throughEvery test applied to real years, including the two famous century cases
YearDivisible by 4Divisible by 100Divisible by 400VerdictDays in February
1900Yes (475)Yes (19)No (4.75)Not a leap year, the century rule blocks it28
2000Yes (500)Yes (20)Yes (5)Leap year, the 400 rule restores it29
2023NoNoNoCommon year28
2024Yes (506)NoNoLeap year, the plain rule applies29
2025NoNoNoCommon year28
2026NoNoNoCommon year28
2028Yes (507)NoNoLeap year29
2100Yes (525)Yes (21)No (5.25)Not a leap year28
2200Yes (550)Yes (22)No (5.5)Not a leap year28
2400Yes (600)Yes (24)Yes (6)Leap year29

The number in brackets is the quotient, shown so you can see the test rather than take it on trust. 1900 and 2100 are the cases that break naive code that only checks divisibility by 4. Anyone born on 29 February 1896 lived through a February with no 29th in 1900, then had leap birthdays again from 1904 onward.

Leap years matter to duration in one specific way: they change how many days a year-long interval contains. From 15 January 2024 to 15 January 2025 is 366 days, because 29 February 2024 falls inside it. From 15 January 2025 to 15 January 2026 is 365 days. Both are described as "one year". If you are calculating interest, rent, service credits or anything else priced per day, the difference is a real day of money, and the totals box is the only figure you should be using.

Notation

ISO 8601 durations and Unix timestamps

Two machine-readable ways of expressing an interval, and the one thing each is good at.

ISO 8601 is the international standard for writing dates, times and intervals. Its duration format starts with the letter P for period, lists the date-scale components in descending order, then a T to mark the start of the time-scale components, then those in descending order. Each number is immediately followed by the letter of its unit.

The one rule that trips people up is that M means two different things. Before the T it is months; after the T it is minutes. That is why the T is mandatory even when there is no date part: PT30M is thirty minutes, while P30M is thirty months.

ISO 8601 duration notation referenceWhat each string means, and how to build your own
StringMeaningNote
PT30M30 minutesThe T is required. Without it this would read as 30 months.
PT2H30M2 hours 30 minutesThe most commonly seen duration string, used for meeting and video lengths.
PT45S45 secondsSeconds may carry a decimal fraction, as in PT0.5S.
P1D1 dayA calendar day, which is not guaranteed to be 24 hours across a clock change.
PT24H24 hoursExactly 86,400 seconds. Different from P1D on a daylight saving changeover date.
P1W1 weekWeeks cannot be combined with any other component in a strict ISO 8601 duration.
P1Y2M3D1 year, 2 months, 3 daysDate components only, so no T is needed.
P3M24DT22H30M3 months, 24 days, 22 hours, 30 minutesThe worked example from this page, written as a single string.
P1Y2M3DT4H5M6S1 year, 2 months, 3 days, 4 hours, 5 minutes, 6 secondsThe full form. Any component that is zero is simply left out.
PT0SZero durationAt least one component must be present, so zero is written explicitly.
2026-03-15T08:00:00/2026-07-10T06:30:00An interval given as start and endThe slash form names two instants rather than a length.
2026-03-15T08:00:00/P3M24DT22H30MThe same interval as start plus durationEquivalent to the row above for this particular start date.

Note that the last two rows are equivalent only for that start date. Applying P3M24DT22H30M to a different start would produce a different number of elapsed seconds, which is the ambiguity of months showing up again in a formal notation.

Unix timestamps

A Unix timestamp is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970, called the epoch. It is a single integer with no time zone, no calendar and no ambiguity, which makes it the ideal thing to subtract. The duration between two instants is simply the difference of their timestamps, in seconds, with no borrowing and no month lengths involved.

2026-03-15T08:00:00Z = 1,773,561,600 2026-07-10T06:30:00Z = 1,783,665,000 difference = 10,103,400 seconds = 116.9375 days

Two timestamps worth knowing: 946,684,800 is midnight UTC on 1 January 2000, and 2,147,483,647 is 03:14:07 UTC on 19 January 2038. The second is the largest value a signed 32-bit integer can hold, so systems still storing timestamps that way will overflow at that instant. Most modern software uses 64-bit values and is unaffected. Some environments count milliseconds rather than seconds since the same epoch, so a timestamp with 13 digits rather than 10 needs dividing by 1,000 before you treat it as seconds.

Timestamp arithmetic versus calendar arithmeticWhich representation to reach for
TaskUse timestampsUse calendar fields
Exact elapsed secondsYes, one subtractionNo, requires reconstructing month lengths
"Same day next month"No, there is no fixed offsetYes, increment the month field
Sorting eventsYes, integers sort correctlyWorks, but only if fields are zero padded
Anniversaries and birthdaysNo, drifts against the calendarYes, the date is the point
Billing per dayYes, divide seconds by 86,400Risky, depends on the months crossed
Respecting a clock changeTimestamps are in UTC, so no shiftYes, local fields carry the shift

The short version: timestamps answer "how much time passed", calendar fields answer "what will the date say". A duration calculation usually needs both, which is why this tool computes them separately rather than deriving one from the other.

Business time

How working days are counted

The working days figure counts Monday through Friday from the start date up to but not including the end date.

Working days, also called business days, exist because most deadlines are written in them. A five business day service level, a ten working day notice period and a thirty business day payment term all need a count that skips weekends. The calculator produces this by walking one day at a time from the start date and counting every day that is not a Saturday or a Sunday.

The boundary convention is the part to be careful about. The count is half open: the start date is included, the end date is not. That matches how spans are usually described, because the gap from Friday to the following Friday is seven days and five of those are working days, not six. If your organisation counts the end date as well, add one when the end date falls on a weekday.

Fri 24 Jul 2026 to Fri 31 Jul 2026 days counted: Fri 24, Sat 25, Sun 26, Mon 27, Tue 28, Wed 29, Thu 30 weekdays among them: Fri, Mon, Tue, Wed, Thu = 5 working days total span: 7 days

Two limits are worth stating plainly. First, the calculator does not know about public holidays, which vary by country, province, state and sometimes by employer. A span of 32 working days over Christmas will contain fewer actual staffed days than the same span in June. Second, the calculator assumes a Saturday and Sunday weekend. In countries where the weekend falls on Friday and Saturday, or on Thursday and Friday, the figure needs adjusting by hand.

A useful shortcut for checking the tool by hand: divide the total number of days by 7 to get the number of whole weeks, multiply by 5, then count the weekdays in the leftover days. For a 44-day span starting on a Tuesday, that is 6 whole weeks giving 30 weekdays, plus 2 leftover days that both land on weekdays, giving 32. If you need the count for a specific roster rather than a generic week, build it in the Time Card Calculator instead, which lets you enter each day individually.

7 calendar days

Always 5 working days, whichever day of the week you start on, because a week contains exactly five weekdays.

10 calendar days

Between 6 and 8 working days, depending on the starting weekday. Starting on a Monday gives 8, starting on a Saturday gives 6.

30 calendar days

Between 20 and 22 working days. This is why "30 days" and "a month of work" are not interchangeable in a contract.

The caveat

Daylight saving time and why a span can lose an hour

On the two days a year when clocks change, wall-clock arithmetic and elapsed time disagree by exactly one hour.

Most of the calculator's answers are exact. There is one situation where the wall clock and the stopwatch give different numbers, and it is worth understanding rather than working around.

In most of Canada and the United States, clocks move forward one hour on the second Sunday in March and back one hour on the first Sunday in November. In 2026 those dates are 8 March and 1 November. Across most of Europe the changes fall on the last Sunday in March and the last Sunday in October, which in 2026 are 29 March and 25 October. Many countries, including most of Asia and Africa and a great deal of South America, do not observe the practice at all.

Suppose you start something at 20:00 on Saturday 7 March 2026 and stop it at 08:00 on Sunday 8 March 2026, in a region that springs forward that morning. Reading the clock, you started at 20:00 and finished at 08:00, so twelve hours passed. In fact the clock jumped from 02:00 straight to 03:00 during the night, so only eleven hours of real time elapsed. In the autumn the reverse happens: an interval that reads as twelve hours on the clock actually contains thirteen hours of real time, because one hour is lived through twice.

Spring forward, 7 Mar 2026 20:00 to 8 Mar 2026 08:00 (local) wall-clock difference = 12 hours real elapsed time = 11 hours (02:00 skipped to 03:00) Autumn back, 31 Oct 2026 20:00 to 1 Nov 2026 08:00 (local) wall-clock difference = 12 hours real elapsed time = 13 hours (01:00 to 02:00 happened twice)

This calculator reports wall-clock duration. It treats every day as 24 hours, so a span crossing a clock change will differ from true elapsed time by one hour. That is the right answer for shift rosters, notice periods and anything where the calendar is authoritative, and the wrong answer for a physical measurement. For a span you actually stood through, subtract an hour in spring and add one in autumn. If your two moments are in different time zones altogether, convert them to a common zone first with the Time Zone Converter, then measure.

The same asymmetry explains a subtlety in the ISO 8601 table above. P1D means one calendar day, which is whatever length the day happens to be. PT24H means exactly 86,400 seconds. On 364 days of the year they are identical; on the two changeover days they are an hour apart. Software that confuses them produces the classic bug where a daily job runs twice or not at all on one Sunday a year.

Worked examples

Six durations calculated step by step

Every one of these can be reproduced in the calculator above. The working is shown so you can check your own method against it.

A meeting inside one day Simple

A workshop runs from 09:15 to 17:45 on Friday 24 July 2026. How long is it?

  1. Both moments are on the same date, so the calendar breakdown has no years, months or days.
  2. Convert each to seconds since midnight: 09:15 = 33,300 s, 17:45 = 63,900 s.
  3. 63,900 − 33,300 = 30,600 seconds.
  4. 30,600 ÷ 3,600 = 8.5, so 8 hours and 0.5 × 60 = 30 minutes.
  5. Totals: 510 minutes, 0.354 days, 0.051 weeks. Working days shows 0, because the count is half open and start and end fall on the same date.

= 8 hours 30 minutes (8:30:00)

A four month project span Borrowing

Kick-off was 15 March 2026 at 08:00, handover was 10 July 2026 at 06:30.

  1. Hours: 6 − 8 = −2, so add 24 to make 22 and borrow a day.
  2. Days: 10 − 15 = −5, less the borrowed day = −6. June has 30 days, so −6 + 30 = 24, and borrow a month.
  3. Months: 7 − 3 = 4, less the borrowed month = 3.
  4. Check by adding forward: 15 Mar + 3 months = 15 Jun, + 24 days = 9 Jul, + 22 h 30 m = 10 Jul 06:30.
  5. Totals: 10,103,400 seconds, 2,806.5 hours, 116.938 days, 16.705 weeks, 84 working days.

= 3 months, 24 days, 22 hours, 30 minutes

Two and a half years across a leap year Leap

From 15 January 2024 at 09:00 to 24 July 2026 at 17:30.

  1. No column goes negative, so no borrowing is needed at all.
  2. Years 2026 − 2024 = 2, months 7 − 1 = 6, days 24 − 15 = 9, hours 17 − 9 = 8, minutes 30 − 0 = 30.
  3. In days: the first year is 366 because 29 February 2024 falls inside it, the second is 365, and the remaining stretch to 24 July 2026 is 190 days.
  4. 366 + 365 + 190 = 921 days, plus 8 hours 30 minutes.
  5. Totals: 79,605,000 seconds, 22,112.5 hours, 921.354 days, 131.622 weeks, 659 working days.

= 2 years, 6 months, 9 days, 8 hours, 30 minutes

Delivery time against a service level Business days

An order is placed Monday 6 July 2026 at 14:00 and arrives Friday 17 July 2026 at 10:30. The promise was ten business days.

  1. Hours: 10 − 14 = −4, so add 24 to make 20 and borrow a day.
  2. Days: 17 − 6 = 11, less the borrowed day = 10. No month borrow is needed.
  3. Calendar breakdown: 10 days, 20 hours, 30 minutes.
  4. Totals: 937,800 seconds, 260.5 hours, 10.854 days, 1.551 weeks.
  5. Working days from 6 July up to 17 July: 11 dates are counted and one full weekend falls inside them, leaving 9.

= 9 working days, inside the ten day promise

Countdown to a launch date Countdown

It is 24 July 2026 at 09:00. The launch is midnight at the start of 1 January 2027.

  1. Hours: 0 − 9 = −9, so add 24 to make 15 and borrow a day.
  2. Days: 1 − 24 = −23, less the borrowed day = −24. December has 31 days, so −24 + 31 = 7, and borrow a month.
  3. Months: January is month 1 and July is month 7, so 1 − 7 = −6, less the borrowed month = −7. Add 12 to make 5, and borrow a year.
  4. Years: 2027 − 2026 = 1, less the borrowed year = 0.
  5. Totals: 13,878,000 seconds, 3,855 hours, 160.625 days, 22.946 weeks, 115 working days.

= 5 months, 7 days, 15 hours

A span that crosses a clock change DST

A generator runs from 20:00 on Saturday 7 March 2026 to 08:00 on Sunday 8 March 2026, in a region that springs forward that night.

  1. Wall-clock arithmetic: 20:00 to midnight is 4 hours, midnight to 08:00 is 8 hours.
  2. 4 + 8 = 12 hours, which is what the calculator reports.
  3. But the local clock skipped from 02:00 to 03:00, so one clock hour never happened.
  4. Real elapsed time = 12 − 1 = 11 hours, or 39,600 seconds of fuel burned.
  5. In November the correction runs the other way: add an hour rather than subtract one.

Clock says 12 hours, stopwatch says 11 hours

Avoid these

Six mistakes that produce a wrong duration

Nearly every incorrect interval traces back to one of these six.

Common duration errorsWhat goes wrong, and the correction
MistakeWhat it looks likeThe fix
Converting months to days by hand 3 months read as 90 days Use the totals box. From 15 March to 15 June 2026 is 92 days, not 90.
Ignoring the time of day Both times left at 00:00 An interval measured to the second needs both clock values. Leaving them at midnight can shift the day count by one.
Assuming every year is 365 days 2 years read as 730 days From 15 January 2024 the two years are 731 days, because 2024 was a leap year.
Off by one on the end date Counting both endpoints Decide whether the end date is included. 1 to 5 July is 4 days apart but touches 5 dates.
Forgetting public holidays Working days taken as staffed days The count excludes weekends only. Subtract statutory holidays for your region yourself.
Measuring across time zones Departure local, arrival local Convert both to one zone first, or the offset between them is silently added to the duration.

The first row is the expensive one. A ninety day payment term, a three month notice period and a quarter of a year are three different lengths, and which one a document means is a question of wording rather than arithmetic.

Applications

Who measures durations, and why

Different fields, one recurring need: an interval that has to be exact and defensible.

Contracts and notice periods

Checking whether a notice was served in time, when a probation period ends, and how many days remain on a fixed term. The breakdown is what the document says; the totals are what you can prove.

Project managers

Measuring how long a phase actually took against how long it was estimated to take, and converting a calendar span into the working days a team can plan around.

Healthcare and research

Time since a dose, length of stay, gestational age, follow-up windows. These need to be reported to the hour, and often need both the days total and the calendar phrasing.

Travel planning

Total trip length, visa day counts, layover windows and how long a booking has been held. Convert to one time zone before measuring anything that crosses a border.

Finance and billing

Interest accrued per day, prorated subscriptions, and service credits owed for an outage. Per-day pricing makes the leap year difference into an actual line item.

Personal milestones

How long until a wedding, an exam, a due date or a retirement. For a live ticking version rather than a fixed answer, use the Countdown Timer.

Whichever of these you are doing, the discipline is the same. Write down both moments completely, including the time of day and the time zone. Decide whether the end point is included. Then take the totals for anything you will calculate with, and the breakdown for anything you will say out loud.

Definitions

Duration glossary

The vocabulary that appears in contracts, timesheets and technical documentation about time intervals.

Duration
The length of a time interval, independent of when it occurs. A duration can exceed 24 hours, which is why 36:00:00 is valid as a duration but never as a clock reading.
Elapsed time
The amount of time that has actually passed between a start and an end. Identical to duration in ordinary use, though it implies a clock was running rather than the length being defined in advance.
Interval
A pair of instants, a start and an end, that together define a duration. In ISO 8601 an interval is written with a slash between the two ends, or between a start and a duration.
Calendar breakdown
A duration expressed in years, months, days, hours, minutes and seconds. Exact about where you land but not convertible to days without knowing the specific dates involved.
Borrow
Taking one unit from the next larger column when a subtraction goes negative, so that a negative hours figure becomes 24 hours minus one day. The day column borrows a real month length rather than a constant.
Half-open interval
A range that includes its start point but excludes its end point, written mathematically as [start, end). The working days count on this page uses this convention.
Leap year
A year of 366 days containing 29 February. A year qualifies if it is divisible by 4, unless it is divisible by 100, unless it is also divisible by 400. So 2000 was a leap year and 1900 was not.
Gregorian calendar
The calendar in civil use worldwide, introduced in 1582. Its 400-year cycle contains 146,097 days and exactly 20,871 weeks, giving an average year of 365.2425 days.
ISO 8601 duration
The standard machine-readable notation for a length of time, written as P for period, then date components, then T, then time components. PT2H30M is two and a half hours; P1Y2M3D is one year, two months and three days.
Unix timestamp
A count of seconds since 00:00:00 UTC on 1 January 1970. Subtracting two timestamps gives an exact duration in seconds with no calendar involved.
Epoch
The fixed reference instant a timestamp counts from. The Unix epoch is 1 January 1970 UTC, but other systems use different origins, so a raw number is meaningless without knowing its epoch.
Daylight saving time
A seasonal one-hour clock shift observed in many regions. The changeover days are 23 or 25 hours long, so wall-clock duration and real elapsed time differ by an hour across them.
Questions

Frequently asked questions

Direct answers to the questions people ask most about this calculation.

What is a time duration calculator?

A time duration calculator measures the interval between two points in time and reports it in several units at once. You enter a start date and time and an end date and time, and it returns the gap as a calendar breakdown in years, months, days, hours, minutes and seconds, plus totals in days, hours, minutes, seconds and weeks. It also counts the working days in the span.

How do I calculate the duration between two dates?

Convert both moments to a single count of seconds from a fixed reference, subtract the earlier from the later, then divide the result into whatever units you need. Dividing by 3,600 gives hours, by 86,400 gives days. For a calendar breakdown, subtract each field separately and borrow from the column to the left whenever a figure goes negative, taking the real length of the month before the end month when the day column is short.

How long is 1 month exactly?

There is no exact answer, because a calendar month runs from 28 to 31 days. One month from 1 January is 31 days, from 1 February in a common year it is 28 days, and from 1 April it is 30 days. That is why the calculator gives a separate total in days: only the totals are fixed. The Gregorian average month is 30.436875 days, which is useful for estimating but never correct for two specific dates.

Why does my duration show months and days instead of just days?

Because both answers are useful and neither can replace the other. The calendar breakdown is how people describe an interval in speech and in contracts, while the total in days is the figure you can add, divide or put in a spreadsheet. The calculator shows both in separate boxes so you can pick the one your situation needs without doing an unsafe conversion by hand.

How does the borrow algorithm work?

Subtract each field of the start from the matching field of the end, then fix any negative results from the smallest unit upward. Negative seconds take 60 from the minutes, negative minutes take 60 from the hours, negative hours take 24 from the days, and negative days take the length of the month immediately before the end date's month. Negative months take 12 from the years. The result reconstructs the end date exactly when added back to the start.

Which years are leap years?

A year is a leap year if it is divisible by 4, except that years divisible by 100 are not, except that years divisible by 400 are. So 1900 was not a leap year while 2000 was. In practice 2024 and 2028 are leap years, 2025, 2026 and 2027 are not, and 2100 will not be. Each 400-year cycle contains 97 leap years, giving an average year length of 365.2425 days.

How many working days are in the span I entered?

The calculator counts every Monday to Friday from the start date up to but not including the end date. A seven day span always contains five working days; a thirty day span contains between 20 and 22 depending on the starting weekday. Public holidays are not deducted, because they vary by country and employer, so subtract your own statutory days from the figure shown.

Does the calculator account for daylight saving time?

It reports wall-clock duration, treating every day as 24 hours. A span crossing a clock change will therefore differ from real elapsed time by one hour: an hour short in spring when clocks jump forward, an hour long in autumn when they go back. That is the correct answer for rosters and notice periods. For a physically measured span, apply the one hour correction yourself.

What does PT2H30M mean?

It is an ISO 8601 duration meaning two hours and thirty minutes. The P marks the start of a period, the T separates date components from time components, and each number is followed by its unit letter. The T matters because M means months before it and minutes after it, so PT30M is thirty minutes while P30M is thirty months.

How do I write 1 year, 2 months and 3 days in ISO 8601?

Write it as P1Y2M3D. Because all three components are on the date scale, no T is needed. If you also wanted four hours you would write P1Y2M3DT4H, adding the T before the time components. Components that are zero are simply omitted, and the order is always largest to smallest.

What is a Unix timestamp and how do I use it for durations?

A Unix timestamp is the number of seconds since 00:00:00 UTC on 1 January 1970. Because it is one integer with no calendar or time zone attached, the duration between two instants is just the difference between their timestamps. For example 1,783,665,000 minus 1,773,561,600 is 10,103,400 seconds, which is 116.9375 days.

Is the end date included in the count?

The working days count is half open: it includes the start date and excludes the end date. The duration itself is measured between two exact instants, so inclusion does not arise for it. If your deadline counts the final day as well, add one working day when that day falls on a weekday. Deciding this before you start prevents the most common off-by-one error.

How many days is 3 months?

Between 89 and 92 days, depending on which three months. From 15 March to 15 June 2026 is 92 days, while from 1 December 2025 to 1 March 2026 is 90 days. The shortest possible run of three consecutive months is February to April in a common year, at 28 + 31 + 30 = 89 days, and the longest is 92. Always take the figure from the totals box rather than multiplying by 30.

Does this duration calculator send my dates anywhere?

No. Every calculation runs in your browser using JavaScript, so the dates and times you type never leave your device. There is no account, no tracking of your inputs, and the page keeps working once loaded even without a connection. The result updates as you type rather than on a round trip to a server.