Date & Time Duration Calculator

Total Duration

4 Weeks, and 2 Days

Compare Calculations

Downloads

Includes your inputs and results for this calculation, plus any additional calculations you've compared.

How This Calculator Works

The duration between two dates is the exact span of time separating them — expressed as a precise count of days, or broken down into weeks, hours, and minutes. Enter a start date and an end date — each with an optional time — and this calculator shows exactly how much time lies between them: as a precise days/hours/minutes duration, and as that same span expressed in whole weeks and remaining days, which is often easier to picture than a large raw day count. Leave the time fields blank for a plain “days between two dates” answer, or fill them in for an exact duration down to the minute — useful for anything from counting down to an event, to timing how long a shift, trip, or meeting actually ran.

The Formula

The calculation is a straightforward subtraction, expressed in minutes and then broken back down:

Total Minutes=End MomentStart Moment\text{Total Minutes} = \vA{\text{End Moment}} - \vB{\text{Start Moment}}

That total is then split into whole days, remaining hours, and remaining minutes — the same way a digital countdown timer breaks seconds down into hours, minutes, and seconds. The day count is further split into whole weeks and remaining days:

  • Weeks: Total Days÷7\vC{\text{Total Days}} \div 7, rounded down.
  • Remaining days: Total Daysmod7\vC{\text{Total Days}} \bmod 7 (whatever’s left over after removing full weeks).

Entering the exact same date and time for both start and end correctly gives a duration of 0 — there’s no elapsed time between a moment and itself. Leaving both time fields blank treats each date as midnight, which reproduces the calculator’s original “days between two dates” behavior exactly.

Worked Example

From January 1, 2024 to January 31, 2024 (no times entered):

  1. Total days: 311=3031 - 1 = \vC{30}.
  2. Weeks: 30÷7=4\vC{30} \div 7 = 4, with a remainder.
  3. Remaining days: 30mod7=2\vC{30} \bmod 7 = 2.

That’s 30 days, or 4 weeks and 2 days.

Adding times changes the precision, not the method: from 10:30 PM on January 1 to 1:15 AM on January 3, the duration is 1 day, 2 hours, and 45 minutes — the same subtraction, just carried down to the minute instead of stopping at whole days.

Source: Wikipedia: Gregorian Calendar.

Frequently Asked Questions

Does this count the start and end date both as full days?

The result is the number of days elapsed between the two dates — the same date entered twice gives 0 days, matching how "days until" or "days since" is normally meant.

Do I have to enter a time?

No — the time fields are optional. Leaving them blank treats both moments as midnight, which is exactly the plain "days between two dates" behavior. Add a time on either or both to get a precise days/hours/minutes duration instead.