Skip to content
Calculates

Date Difference Calculator

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

Calculated & verified for mathematical accuracy·Reviewed by the Calculates Editorial Team

Two dates

Either date can go in either field.

Past or future — the order does not affect the result.

Days between

30

0y 1m 0d from 25 September 2026 to 25 October 2026.

Years, months, days
0y 1m 0d
Total weeks
4
Total months
1
Total hours
720

Day types (both dates included)

Weekdays (Mon–Fri)
21
Weekend days
10
Days covered
31

Public holidays are not deducted — only Saturdays and Sundays are removed.

Weekdays of each date

25 September 2026
Friday
25 October 2026
Sunday

The headline figure is elapsed days, so the same date twice gives zero. The day-type panel is inclusive of both endpoints, which is why it always totals one more.

About this calculator

Two dates can be separated in more than one way, and which figure you want depends on what you are planning. This calculator reports the calendar breakdown in years, months and days, the same span converted into total days, weeks, months and hours, and a working-day count that strips out Saturdays and Sundays. It also names the weekday each date falls on, and the order you enter them in makes no difference to the answer.

How to use this calculator

  1. Set the first date

    Either date can go in either field. The calculator sorts them internally and always measures from the earlier one, so there is no wrong way round.

  2. Set the second date

    Past and future dates both work. If you enter the later date first, the result is unchanged and a note simply points out that the order was swapped.

  3. Read the calendar breakdown

    The headline figure counts real months rather than averaged ones, so a span that crosses February is measured against February’s actual length.

  4. Check the working-day count if you are planning

    The weekday and weekend figures count both endpoints, which is the convention project schedules and leave requests normally use. Public holidays are not deducted.

Formula

Elapsed span (exclusive, both figures from the same interval): total days = (later - earlier) / 86,400,000 ms total weeks = total days / 7, rounded down total hours = total days x 24 Calendar breakdown: advance whole months from the earlier date until one more month would overshoot, then count leftover days Day-type counts (inclusive of both endpoints): inclusive days = total days + 1 weekdays = inclusive days falling Mon-Fri weekend days = inclusive days - weekdays
  • The elapsed totals are exclusive: a date compared against itself gives zero days, because no time has passed between a moment and itself.
  • The weekday and weekend figures are inclusive and therefore always sum to one more than the total-day figure. A single Saturday counts as one weekend day even though the elapsed span is zero.
  • Months are advanced against the real calendar. A 31st that lands in a 30-day month clamps to the 30th rather than spilling forward, which keeps the day component from ever going negative.
  • Leap days inside the range are counted automatically, including the century rule: 1900 was not a leap year but 2000 was, because only centuries divisible by 400 qualify.
  • Everything is evaluated in UTC on whole calendar dates, so the result never shifts by a day depending on where the page is loaded or whether daylight saving is in effect.
  • Public holidays, company shutdowns and regional non-working days are not subtracted from the weekday count. Only Saturdays and Sundays are removed.

Worked example

Inputs

  • First date: 1 January 2024
  • Second date: 31 December 2024

Calculation

Elapsed span: 2024 is a leap year with 366 days, and 31 Dec is the 366th, so 365 days have elapsed since 1 Jan. total days = 365 total weeks = 365 / 7 = 52 whole weeks total hours = 365 x 24 = 8,760 Calendar breakdown = 11 months, 30 days Day types across the inclusive range of 366 days: weekdays = 262 weekend days = 104 262 + 104 = 366

From 1 January to 31 December 2024 is 365 elapsed days, or 11 months and 30 days on the calendar. The inclusive range covers 366 days, of which 262 are weekdays and 104 fall at weekends. The first date is a Monday and the second is a Tuesday.

What the result means

  • The years-months-days breakdown is how people describe a span in conversation. It is the same interval as the day total, expressed against the calendar rather than as a running count.
  • Total days, weeks, months and hours are four views of one span. Each converts the whole interval into a single unit, so they are alternatives to one another rather than parts to be summed.
  • The weekday count is a planning figure: it tells you how many Monday-to-Friday days a period covers, before any public holidays or personal leave are taken out.
  • The weekday names of the two endpoints are frequently the practical detail that matters, since a deadline landing on a Saturday usually needs moving before anything else is decided.
  • Enter a contract start and end date to see how many working days it covers, then subtract your own public holiday list from the weekday figure.
  • Compare a target date against today to build a countdown in days, weeks or hours for a launch, exam or trip.
  • Use the age calculator instead when one of the dates is a date of birth, since it adds the next-birthday countdown and the weekday of birth.

Frequently asked questions

How many days are there between two dates?

Subtract the earlier date from the later one and divide by the number of milliseconds in a day. That gives the elapsed count, which treats a date compared with itself as zero. If you need the number of days a period covers rather than the gap between its edges, add one to include both endpoints, which is what the inclusive figure shown here does.

Should I count both the start and end date?

It depends entirely on the convention you are working to. Hotel stays and rental periods usually count nights, which is the exclusive figure. Notice periods, project schedules and leave requests usually count days worked or days occupied, which is the inclusive figure. This calculator shows both so you do not have to guess which one a particular document means.

Does the order of the two dates matter?

No. The calculator sorts the two dates before measuring, so entering them the wrong way round produces exactly the same numbers rather than a negative result. A note appears to confirm the order was swapped, and the weekday labels always refer to the genuinely earlier and later dates rather than to the order you happened to type them in.

How are working days counted?

Every day in the inclusive range is examined and those falling on a Saturday or Sunday are set aside, leaving the Monday-to-Friday total. Across the whole of 2024 that gives 262 weekdays and 104 weekend days, summing to the 366 days of that leap year. Public holidays are not deducted, because they vary by country, region and sometimes by employer.

Why does the month figure not match total days divided by thirty?

Because no month actually has thirty days as a rule: they run from 28 to 31, and February gains a day in leap years. Dividing a day total by thirty or by the average of 30.44 produces a figure that drifts steadily as the span grows. The breakdown here advances real calendar months one at a time, so it matches how a person would count on a wall calendar.

How does the calculator handle leap years?

Leap days inside the range are counted as ordinary days, so any span crossing a 29 February is one day longer than the equivalent span in a common year. The Gregorian century rule is applied correctly too: a year divisible by 100 is not a leap year unless it is also divisible by 400, which is why 1900 had 365 days while 2000 had 366.

Can I measure a span between two future dates?

Yes. Nothing in the calculation refers to the current date, so any two valid calendar dates work, whether both are in the past, both in the future, or one on each side of today. This makes it equally suitable for working out how long ago something happened and for planning the gap between two scheduled events.

Why is the weekday total one more than I expected?

The day-type counts are inclusive, meaning both the first and last dates are counted. A Monday-to-Friday range therefore reports five weekdays even though only four days have elapsed between the two endpoints. If you want the exclusive figure, take the elapsed total-days number instead, which sits in the panel above the day-type breakdown.

Browse all date & time calculators or see the full list of calculators.