Guides

How to Measure Time Between Dates in Any Unit

How to measure time between dates in any unit: From and To inputs, the end-date rule, hand calculation across months and leap years, and a February example.

Miryori Editorial Team4 min read
Try the Time Between Dates Calculator

A date difference looks simple until the dates cross a month, a leap day, or a year boundary. The time between dates calculator removes the guesswork: it reports the span in any unit from seconds to years, and it can leave out weekends or selected weekdays. Here is how the count is defined and how to reproduce it yourself.

The time between two dates is the number of days from a start date to an end date, reported in any unit from seconds to years. By default the start date is counted and the end date is not; the include-end-date option adds the final day. For dates in one month, subtract the day numbers; across months or years, add whole months and years as days and allow for leap years.

How do you calculate days between dates by hand?

If both dates are in the same month of the same year, subtract the smaller day number from the larger one. February 12 to February 19 is 19−12=719 - 12 = 7 days. For dates farther apart, add multiples of 3030, 3131, and 365365 for the extra months and years; there is no single equation that covers every calendar layout, so you work it out piece by piece.

A general approach is to add three quantities: the days from the starting date to the end of its month, the days from the start of the end date's month to the end date, and the whole months and years in between converted to days. The calculator's own rule is much shorter:

time between=d2−d1+include end date\text{time between} = d_2 - d_1 + \text{include end date}

Here d1d_1 is the From date, d2d_2 is the To date, and the end-date term is 00 by default and 11 when the option is ticked. Leap years need special care: they have 366366 days, and February has 2929 days instead of the usual 2828.

What inputs and options does the calculator offer?

Enter the starting date in the From field — a date-picking widget pops up, but dates can also be typed in various text formats — then enter the end date in the To field. The result appears in Time between, where the unit can be switched from the default of days to anything between seconds and years.

Field or option What it does Default or rule
From Starting date; calendar widget or typed text formats Start of the span
To End date End of the span
Time between Calculated span; unit switchable from days to seconds or years Unit starts at days
Include end date Adds the final calendar day to the count Off; end date excluded
Include / exclude some week days Opens the seven per-weekday selectors Unset
Mondays through Sundays Per-weekday choices, available once the weekday option is set All off (value 0)
Working time Weekday-only span Calculated output
Custom time Span using the selected weekdays Calculated output

You can also choose to include the end date, include or exclude weekends so only working days are counted, or include or exclude particular days of the week entirely.

How do you find an end date from a time span?

The calculator runs in reverse as well. Fill in the From date and the Time between value instead of the To date, and it works out the end date that lies that amount of time after the start. The same unit switch applies, so the span can be entered in days, seconds, years, or any unit in between.

Worked example: February 12 to February 19

Take the simple case from the source: a start date of February 12 and an end date of February 19. Both dates are in the same month, so subtract the day numbers: 19−12=719 - 12 = 7 days. With the end date excluded, Time between shows 7 days. Ticking the include-end-date option adds the final day and gives 8 days.

Frequently Asked Questions

How much time is there between New Year's and Christmas?

There are 358 days between January 1 and December 25, not counting Christmas Day itself — 359 days if you include the 25th. In the other direction, there are 7 days between Christmas Day and New Year's Day.

How much time is there between full moons?

There are roughly 29.5 days between full moons and between any two consecutive repeated moon phases. A year usually has twelve full moons; when the calendar and lunar phases align, a thirteenth full moon occurs and is called a blue moon.

Can I type dates instead of using the calendar picker?

Yes. The From field opens a date-picking widget, but you can also enter a date in various text formats. The To field accepts an end date in the same way.

References

  • Omni's time between dates calculator content: calculator steps, manual calculation notes, and leap-year guidance.
  • The calculator's own equations for the day span and the optional end-date term.
  • Calendar conventions for month lengths and leap years used when working out a date difference by hand.
Calculator

Time Between Dates Calculator

Calculate Time Between Dates with practical everyday formulas, interactive references and step-by-step results. Free, fast and private.

Try the Time Between Dates Calculator