Date Difference Calculator

Calculate the exact difference between two dates in days, weeks, months, and years. Also shows total hours, minutes, seconds, and estimated business days.

Select Dates

Please select both a start date and an end date to see results.

How to Use This Tool

  1. Select the Start Date.
  2. Select the End Date.
  3. View the total number of days between the two dates instantly.
  4. Check the Duration Breakdown card for the difference expressed in years/months/days, months/days, and weeks/days.
  5. Check the Time Units card for the total in hours, minutes, seconds, and approximate business days.

Formula & How It Works

Total Days Between Dates

totalDays = floor(|endDate − startDate| ÷ 86,400,000 ms)

The tool takes the absolute difference between the two dates in milliseconds and divides by the number of milliseconds in a day to get the total day count, regardless of which date was entered first.

Years, Months, Days Breakdown

years = full years between dates; months = remaining full months; days = leftover days

The calculator steps from the earlier date to the later date, counting complete years first, then complete months within the remainder, then whatever days are left — mirroring how people naturally describe durations.

Approximate Business Days

businessDays = round(totalDays × 5 ÷ 7)

Since a standard week has 5 working days out of 7 calendar days, multiplying the total day count by 5/7 gives an estimate that does not account for public holidays.

Practical Examples & Common Use Cases

Finding days between a project start and deadline

From January 1, 2026 to March 15, 2026: totalDays = 73 days, which breaks down to 2 months and 14 days, or 10 weeks and 3 days.

Calculating age-like duration in years, months, days

From June 10, 2020 to July 27, 2026: years = 6, months = 1, days = 17, giving "6 years, 1 month, 17 days."

Estimating business days for a 30-day period

For a 30 calendar day span: businessDays = round(30 × 5 ÷ 7) = round(21.43) = 21 business days (approximate, ignoring holidays).

Frequently Asked Questions

The calculator starts from the earlier date and counts forward. It first determines how many complete years fit between the dates, then how many additional complete months, and finally the remaining days. This mirrors how people naturally think about durations, like saying "2 years, 3 months, and 10 days."

Business days are approximated using a ratio of 5/7 (five working days per seven calendar days). This gives a reasonable estimate for most cases but does not account for public holidays, company-specific holidays, or custom work schedules. For exact business day calculations, a dedicated calendar with holiday data is recommended.

No, the calculator uses the absolute difference between the two dates. Whether you put the earlier date first or second, the result will be the same positive duration. The tool always shows the dates in the order you entered them for clarity.

Yes, the calculator uses JavaScript's built-in Date object, which correctly handles leap years. February 29th in leap years is properly accounted for in all calculations, ensuring accurate day counts across any date range including those spanning multiple leap years.

Related Tools