Date Difference Calculator - Days Between Dates

Select Dates & Mode

Calculate the exact number of days, weeks, months, or years between any two dates. Count business days only, or add and subtract time from any date.

Select mode

Enter dates

Choose calculation type

View results

Day counts follow the calendar and any holiday settings you chose. Deadline rules differ. The US federal court rules, for example, leave out the day of the event that starts the count and move a deadline that lands on a weekend or holiday. Some rules count only business days. Confirm the rule with the court, agency or contract.

Formulas and sources

Each formula this calculator uses, where it comes from, and what it leaves out. "How it works" shows the same formula with your own numbers.

Duration

Duration mode

Duration = End Date - Start Date
Duration
years, then months, then days between the dates
End Date
the second date
Start Date
the first date

Total Days is the end date minus the start date, so January 1 to January 2 is 1 day. When a month has no matching day, that month is complete on the 1st of the next month: January 31 to March 1 is 1 month and 0 days. Total Weeks counts whole weeks, and Total Hours is the days × 24.

Source: Uses the Gregorian calendar as the JavaScript and HTML standards define it [1][2]. The month-end rule is CalcTrail's own, the one the Age Calculator uses. Total Days leaves out the start date and counts the end date, as the Federal Rules of Civil Procedure count a period of days before their weekend rule [3].

Working days

Business Days mode

Working Days = Days in Range - Weekends - Holidays
Working Days
the days in the range that are neither weekend days nor holidays
Days in Range
every date from the start to the end, both counted
Weekends
Saturdays and Sundays
Holidays
weekdays that are holidays: US federal holidays when you exclude them, and your own dates

A federal holiday on a Saturday is counted on the Friday before, and one on a Sunday on the Monday after, as for most federal employees.

Source: Uses the eleven legal public holidays of 5 U.S.C. 6103 [4], on the days OPM lists them as observed [5]. The dates used here match OPM's published 2026, 2027 and 2028 schedules.

Adding time to a date

Add/Subtract mode, when adding

Final Date = Start Date + Duration
Final Date
the date reached
Start Date
the date you start from
Duration
the years, months and days you enter

Years and months are applied first, then days. A date past the end of a shorter month stops on that month's last day: January 31 + 1 month is February 28 (29 in a leap year).

Source: The month-end rule is the one the OpenDocument standard sets for EDATE [6].

Subtracting time from a date

Add/Subtract mode, when subtracting

Final Date = Start Date - Duration

Same symbols as above, counted back: March 31, 2026 − 1 month is February 28.

Source: The month-end rule is OpenDocument's EDATE rule [6].

Sources

  1. Ecma International. ECMA-262, ECMAScript 2026 Language Specification, §21.4.1.1 Time Values and Time Range, and §21.4.1.5 DaysInYear. 17th edition, June 2026.
  2. WHATWG. HTML Living Standard, §2.3.5 Dates and times. Living Standard, read October 5, 2026.
  3. U.S. Government Publishing Office. United States Code, Title 28, Appendix, Federal Rules of Civil Procedure, Rule 6: Computing and Extending Time; Time for Motion Papers, Rule 6(a)(1). 2024 edition.
  4. U.S. Government Publishing Office. United States Code, Title 5, Section 6103: Holidays, subsections (a) and (b)(1). 2024 edition.
  5. U.S. Office of Personnel Management. Federal Holidays, the 2026, 2027 and 2028 schedules. Undated page, read October 5, 2026.
  6. OASIS. Open Document Format for Office Applications (OpenDocument) Version 1.3, Part 4: Recalculated Formula (OpenFormula) Format, §6.10.8 EDATE. OASIS Standard, April 2021.

What this calculator does not cover

  • Holiday exclusion covers the eleven US federal holidays, on the days they are observed, and any dates you add. It does not include Inauguration Day, state or local holidays, company closures or other countries' holidays unless you add them.
  • It does not apply a court's or agency's deadline rules, such as moving a deadline off a weekend or holiday.
  • Dates before a country adopted the Gregorian calendar are read as Gregorian dates.
  • It counts whole days. For hours and minutes within a day, see the Time Calculator.

Sources checked on .

Help

Quick Start Guide

  1. Select mode: Choose "Duration" for the time between two dates, "Business Days" for the working days between them, or "Add/Subtract" to move a date forward or back.
  2. Enter dates: Select start and end dates, or use presets like Today and Next Week.
  3. Choose calculation type: Select All Days or Working Days (excludes weekends).
  4. View results: See a breakdown including years, months, days, and weeks.
  5. Use presets: Quick access to common dates for faster calculations.
  6. Export results: Save calculations to JSON, CSV, or PDF.

Frequently Asked Questions

Select 'Duration', enter your start and end dates, and choose All Days or Working Days. Under All Days it shows the duration in years, months and days, with total weeks, days and hours; under Working Days it shows the working days, weekend days and holidays. Use date presets like 'Today' or 'Next Week' for quick selections. If the end date is earlier than the start date, the calculator swaps them and tells you. To see how many days are left until an event, enter today as the start date and the event as the end date; for days since an event, enter that day as the start date and today as the end date.

Last updated