HomeDate & TimeDate Difference Calculator
Date and time tool

Date Difference Calculator

Calculate the exact interval between two dates in years, months, weeks, days, weekdays, and other useful formats.

All Calculators
Interactive calculator

Enter two calendar dates

Select a start date and an end date. The calculator will display several ways of describing the interval.

Select two dates

Your exact date difference and supporting results will appear here.

How do you calculate the difference between two dates?

The difference between two dates can be expressed as the total number of elapsed days or as a calendar interval in years, months, and days. Total days are calculated from the elapsed time between the two calendar dates. Calendar units are calculated by advancing from the earlier date in complete years and months before counting the remaining days.

Total-day formulaDate difference = Later date − Earlier date

The result is divided by the number of milliseconds in one day when dates are processed programmatically.

From January 1 to January 10

The dates are nine elapsed days apart when the starting day is excluded. Counting both January 1 and January 10 produces an inclusive count of ten calendar dates.

StartJanuary 1
Elapsed difference9 days
Inclusive count10 days
January 1January 10

Nine complete 24-hour intervals separate the two dates.

Different ways to measure a date interval

A single interval can be described in several valid ways. The most useful result depends on the purpose of the calculation.

01

Calendar difference

Expresses the interval in complete years, complete months, and remaining days.

02

Total days

Counts every complete elapsed day between the earlier and later dates.

03

Weeks and days

Divides the total day difference into complete seven-day periods and a remainder.

04

Business days

Counts weekdays while excluding Saturdays and Sundays. Public holidays are not automatically excluded.

Why months cannot all be treated as equal lengths

Calendar months contain 28, 29, 30, or 31 days. Because their lengths vary, a calendar result such as “one month” is not always equivalent to a fixed number of elapsed days.

The exact calendar difference therefore advances through complete months rather than dividing the total days by 30.

February28 or 29 days
April30 days
January31 days

Exclusive and inclusive date differences

Exclusive counting

Starting date is not counted

This measures elapsed time. From Monday to Tuesday, the difference is one day.

January 1 to January 10 = 9 days
Inclusive counting

Both boundary dates are counted

This counts calendar dates touched by the interval. It is often used for schedules and attendance periods.

January 1 through January 10 = 10 days

Calendar days vs weekdays

Calendar days include every day of the week. Weekdays include Monday through Friday and exclude Saturday and Sunday. The calculator does not exclude national or local public holidays because holiday calendars differ by country and region.

MonCounted
TueCounted
WedCounted
ThuCounted
FriCounted
SatWeekend
SunWeekend

How February 29 changes a date difference

A leap year contains 366 days instead of 365. When an interval crosses February 29, the total day count may include one additional day. The calculator counts every actual calendar day, including leap days.

February 28
February 29Leap day
March 1

How to subtract two dates manually

  1. 1
    Place the later date above the earlier date

    Confirm which date comes first before beginning the subtraction.

  2. 2
    Subtract the day values

    Borrow the number of days in the previous month when the later day value is smaller.

  3. 3
    Subtract the month values

    Borrow one year as 12 months when necessary.

  4. 4
    Subtract the years

    The result is the calendar interval in years, months, and days.

Errors to avoid when comparing dates

Counting both dates unintentionally

Decide whether you need elapsed days or an inclusive count before using the result.

Treating every month as 30 days

Calendar months have different lengths, so fixed 30-day division is only an approximation.

Ignoring leap years

An interval crossing February 29 can contain an additional elapsed day.

Calling weekdays business days

A true business-day result may also need to exclude official holidays.

Learn more about date differences

Use these guides for formulas, manual methods, examples, calendar rules, and different counting conventions.

Date Difference Calculator FAQs

How many days are between two dates?

Subtract the earlier date from the later date. The calculator reports the number of complete elapsed calendar days between them.

Does the calculator count the starting day?

The standard total-day result excludes the starting day because it measures elapsed time. Select the inclusive option to count both dates.

How are years, months, and days calculated?

The calculator advances through complete calendar years and months from the earlier date, then counts the remaining days.

Are weekends included?

Weekends are included in total calendar days. They are shown separately from the weekday count.

Are public holidays excluded?

No. Holiday rules vary by location, so the weekday result excludes Saturdays and Sundays only.

Can the dates be entered in either order?

Yes. The calculator identifies the earlier and later date and reports the direction of the interval.

How are leap years handled?

Every real calendar day is counted. An interval that crosses February 29 includes the leap day.

Why is one month not always 30 days?

Calendar months contain between 28 and 31 days. Exact calendar-month results therefore use month boundaries rather than a fixed 30-day conversion.

Calculate another interval

Compare any two calendar dates

Return to the calculator to view the exact calendar difference, total days, weeks, weekdays, weekends, and leap-day information.

Use the calculator