Connect via MCP →

Enter Calculation

Formula

Show calculation steps (1)
  1. Julian Day Number (per date)

    Julian Day Number (per date): Elapsed Days and Time Between Two Date-Times

    a = floor((14 - Month)/12), y = Year + 4800 - a, m = Month + 12a - 3. The Western year adds the era base (e.g. Showa 1925) to the entered year. The same JDN formula is applied to both the start and end date.

Advertisement

Results

Elapsed days (end - start)
0.96735
days
Weeks + days 0 weeks + 0 days
Days + hours 0 days + 23.2164 hours
Total hours 23.216389 hours
Total minutes 1,392.983333 minutes
Total seconds 83,579 seconds
Days + H:M:S 0 days + 23:12:59

What this calculator does

This tool computes the exact amount of time between a start date-time and an end date-time (end minus start). It returns the difference in several equivalent forms: total days, a weeks-plus-days split, a days-plus-hours split, total hours, total minutes, total seconds, and a clean days plus HH:MM:SS breakdown. It works for any proleptic-Gregorian calendar date, so it is universal and not tied to any country.

Timeline showing a start date-time and end date-time with the elapsed span between them
The elapsed duration is the end date-time minus the start date-time.

How to use it

Enter the start year, month, day and (optionally) the hour, minute and second, then do the same for the end date-time. Leave the time fields at 0 if you only care about whole days. The "era" dropdown defaults to CE / AD (Western year), where the year you type is used directly. The Japanese imperial era options (Meiji, Taisho, Showa, Heisei, Reiwa) are a regional convenience: they simply add a fixed offset to convert the typed year into a Western year before any math runs, so the elapsed result is identical regardless of era choice.

The formula explained

Each date is converted to a Julian Day Number (JDN) using the Fliegel-Van Flandern algorithm, which gives a continuous whole-day count that correctly handles leap years (including the century rule) and varying month lengths. The time of day is added as seconds. The elapsed seconds are then

$$\Delta t = \left(\text{JDN}_{e} - \text{JDN}_{s}\right)\cdot 86400 + \left(T_{e} - T_{s}\right)$$

and every other unit is derived by dividing or splitting that single number.

Diagram breaking total elapsed seconds into weeks, days, hours, minutes and seconds
Total seconds are converted into weeks, days, hours, minutes and seconds.

Worked example

Start: 2024-01-01 00:00:00. End: 2024-03-01 12:00:00. Because 2024 is a leap year, January (31) plus February (29) gives 60 whole days, plus a half day for 12:00, so the difference is \(60.5\) days \(= 5{,}227{,}200\) seconds \(= 1{,}452\) hours \(= 87{,}120\) minutes. The breakdown is 8 weeks + 4 days, or 60 days + 12:00:00.

FAQ

Can the result be negative? Yes. If the end is before the start, the totals are negative; the breakdown rows show the magnitude.

Does it count both endpoints? No. It measures the elapsed interval (end minus start), not an inclusive day count.

Are leap years handled? Yes, automatically, including the rule that years divisible by 100 are not leap years unless also divisible by 400.

Last updated: