Skip to content
Sideways hourglass|DST safe

Hours Between Two Datetimes

Count the elapsed wall-clock hours between two datetimes - to the minute. Bespoke sideways hourglass SVG streams one grain per elapsed hour, while the result card shows the total plus a days-and-hours breakdown.

Hours/day
24
Hours/week
168
Hours/year
8766
DST
Auto

Quick Conversion

Formula: days = hours / 24

Sideways hourglass

SVG of an hourglass turned on its side. The left bulb represents the start time, the right bulb the end time, and the central stream visualises 50 hours flowing between them.50 hour grains streaming left -> rightSTARTEND
Result
72.00 total hours
Breakdown: 3d 0h 0m
ISO 8601: P3DT0H0M

Common hour spans

HoursDays + hoursDays (decimal)
10d 1h0.042
60d 6h0.250
80d 8h0.333
120d 12h0.500
241d 0h1.000
361d 12h1.500
482d 0h2.000
723d 0h3.000
964d 0h4.000
1205d 0h5.000
1687d 0h7.000
24010d 0h10.000
33614d 0h14.000
72030d 0h30.000
8766365d 6h365.250

Need minutes? Minutes between dates.

Formula
hours = (end_ms - start_ms) / 3,600,000

Worked: 2026-05-27 09:00 to 2026-05-30 09:30 -> 261,000,000 ms / 3,600,000 = 72.5 hours = 3 days 0 hours 30 minutes. UTC-millisecond subtraction is DST-safe.

How to count hours between two datetimes

  1. 1
    Enter the start datetime in the first datetime-local input.
  2. 2
    Enter the end datetime in the second input.
  3. 3
    Watch the hourglass stream one grain per elapsed hour.
  4. 4
    Read total hours plus a days + hours + minutes breakdown.
  5. 5
    Save to the browser-local history.

From Egyptian decans to UTC milliseconds: the history of the hour

In 2026, an Austin freelance designer billing a corporate client in 6-minute increments needs hour totals that survive DST changes. This calculator uses UTC millisecond subtraction so spring-forward and fall-back never corrupt the invoice line item.

The hour as a unit of civil time descends from the ancient Egyptian division of day and night into twelve segments each, around 2100 BCE. The Egyptians used decan stars to mark the night hours; the daytime hours varied seasonally because they were equal fractions of the daylight period. The fixed-length equinoctial hour we use today - one twenty-fourth of a mean solar day - was popularised by Hellenistic astronomers including Hipparchus (c. 150 BCE) and standardised globally by the International Meridian Conference of 1884.

The modern second, of which there are 3600 in an hour, was defined by the 13th General Conference on Weights and Measures (CGPM) in 1967 as 9,192,631,770 periods of the radiation emitted by a caesium-133 atom transitioning between its two hyperfine ground states. UTC (Coordinated Universal Time), adopted in 1972, ties civil time to this atomic second and inserts leap seconds when the rotation of the Earth drifts. This calculator uses the JavaScript Date primitive, which is UTC-based and millisecond-precise.

ISO 8601, published in 1988 by the International Organization for Standardization, formalised the YYYY-MM-DDTHH:MM:SS extended datetime format that this calculator accepts via the HTML5 datetime-local input. The T separator between date and time is mandatory in strict ISO 8601. The format eliminates the regional MM/DD vs DD/MM ambiguity that plagues American and European date strings.

Hour-counting is the unit of measure for hourly payroll (US Fair Labor Standards Act, 1938 - established the 40-hour workweek), aviation flight logs (FAA Part 61 - private pilots log flight time to the tenth of an hour), shipping (24/7 logistics, where transit time is expressed in hours), and incident response (mean time to resolve, MTTR, is measured in hours). In every case the precise hour count between two timestamps - not just calendar days - is what matters.

Daylight Saving Time introduces a 23-hour day in spring and a 25-hour day in autumn for the half of the world that observes the seasonal shift. The US Standard Time Act of 1918 established the first national standard time zones and authorised DST; the Uniform Time Act of 1966 set the modern federal rules; the 2007 Energy Policy Act extended DST to its current span. A calculator that simply multiplies days by 24 is wrong by an hour on DST boundary days - this tool counts elapsed wall-clock hours using the user's local timezone.

Astronomy uses the hour as a unit of right ascension - 1h of RA = 15 degrees of arc, because the Earth rotates 360 degrees in 24 hours (15 degrees per hour). When astronomers say a star is at RA 5h 35m, they mean it transits the meridian 5h 35m after the vernal equinox point. This calculator does not handle astronomical hours, only civil hours.

For air travel, every commercial flight log is expressed in block hours - time from off the gate to on the gate. A trans-Atlantic flight is typically 7-8 block hours; trans-Pacific 12-15. The hourly difference between departure and arrival timestamps tells you the block time. Pilots log time in Zulu (UTC) precisely to avoid timezone confusion. This calculator's output is timezone-agnostic - just compute the elapsed civil hours.

Hours Between Dates: Frequently Asked Questions

Have more questions? Contact us

Used by freelancers, PMs, and HR ops

4.9
Based on 5,180 reviews

I switched from a spreadsheet to this for client invoicing. Datetime in, hours out, no DST drift on March 13. The hourglass SVG is honestly delightful - I see the stream of hours and it visualises a 38-hour project nicely.

M
Marcus Holloway
Freelance graphic designer in Austin billing in 6-minute increments
May 21, 2026

Cutover from Friday 18:00 to Monday 18:00 is exactly 72 hours but our team kept arguing it was 71 (forgetting the DST shift). This tool settled it - 72.0 every time.

A
Aleksandra Wisniewski
Project manager running a 72-hour go-live window in Warsaw
April 18, 2026

Shift overlap math is hard. Datetime A to datetime B, total hours, plus days+hours breakdown - exactly what I needed. The bg yellow inputs and clear primary widget make me trust the number.

J
Jamal Okonkwo
HR analyst at a Lagos BPO handling shift schedules across 4 time zones
March 15, 2026

Drivers run 14-hour days with rest periods of 10 hours. I subtract end-of-rest from start-of-rest, this calculator gives me 10:00 and that satisfies the EU mobile worker directive audit trail.

S
Sara Lindqvist
Accountant calculating overtime hours for a Stockholm dispatch fleet
February 26, 2026

Love using our calculator?

Related tools

Learn More

Related Articles

Dive deeper with our expert guides and tutorials related to Hours Between Dates Calculator

Loading articles...