Time Duration Calculator

How long between two moments, in your browser.

Free, no limit Nothing uploaded No sign-up Works on mobile

How long between two moments

Give it two dates and two times and it tells you the gap: in days and hours, in total hours, in total minutes, and in days as a decimal. Four ways of saying the same thing, because which one you need depends on what you are filling in.

The answer is worked out in UTC on purpose. A daylight saving change adds or removes an hour from a calendar day, and a duration calculator that quietly applies it gives an answer nobody asked for. If you are counting hours between two clock readings, you want the clock arithmetic.

Put the later moment first if you like. The result is the distance between them either way, and the page says when you have them the other way round rather than handing back a negative number.

The gap between two dates and times being measured
How it works

Type, and read the answer

There is no button to press and nothing to wait for. The sum runs as you type.

1

Fill it in

Times can be written any way you like: 9, 09:00, 0900 or 9am all mean the same thing.

2

Read both forms

Hours and minutes for a person, decimal hours for a payroll system or an invoice.

3

Check the working

Every row shows its own total, so a figure that looks wrong can be traced to the day it came from.

How the gap is measured

Both moments are turned into a count of seconds since a fixed point, and one is subtracted from the other. The count is built in UTC, which is the decision worth explaining.

Every year, in most of the world, one calendar day is twenty three hours long and another is twenty five. If a duration calculator applies that, the answer to "how many hours between these two clock readings" changes depending on the date, which is almost never what somebody counting hours wants. Doing the arithmetic in UTC gives the clock answer.

If what you need is what the wall clock will say after a certain number of hours, in a place that changes its clocks, that is a different question and needs a timezone aware tool. This one measures elapsed time.

The same gap, four ways

BetweenDays and timeTotal hoursTotal minutes
09:00 and 17:30 the same day0 days 8:308.50510
Monday 21:00 and Tuesday 09:000 days 12:0012.00720
1 March and 1 April31 days 0:00744.0044,640
Friday 17:00 and Monday 09:002 days 16:0064.003,840

The third row is the one that surprises people. March has 31 days, so a month is not a fixed length and neither is a year. Any answer given in months would have to pick a definition, so this page does not offer one.

Four gaps worked out

A working day

From 09:00 to 17:30 on the same day is 0 days and 8:30, which is 8.50 total hours and 510 minutes. The decimal figure is what an invoice wants; the hours and minutes is what a person wants.

Overnight

Monday 21:00 to Tuesday 09:00 is 0 days and 12:00. Twelve hours, and less than one day, even though two calendar dates are involved. That difference between elapsed days and calendar days is where most disagreements about durations come from.

A month

1 March to 1 April is 31 days exactly, which is 744 total hours. 1 February to 1 March is 28 days and 672 hours, or 29 and 696 in a leap year. Same distance on a calendar, three different answers in hours, which is why nothing here is reported in months.

A weekend

Friday 17:00 to Monday 09:00 is 2 days and 16:00, or 64 hours. Three calendar days are crossed and the elapsed time is under three days. If what you need is working days the answer is different again, because two of those days are not working days at all.

Three definitions of a day, three correct answers, one question. Being clear about which one is being asked for is most of the work.

What people measure

  • Notice periods and deadlines, where the answer has to be in days and the start is halfway through one.
  • How long a job actually took, from the moment it started to the moment it finished, across nights and weekends.
  • Time until something: a flight, an exam, a delivery window.
  • Billing, where total hours as a decimal is the number that goes on the invoice.

Days, and what a day means

A day here is twenty four hours. That sounds obvious and is worth saying, because two other definitions are in common use and give different answers: calendar days, which counts the boundaries crossed rather than the time elapsed, and working days, which skips weekends.

From Monday at 9pm to Tuesday at 9am is half a day by elapsed time, two calendar days by the boundaries crossed, and two working days on a timesheet. This page measures elapsed time, which is the one you want when the question is how long something took.

Nothing you type leaves the page

A timesheet says where somebody was and for how long. A duration between two dates is often a contract, a notice period or a medical appointment. Neither is anybody else's business, and neither is sent anywhere.

The whole calculation is a few lines of arithmetic running in your browser as you type. There is no request to a server, no account, nothing stored and nothing to delete afterwards. Disconnect from the internet once the page has loaded and it carries on working, which is the simplest demonstration there is.

That is not a special measure taken for this page. It is how every tool on this site works, because the alternative is asking people to hand over something private in exchange for arithmetic they could have done on paper.

How this compares with the alternatives

Counting on a calendar

Fine for whole days and hopeless once times are involved, which is most of the time: a notice period that starts at four in the afternoon does not end at midnight.

A spreadsheet

Subtracting one date from another gives a number of days as a decimal, which is correct and hard to read. Turning 2.6667 into two days and sixteen hours is the part this page does for you.

Adding it up in your head

Reliable across a single night and not across a weekend or a month boundary, where the number of days in the month starts to matter.

If the answer looks wrong

It says nothing at all

Both dates have to be filled in. The times can be left blank, in which case they are treated as midnight.

The number of days is not what I counted

A day here is twenty four hours of elapsed time, not a calendar boundary crossed. From Monday evening to Tuesday morning is less than one day by this measure and two days by a calendar.

There is an hour missing or spare

There should not be, because the arithmetic is done in UTC and ignores daylight saving on purpose. If you expected the clock change to be included, this is not the tool for that.

I need the answer in months

There is no honest way to give one. A month is between 28 and 31 days, so any figure in months would depend on which months you crossed. Total days is the number that means something.

Free, with no account and no limit

No sign-up, no daily cap, nothing held back behind a paid tier. The calculation costs us nothing because it happens on your device.

If you need the other direction, converting a number of hours into minutes or days into hours, our hours and minutes converter and days to hours converter do exactly that, with charts and the formula shown.

And if what you are really doing is working out a percentage of a total, or a percentage increase, the percentage calculator shows every step of the working rather than just the answer.

FAQ

Time Duration Calculator

The questions people ask most about this calculation.

Put both dates and both times in. The gap appears in days and hours, total hours, total minutes and decimal days, all at once.

Both. A day here means twenty four hours of elapsed time, not a calendar boundary, so 9pm on Monday to 9am on Tuesday is half a day.

Nothing breaks. The gap is the same either way, and the page tells you that the second moment comes first.

It deliberately does not. The calculation is done in UTC so a clock change cannot silently add or remove an hour from your answer.

Yes. An empty time is treated as midnight, which is what you want when you are counting whole days.

No. Everything is worked out in your browser as you type.

Completely, with no sign-up, no limit and nothing held back. The arithmetic runs on your device and costs us nothing to provide.

No. The page you are on is the whole thing, and it works the same on Windows, macOS, Android and iPhone.

Yes. The fields accept the way people type on a phone, including 0900 and 9am, and the number pad comes up for the time boxes.

No. Nothing is transmitted and nothing is saved. Reload the page and it is empty again.

Yes. A time between two times and a calculate time all describe this page. The names differ because people describe the same job differently; the job itself does not change.

Need a different tool?

Over a hundred free tools, all running in your browser. Nothing is uploaded and nothing is capped.