How to Calculate How Many Hours Are Between Two Dates

Sometimes the only useful answer is a single number of hours: for a rental, a deadline, a support contract, a long process. This guide reduces the hours between two dates to whole days times 24 plus one small leftover piece, with the daylight-saving trap flagged before it catches you.

By Johnson Ramzan · Updated November 7, 2026

Open the Time Duration Calculator

Just need the number? The free time duration calculator returns the total hours between two dates and times instantly. This guide teaches the by-hand method so you can check any result yourself.
Home / Guides / Hours Between Two Dates

Hours are the working currency of a lot of practical arrangements. Equipment is rented by the hour or by the day with an hour count behind it. Support contracts promise a response within a number of hours. A chemical process, a charging battery and a marinating brisket all run for a stated number of hours that may span several dates. When the start and end are given as dates with times, the question is always the same: how many hours sit between them, exactly? This guide answers in hours alone - the unit rentals, response-time promises and deadlines are actually written in - rather than in days and weeks.

The method is deliberately plain. Peel off whole days, convert them at 24 hours each, then solve the small part-day remainder with ordinary clock subtraction. The remainder is the only place an error can hide, and it is never more than 24 hours wide, so it is easy to check. Resist the urge to count the span in calendar days and multiply blindly; the two clock times decide whether the last day is full, partial or borrowed.

The split method, step by step

  1. Move forward from the start date in whole days, keeping the same clock time, until you reach the end date or the day before it.
  2. Multiply the whole days by 24. That is the bulk of the answer.
  3. Work out the leftover from that anchor point to the exact end time. If the end time is later than the start time, it is a simple subtraction.
  4. If the end time is earlier, you anchored one day too far: take 24 hours off the day total and add the wrap-around stretch through midnight instead.
  5. Add the leftover to the day hours. Convert leftover minutes to a decimal by dividing by 60 if you need a single decimal figure.

Step 4 is the entire subtlety. Anchoring to the end date at the start time overshoots whenever the end clock time is earlier in the day, and the correction is always the same: one day fewer, plus a final stretch that runs past midnight.

Example 1: a four-day span with a tidy remainder

From Monday at 9:00 AM to Thursday at 3:00 PM. Anchor: Monday 9:00 AM to Thursday 9:00 AM is 3 whole days, worth 72 hours. The end time, 3:00 PM, is later than 9:00 AM, so the leftover is a plain 6 hours. Total: 78 hours. If the same span were billed at a day rate it would be quoted as 3 days 6 hours, and if a system wants one decimal number it is 78.0 hours exactly. Nothing in this example fights back, which is precisely why it is the shape to hope for.

Example 2: a rental that ends earlier in the day

A car is picked up Friday at 10:00 AM and returned Monday at 9:00 AM. Anchor: Friday 10:00 AM to Monday 10:00 AM is 3 whole days, 72 hours. But the car came back at 9:00 AM, an hour before the anchor time, so apply step 4: the true total is 72 - 1 = 71 hours. Seen the other way, Friday 10:00 AM to Sunday 10:00 AM is 48 hours, and Sunday 10:00 AM to Monday 9:00 AM is another 23 hours through midnight, giving the same 71. Whether the rental company charges for 71 hours or rounds up to 3 full days is a policy question; the measurement itself is 71 hours, and knowing it is what lets you spot a fourth day appearing on the invoice.

A large ornate railway station clock - How to Calculate How Many Hours Are Between Two Dates
Whole days times 24, plus one small leftover: the remainder is the only place an error can hide.

Example 3: minutes in the remainder

From January 5 at 8:30 AM to January 9 at 5:45 PM. Anchor: January 5 at 8:30 AM to January 9 at 8:30 AM is 4 whole days, 96 hours. Leftover: 8:30 AM to 5:45 PM is 9 hours 15 minutes. Total: 105 hours 15 minutes. As a decimal, 15 minutes is 15 / 60 = 0.25, so the span is 105.25 hours. This is the form timesheets, invoices and project trackers want, and the quarter hour is worth keeping: across a team of ten people logging the same span, dropping it would erase two and a half hours of recorded time.

Total hours are not working hours

One distinction protects you from a whole family of wrong answers. The hours between two dates, as calculated here, is every hour on the clock, nights and weekends included. Working hours are a filtered version: only the hours inside working days and working times. From Monday 9:00 AM to Thursday 9:00 AM there are 72 total hours, but at 8 working hours a day across Monday, Tuesday and Wednesday there are only 24 working hours. Neither number is wrong; they answer different questions. A server that ran all weekend consumed total hours. A support contract promising a response "within 8 business hours" is counting the filtered kind. Before calculating, decide which question is actually being asked, because the two answers can differ by a factor of three. Our guide to the duration between two dates and times covers the unfiltered span in full detail, including month boundaries and leap years.

The daylight-saving trap

Twice a year, in countries that observe daylight saving, a local day is not 24 hours long. In the United States the spring day in March has 23 hours and the autumn day in November has 25. So the local span from noon on March 7 to noon on March 9, 2026 is 47 hours, not 48: the 2 AM hour on March 8 simply does not exist. The same calendar span in November is 49 hours. Any calculation that crosses one of those weekends and must be exact, like hourly billing or a medication schedule, should either be done in UTC or checked against the transition dates. Spans that stay inside one season are unaffected, which is why the trap catches so few people, so completely.

Quick reference

SpanTotal hoursSpanTotal hours
1 day241 week168
2 days482 weeks336
3 days7230 days720
5 days12031 days744

Use the table for whole-day spans and add your leftover piece on top. Notice that a calendar month is never on it, because a month is 28 to 31 days and its hour count changes accordingly: 672, 696, 720 or 744 hours. Anyone quoting you a flat "hours in a month" figure is averaging, and averages are where small overcharges live.

Try it the fast way

The time duration calculator returns the total hours between any two dates and times directly, along with the days, minutes and seconds versions of the same span. If your span is actually a countdown to something, our guide to the time until an event frames the same subtraction the other way around, and the time calculator on the homepage will add several separate spans into one total.

Frequently asked questions

How many hours are in a week and in a month?

A week is exactly 7 x 24 = 168 hours, always. A month is not fixed: it holds 672 hours in a 28-day February, 696 in a 29-day February, 720 in a 30-day month and 744 in a 31-day month. That is why any calculation longer than a week should count the actual days rather than multiplying an average month.

Do I count partial hours between two dates?

Yes, if the times matter. Work out the whole days first, then the leftover hours and minutes, and express the minutes as a fraction of an hour: 30 minutes is 0.5 hours, 15 minutes is 0.25. A span of 4 days, 9 hours and 15 minutes is 105.25 hours, and dropping the quarter hour would understate it on every invoice.

How do I get working hours only, not total hours?

Count only the days that are working days, then multiply by the length of the working day. From Monday 9 AM to Thursday 9 AM is 72 total hours but only 24 working hours at 8 hours a day across the three working days. Keep the two numbers separate; contracts, SLAs and payroll each use a different one.

How do I calculate the hours between two dates in Excel?

Put each full date and time in its own cell and subtract: =end-start gives the span as a fraction of a day. Multiply by 24 to get total hours as a number, or format the subtraction as [h]:mm to read it as hours and minutes. Full dates make the formula handle overnight and multi-day spans with no extra work.

Why is my answer off by one hour?

The usual cause is daylight saving. In the US, clocks jump forward in March, so a local span from noon on March 7 to noon on March 9, 2026 is 47 hours, not 48, because one hour of that weekend does not exist. In November the same two-day span is 49 hours. UTC-based calculations never have this problem.

About the author
Johnson Ramzan builds and maintains every calculator on Time Calculator Tools himself, and he tests each one against worked examples he has done by hand before it is allowed near a reader. His guides follow US Department of Labor guidance on hours worked, overtime and rounding, and he writes them the way he would want a payslip explained to him: plain English, real numbers, and no step skipped. When a reader writes in with a shift pattern the tools handle badly, fixing it goes to the top of his list.
Last updated: November 7, 2026

Related guides

How to Calculate Duration Between Two Dates and Times

The complete method for date-time spans, with month boundaries, leap years and the years-months-days breakdown.

Read the guide

How to Calculate Duration When the Times Fall on Different Days

Travel, rentals and long processes that start on one date and finish on another, handled piece by piece.

Read the guide

How Long Has It Been? Working Out the Time Since an Event

When the end date is today, here is how to phrase the same span as an age, an anniversary or a day count.

Read the guide

How to Calculate Time Until a Future Event

The countdown version: how many hours, days and weeks remain before a deadline or departure.

Read the guide