BCBetter Calculators

Date Difference Calculator

Find the exact number of days, weeks, months, and years between any two dates — including business days.

🧮

Enter your values and click Calculate

How It Works

Both dates are converted to JavaScript Date objects at midnight local time. The earlier timestamp is subtracted from the later one and divided by 86,400,000 milliseconds (one day) to get total calendar days. For the years-months-days breakdown, the calculator walks month by month from the earlier date, borrowing days correctly when the end day is less than the start day and borrowing months when the end month is less than the start month. Weeks are total days ÷ 7 with the remainder as extra days. Business days are tallied by iterating each day in the range and skipping any day where getDay() returns 0 (Sunday) or 6 (Saturday). The calculator accepts dates in either order and always returns a positive result.

Examples

January 1, 2020 → January 1, 2025
A clean 5-year span — useful for checking contract terms or anniversary counts.
Result: Exactly 1,826 total days (5 years, 1 leap year adds the extra day), 1,305 business days, 261 weekend days.
March 15, 2023 → November 30, 2023
Calculating the duration of a project or lease agreement within a single year.
Result: 260 total days, 8 months 15 days, 37 weeks 1 day, 186 business days.
July 4, 2024 → July 4, 2026
A two-year span crossing a leap year — useful for multi-year contracts.
Result: 731 total days (2 years including the 2024 leap year), 523 business days.

Frequently Asked Questions

Does this calculator include or exclude the start and end dates?
The count is exclusive of the start date and inclusive of the end date — the standard convention for duration calculations. For example, from Jan 1 to Jan 3 is 2 days (Jan 2 and Jan 3). If you need to include the start date, simply add 1 to the total days result.
How are business days calculated?
Business days count Monday through Friday only, excluding Saturdays and Sundays. Public holidays are not subtracted because they vary by country, state, and employer. For deadline calculations that require holiday exclusions, manually subtract the known holidays from your result.
How does the calculator handle leap years?
JavaScript's Date object handles leap years natively, so February 29th is counted as a normal day when it falls within the range. A four-year span that includes one leap year will have 1,461 days instead of 1,460.

Related Calculators