Free Online Developer Tool

Date Difference Calculator

Calculate the number of days between two dates, view the difference in weeks, months, and years, and estimate working days excluding weekends.

Calendar Day Difference Years, Months & Days Working Days Inclusive Date Count

Find the time between two dates in days, weeks, months, years, and working days.

Calendar Days Working Days Leap-Year Aware

Choose two dates to calculate the difference.

Total calendar days — Select your dates above
Weeks and days — Based on the selected day count
Calendar difference — Complete years, months, and remaining days
Working days — Monday through Friday
Weekend days — Saturday and Sunday
Total weeks — Including partial weeks

Calculation details

Date range —
Counting method Elapsed days
Days added by inclusive counting 0

Working days exclude Saturdays and Sundays only. Public holidays, local workweek rules, and special contract or legal counting rules are not included.

How to Calculate the Difference Between Two Dates

Use this Date Difference Calculator to find how much time separates two calendar dates. It shows the total number of days, the equivalent weeks and remaining days, a calendar breakdown in years, months, and days, and an estimate of working days.

How to Use the Calculator

  1. Choose a start date using the first date field.
  2. Choose an end date using the second date field.
  3. Optionally select Count both the start and end dates if your count should include both calendar dates.
  4. Read the results. They update automatically when you change a date or the counting option.

What Do the Results Mean?

  • Total calendar days: The number of days between the dates. By default, this is the elapsed difference and does not add an extra day for inclusive counting.
  • Weeks and days: The total day count expressed as complete weeks and remaining days.
  • Calendar difference: The elapsed span expressed as complete calendar years, months, and remaining days. It is not calculated by dividing the total days by an average month length.
  • Working days: Weekdays from Monday through Friday within the selected counting range.
  • Weekend days: Saturdays and Sundays within the selected counting range.
  • Total weeks: The total day count divided by seven, including any partial week.

Example: January 1 to January 10

From January 1 to January 10, the elapsed difference is 9 days, or 1 week and 2 days. If you count both the start and end dates, the total becomes 10 calendar days. The same inclusive setting also affects the working-day and weekend-day counts.

Elapsed Days vs. Inclusive Counting

Elapsed counting measures the distance from the start date to the end date. For example, January 1 to January 2 is a difference of 1 day. Inclusive counting counts both date labels, so that same range contains 2 counted calendar dates.

The calendar difference in years, months, and days represents elapsed calendar time and does not change when inclusive counting is selected. Inclusive counting adds one day to the total-day, week, working-day, and weekend-day counts when applicable.

How Working Days Are Counted

This calculator treats Monday through Friday as working days and Saturday and Sunday as weekend days. It does not apply public holidays or country-specific workweek rules. If you are calculating a contract term, payroll period, delivery estimate, or legal deadline, check which counting convention applies to your situation.

Leap Years and Calendar Dates

The calculation uses calendar dates and accounts for February 29 in leap years. It compares date boundaries rather than dividing timestamps by the number of milliseconds in a day, avoiding errors caused by daylight-saving clock changes.

Limitations

  • The calculator compares dates, not times of day or time zones.
  • Working days exclude weekends only; public holidays are not included.
  • It does not determine legal, financial, employment, or contract-specific counting rules.
  • Results are based on the Gregorian calendar dates supported by the browser’s date input.

Frequently Asked Questions

How do I calculate the number of days between two dates?

Select the start date and end date. The calculator subtracts the earlier calendar date from the later one to find the elapsed number of days. Enable inclusive counting if you want to count both date labels.

Does the calculator include the start and end dates?

By default, it shows the elapsed difference between the dates. Select “Count both the start and end dates” to add one day to the total and count both endpoints.

Can it calculate the difference in years, months, and days?

Yes. It displays the elapsed calendar span as complete years, complete months, and remaining days. Calendar month lengths are used rather than treating every month as the same number of days.

Does the calculator account for leap years?

Yes. February 29 is included when it falls within the selected date range in a leap year.

How are working days calculated?

Working days are Monday through Friday. Saturdays and Sundays are counted as weekend days. Public holidays and country-specific working calendars are not excluded.

What happens if the end date is earlier than the start date?

The calculator automatically puts the dates in chronological order and displays the absolute difference. A status message tells you when the dates were entered in reverse order.

Are public holidays excluded from working days?

No. The working-day result excludes Saturdays and Sundays only. Public holidays vary by country and region, so they are not included in this calculation.

Can I use this calculator for legal deadlines or contracts?

You can use it for a general date calculation, but legal and contractual deadlines may follow specific rules about the first day, last day, weekends, or public holidays. Confirm the applicable rules before relying on the result.