CalculateItNow home

Time Duration Calculator

The exact time between two dates and times in days, hours, minutes and total seconds, plus the working hours it covers under your own working-day definition.

Time Duration Calculator: with the default inputs, duration is 7 days, 8 hours, 30 minutes.

Try an example
Duration
7 days, 8 hours, 30 minutes
Total days
7.35417
Total hours
176.5
Total minutes
10,590
Total seconds
635,400
Business hours
48
Equivalent working days
6
Calendar days touched
8
Assumptions
  • A day is exactly 24 hours and a week exactly 168; leap seconds and daylight saving are outside this timeline.
  • Business hours use one continuous window per working day, with no public holidays and no breaks.
  • Both times are read on the same clock — convert time zones before entering them if the ends are in different zones.
The same duration in every unit
UnitAmount
Weeks1.0506
Days7.3542
Hours176.5
Minutes10,590
Seconds635,400

Weeks and days here are exactly 7 × 24 h and 24 h. Calendar months and years are not fixed lengths, so they are deliberately not listed.

Math verified by automated testsUpdated 2026-09-092 sources cited

How this is worked out

The formula

Both points are reduced to a whole number of minutes since 1970-01-01 00:00:

  minutes = (days since the epoch × 1440) + hour × 60 + minute
  duration = end − start                    (exact integer arithmetic, no rounding)

  days  = ⌊duration ÷ 1440⌋
  hours = ⌊(duration mod 1440) ÷ 60⌋
  mins  =  duration mod 60

Business hours: for each calendar day the span touches, take the overlap between
[start, end] and that day's [open, close] window, skipping non-working weekdays,
and add the overlaps up.

Open How it’s calculated above to see this worked through with your own numbers.

What you enter

Start date
A calendar date.defaults to today
Start hour
24-hour clock: 0 is midnight, 13 is 1 pm.from 0 to 23 · whole numbers only · defaults to 9
Start minute
A number.from 0 to 59 · whole numbers only · defaults to 0
End date
A calendar date.defaults to today+7
End hour
A number.from 0 to 23 · whole numbers only · defaults to 17
End minute
A number.from 0 to 59 · whole numbers only · defaults to 30
Working day starts at(under More options)
Used only for the business-hours figure.from 0 to 23 · whole numbers only · defaults to 9
Working day ends at(under More options)
24 means midnight at the end of the day.from 1 to 24 · whole numbers only · defaults to 17
Saturday is a working day(under More options)
Turn this on or off.defaults to off
Sunday is a working day(under More options)
Turn this on or off.defaults to off

What you get back

Durationmain answer
Total days
Total hours
Total minutes
Total seconds
Business hours
Only the parts of the span that fall inside a working day.
Equivalent working days
Calendar days touched

What this assumes

  • A day is exactly 24 hours and a week exactly 168; leap seconds and daylight saving are outside this timeline.
  • Business hours use one continuous window per working day, with no public holidays and no breaks.
  • Both times are read on the same clock — convert time zones before entering them if the ends are in different zones.

About this calculator

Two moments in time, and the exact gap between them: days, hours and minutes, plus the totals in every single unit, plus how much of that gap was actually working time.

How to enter the times

Give each end a date and a time on the 24-hour clock — 0 is midnight, 13 is 1 pm. The arithmetic is done in whole minutes since a fixed epoch, so nothing is rounded and nothing depends on the time zone your browser happens to be in. If you put the end before the start, the calculator shows the gap anyway and says it has done so.

Business hours

The business-hours figure is the part of the span that falls inside a working day. Open "More options" to set when your working day starts and ends and whether weekends count. The calculator then walks the span one calendar day at a time and adds up the overlap between your span and that day's open window — so a Friday 4 pm to Monday 10 am gap comes out as two working hours under a 9-to-5 Monday-to-Friday definition, not 66.

This is the number that support SLAs, legal deadlines and billing usually mean. Two things it deliberately does not know: public holidays, which vary by country, state and company and would need a maintained table to be honest about; and anything other than a single continuous window per day, so a split shift with a two-hour lunch break needs the working day narrowed to compensate.

Days, hours, and what those words mean

A "day" here is exactly 24 hours and a "week" exactly 168, which is what you want for elapsed-time arithmetic. Calendar months and years are not fixed lengths — a month is anywhere from 28 to 31 days — so the unit table stops at weeks rather than pretending otherwise. If you want month or year arithmetic on whole dates, the date calculator does that properly.

Daylight saving is the other place a "day" stops being 24 hours: in a spring-forward local day there are only 23. This calculator works in a single continuous timeline, so if your two points straddle a clock change in a real time zone, the wall-clock difference and the elapsed time differ by an hour. Convert both ends with the time zone converter first if that matters.

Where the precision goes

Everything is integer minutes, so the totals are exact rather than accumulated floating-point sums. Total seconds are therefore always a whole number, and total days is that count divided by 1440 — the only place a fraction appears.

Frequently asked questions

How many hours are between two dates and times?

Take the total minutes between them and divide by 60. The calculator does this exactly in integer minutes, so a span of 7 days and 8.5 hours reads as 176.5 hours, not 176.4999.

What counts as a business hour here?

Any minute of the span that falls inside your defined working window on a working weekday. Weekends are excluded by default and can be switched on individually.

Does it know about public holidays?

No, deliberately. Holiday calendars differ by country, state and employer, and a hard-coded list would be wrong for most people. Subtract them yourself, or narrow the working days.

Why is a day exactly 24 hours here?

Because this is elapsed-time arithmetic on a single continuous timeline. Real local days can be 23 or 25 hours around a daylight-saving change; convert both endpoints first if your span crosses one.

Can the end be before the start?

Yes. The calculator reports the size of the gap and flags that the two are the wrong way round, rather than refusing or showing a negative day count.

Put this calculator on your own site

A working duration, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.

Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.

Time Duration Calculator by CalculateItNow

The page's own title. The clearest description of what the link leads to.

The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.

Browse every calculator widget·How to add it to WordPress, Squarespace or Wix

The questions people ask next to a duration.

All everyday calculators·Browse everything