Skip to content
CalcTide logo
Time & Date

Date Difference Calculator

From January 1 to February 15, 2026 there are 45 days, which is 6 weeks and 3 days. This date difference calculator gives you that answer for any two dates. Enter a start date and an end date, and the tool shows the total in days, weeks, months, and years. It is useful for tracking deadlines, planning projects, calculating age differences, or counting down to events. Calendar math looks simple until a date range crosses February, a leap year, or a year boundary, and hand-counted results start drifting off by a day or two. This tool avoids that by working with real calendar dates instead of a flat 30-day month assumption, so a range from January 31 to March 1 comes out correctly even though the months involved have different lengths.

Time & DateBy

Quick answer

The default count excludes the end date. Use the checkbox to include it if you need both endpoints counted.

Adds one extra day to include both the start and end date.

What this tells you

  • •The default count excludes the end date. Use the checkbox to include it if you need both endpoints counted.
  • •Months and years are calculated using calendar logic, not flat 30-day months, so February and leap years are handled correctly.
  • •The end date must be after the start date. The calculator returns a validation message if the end date is not later.
  • •Weeks and days are derived by dividing total days by 7, with the remainder shown as extra days.
  • •The years-months-days breakdown always adds up to the same total span as the plain day count, just expressed in larger units.

How to Use

  1. 1Select a start date.
  2. 2Select an end date that is later than the start date.
  3. 3Optionally check the box to include the end date in the count, which adds one extra day to every result.
  4. 4Review the results showing total days, weeks and days, months and days, and a full breakdown in years, months, and days.
  5. 5Use the years-months-days result for age-style reporting, and the plain day count for deadline or duration tracking.

How It Works

Formula

Total days = end date - start date (in days) If including end date: total days + 1 Weeks = total days / 7 (remainder = extra days) Months and years use calendar-based logic, not fixed 30-day months.

The calculator counts the number of complete days between the two dates. By default, it excludes the end date from the count, which is the standard convention for date ranges. When you check the include option, one extra day is added. Months are calculated using actual calendar months, so February and March boundaries are handled correctly instead of assuming every month is 30 days. The year breakdown is derived from the total months, dividing by 12 to get whole years and keeping the remainder as leftover months.

Calculation note: values are processed in the order shown above, using the current input units.

Worked Examples

Example 1: Simple Date Range

Start dateJan 1, 2026
End dateFeb 15, 2026
Result45 days

From January 1 to February 15 is 45 days (excluding the end date). That equals 6 weeks and 3 days, or 1 month and 14 days.

Example 2: Including End Date

Start dateMar 1, 2026
End dateMar 31, 2026
Include end dateYes
Result31 days

March 1 to March 31 is normally 30 days. Including the end date adds 1, giving 31 days, the full month of March. That equals 4 weeks and 3 days, or 1 month and 0 days.

Example 3: A short year-end range

Start dateDec 25, 2025
End dateJan 5, 2026
Result11 days

December 25 to January 5 crosses the year boundary, but the calendar-based logic still counts it correctly as 11 days, or 1 week and 4 days, since the calculation compares full dates rather than resetting at December 31.

Example 4: A leap-year February span

Start dateFeb 1, 2024
End dateMar 1, 2024
Result29 days

2024 is a leap year, so February has 29 days. February 1 to March 1 comes out to 29 days, or 4 weeks and 1 day, exactly 1 calendar month with no leftover days.

Example 5: A full calendar year

Start dateJun 1, 2025
End dateJun 1, 2026
Result365 days

A full year from June 1 to June 1 the following year is 365 days, since 2025 to 2026 does not include a leap day. The years-months-days breakdown shows this as exactly 1 year, 0 months, and 0 days.

Example 6: A one-year lease, inclusive and exclusive

Start dateAug 15, 2026
End dateAug 14, 2027
Include end dateYes
Result365 days (1 year, 0 months, 0 days)

Priya signs a lease that runs from August 15, 2026 through August 14, 2027 and wants to know how many days of rent it covers. With the end date excluded, the calculator reports 364 days, 52 weeks and 0 days, or 11 months and 30 days, because that count stops at midnight at the start of August 14. Ticking the include box counts August 14 itself, which gives 365 days, 52 weeks and 1 day, and exactly 1 year. A lease covers both its first and last day, so the inclusive answer is the one to use here.

Days in each month and the leap-year rule

Day counts for every month, the February leap-year row, and the running total of days through the end of each month in a common year. The total reaches 365 in December, or 366 in a leap year, because every month after February shifts by one day.

MonthDaysDays through month end (common year)
January3131
February (common year)2859
February (leap year)2960, and every later total is one higher
March3190
April30120
May31151
June30181
July31212
August31243
September30273
October31304
November30334
December31365
Leap-year rule366 in the yearDivisible by 4, except century years, unless divisible by 400. 1900 no, 2000 yes, 2024 yes, 2100 no.

Month lengths and the leap-year rule follow the Gregorian calendar introduced by the 1582 reform (papal bull Inter gravissimas). Dates are entered as YYYY-MM-DD, the ISO 8601 calendar date format. The calculator counts end date minus start date, so the end date is excluded. Ticking the include box adds one day.

Why include or exclude the end date matters

Date ranges can be counted two different ways depending on the situation. Excluding the end date, the default here, answers questions like how many nights between two dates or how many days until an event. Including the end date answers questions like how many calendar days a span covers in total, such as counting every day of a full month.

Both conventions are used in real scheduling and reporting, which is why this calculator makes the choice explicit with a checkbox rather than picking one silently. Getting this detail wrong is one of the most common sources of off-by-one errors in manual date math.

Time zones and daylight saving time do not change these results, because the calculator treats both dates as midnight-to-midnight calendar days and counts whole days. They do matter for hour counts. In the United States the Uniform Time Act of 1966 (15 U.S.C. 260a) sets the dates clocks move, and the day of a change has 23 or 25 hours, so two dates 364 days apart are not always 364 x 24 hours apart. Use an hours calculator when the clock time matters.

The day counts assume the Gregorian calendar, which the 1582 reform (papal bull Inter gravissimas) introduced and which ISO 8601 uses for the YYYY-MM-DD dates you enter. Records written before a country adopted it, such as English dates before September 1752, follow the Julian calendar, and the calculator does not convert them.

Including the end date adds exactly one day to every output. That is what you want for a lease, a count of days worked, or any span that covers both its first and last day, and what you do not want for nights or days remaining before a deadline. Business days are a different count again. For a result that skips weekends and holidays, use the business days calculator.

Business days calculator

Common mistakes

  • Entering the end date before the start date, which the calculator flags as invalid rather than returning a negative count.
  • Forgetting whether the count includes or excludes the end date, which shifts every result by exactly one day.
  • Assuming all months have 30 days when estimating manually, which drifts further off the longer the date range is.
  • Confusing calendar months with 4-week blocks. A calendar month is not always 4 weeks, since most months run longer than 28 days.
  • Not accounting for leap years when counting across February, which changes February's length from 28 to 29 days.

Embed this calculator on your site

Paste this code where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use as long as the credit line stays in place.

<script src="https://calctide.com/embed.js" data-tool="date-difference-calculator" async></script> <p style="font-size:12px;margin:4px 0 0">Date Difference Calculator by <a href="https://calctide.com/time-date/date-difference-calculator/">CalcTide</a></p>

Preview the embed at /embed/date-difference-calculator/.

Frequently Asked Questions

Enter a start date and an end date. The calculator counts the number of days between them, excluding the end date by default.
By default, no. You can check the include box to add the end date to the count, which adds one extra day.
Yes. The calculator shows results in days, weeks and days, months and days, and a full years-months-days breakdown.
Months are based on actual calendar months, not fixed 30-day blocks. This means February boundaries and varying month lengths are handled correctly.
The calculator will show a validation message because the end date must be after the start date. Same-day entries result in 0 days only when the end date is included.
Yes. The calculator uses actual calendar dates, so February 29 in leap years is counted correctly.
Yes. Enter a birth date as the start date and today's date as the end date to see the duration in years, months, and days.
Count the days between the dates and divide by 7. The remainder is the extra days. For example, 45 days is 6 weeks and 3 days (45 / 7 = 6 remainder 3). The calculator shows this breakdown automatically.
No. This calculator counts every calendar day in the range. For a count that skips weekends and holidays, use a dedicated business days calculator instead.
It estimates date difference calculator outputs using the visible inputs and formula assumptions on this page.

Explore More in Time & Date