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.
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.
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.