Date Difference Calculator

Enter two dates to calculate the exact number of days, weeks, months, years, and total hours between them. Optionally include the end day in the calculation.

How to use this calculator

  1. Select the start date using the date picker.
  2. Select the end date using the date picker.
  3. Choose whether to include the end date in the total count.
  4. Read your total days, calendar breakdown (years, months, days), weeks, and hours.

Formula & method

Exact Calendar Difference Method

Total Days = (End Date − Start Date) in ms ÷ (1000×60×60×24) + [1 if inclusive]

Years, months, and days are computed by stepping through month lengths and leap years exactly.

Example

2026-01-01 to 2026-12-31 = 364 days (11 months, 30 days) or 365 days if inclusive.

Key insights

How to interpret your result

Total Days vs. Calendar Breakdown

Total days counts exact 24-hour periods, while calendar breakdown expresses the span in years, months, and remaining days.

Inclusive vs. Exclusive Dates

Standard date subtraction excludes the end day (Jan 1 to Jan 2 = 1 day). Inclusive counting adds 1 day (Jan 1 to Jan 2 = 2 days).

Frequently asked questions

How are leap years handled in date calculations?
Every February 29th that falls between the start and end dates is included in the total day count automatically.
Should I include the end date?
Exclude the end date for duration spans (e.g. hotel stays). Include the end date for event periods or inclusive day counting.

Related calculators

See all other calculators · Explore all online calculators