Date Difference Calculator

Enter two dates to find the exact gap between them, in every unit that might be useful.

Last updated

Count the end date itself?

Leave counts and notice periods usually include both the first and last day.

The result updates as you type. Nothing you enter is saved, sent to a server or shared.

Enter your details above to see the result.

How this calculator works

The number of days between two dates is a simple subtraction, but the answer people want depends on what they are counting. A notice period usually includes both the first and last day. A gap between two events usually does not. The toggle above switches between the two.

Beyond raw days, the calculator expresses the same span in calendar terms — years, months and days — using the same whole-month-first method as the age calculator, so the result is never negative or misleading around month ends.

The weekday count walks through the span day by day and counts everything that is not a Saturday or Sunday. That gives a usable working-day figure for most Indian offices, though it cannot know about public holidays, which vary by state, or organisations that work six days a week.

All arithmetic uses UTC-normalised dates, so the answer does not shift because of timezone or daylight-saving boundaries.

The formula

Days between dates

days = (later date − earlier date) ÷ 86,400,000 milliseconds

Both dates are first normalised to UTC midnight, which removes any timezone offset from the subtraction.

Calendar difference

Count whole months first, then measure the remaining days from the anchor date.

Worked example: 1 January 2026 to 31 January 2026

Counting the gap across January 2026.

Step-by-step calculation for the worked example
From1 January 2026
To31 January 2026
Days between (excluding the end date)30
Days including both dates31
Weeks and days4 weeks 2 days
Weekdays, counting both dates22
Weekend days9

Whether the answer is 30 or 31 depends entirely on whether the end date counts. For notice periods, leave applications and rental agreements, it usually does — check the wording of the document.

Things worth knowing

  • Public holidays are not deducted. India’s holiday calendar varies by state and by organisation, so a working-day figure that ignores them is a starting point rather than a final answer.
  • Many Indian workplaces operate a six-day week or alternate Saturdays. Adjust the weekday figure accordingly.
  • Notice periods, rent agreements and loan tenures usually count both the start and end date. Read the exact wording before relying on a figure.
  • For interest calculations, the day-count convention in the agreement matters — some use actual days, others assume a 360-day year.

Frequently asked questions

Should I include the end date?
It depends on what you are counting. For a notice period, a leave application or a tenancy, both the first and last day normally count, so include it. For the gap between two events — days until an exam, for instance — you usually do not. The document or notification generally says which.
Does this exclude public holidays?
No. It excludes only Saturdays and Sundays. India’s public holidays differ by state and by employer, and many are restricted holidays that individuals choose. Subtract the holidays that apply to you from the weekday figure.
Why does the calendar difference not match days ÷ 30?
Because months are not thirty days long. Dividing by 30 gives a rough approximation; counting actual calendar months gives the answer people mean when they say "two months and five days".

Sources

Every figure on this page is traceable to the official source below. If a source has changed since the date shown, please tell us and we will correct it.