Menu

Date Duration Calculator

Date Duration Calculator: How It Works

Counting the days between two dates is harder than it looks, because months have different lengths, leap years exist, and there are two defensible answers to whether the endpoints count. This calculator handles all three.

Inclusive or exclusive

From 1 March to 5 March is either 4 days or 5, depending on what you are counting.

CountAnswerRight for
Exclusive (difference)4Elapsed time, interest calculation, age
Inclusive (both ends)5Hotel nights, leave requests, event durations

Neither is more correct; they answer different questions. Contracts and payroll rules usually specify which applies, and the difference of one day matters when it decides a deadline or a day's pay. When writing a rule, say 'inclusive of both dates' explicitly.

Working days

Excluding weekends is straightforward arithmetic; excluding holidays is not, because holiday calendars are national, regional and sometimes religious, and they change year to year. Some move with the lunar or ecclesiastical calendar; some are observed on the following Monday when they fall at a weekend.

A calculator can subtract weekends reliably. For a contractual deadline, check the actual holiday calendar of the relevant jurisdiction — 'ten working days' means different dates in different countries, and legal deadlines are unforgiving about it.

Leap years

A year is a leap year if divisible by 4, except centuries, unless divisible by 400. So 1900 was not and 2000 was. Any correct date arithmetic handles this automatically; the rule matters when you are checking a result by hand and wondering whether a February is 28 or 29 days.

Months are not a fixed length

'Three months from 31 January' has no unambiguous answer. Implementations differ: some give 30 April by clamping to the month end, others give 1 May by overflowing. This is why a duration expressed in months and days can differ between tools while the total days elapsed agrees exactly.

For anything where precision matters — interest accrual, notice periods, contractual deadlines — count in days. Months are a human convenience, not a unit.

Time zones and daylight saving

The number of days between two dates is unaffected by time zones, but the number of hours is not. A day containing a daylight saving transition is 23 or 25 hours long. If you need an exact duration in hours across such a boundary, calculate from timestamps rather than multiplying days by 24.

What people use this for

That last case is worth flagging: rolling-window rules such as '90 days in any 180' require counting backwards from each date, not simply summing stays. Getting it wrong has real consequences, so check against the official guidance rather than a general calculator.

Frequently Asked Questions

Should I count both the start and end dates?
It depends on what you are measuring. Elapsed time and interest use the exclusive count; hotel nights, leave and event durations use the inclusive one. Contracts usually specify, and the one-day difference frequently matters.
How are working days calculated?
By excluding weekends, which is reliable arithmetic. Public holidays vary by country and region and change annually, so for a contractual deadline check the relevant jurisdiction's actual calendar.
Why do calculators disagree on months?
Because months have unequal lengths and 'one month from 31 January' has no single answer — some tools clamp to the month end, others overflow into March. Total days elapsed is unambiguous and should always agree.
Are leap years included?
Yes, automatically. The calculation counts actual calendar days, so any 29 February falling between the two dates is included. The rule is divisible by 4, except centuries, unless divisible by 400.
Does daylight saving affect the result?
Not the day count, but it does affect an exact hour count — a day containing a transition is 23 or 25 hours. Calculate from timestamps rather than multiplying days by 24 when hours matter.
Can I use this for visa day counting?
Use it for the arithmetic, but check the official rules. Requirements such as '90 days in any 180' use a rolling window counted backwards from each date, not a simple total, and the consequences of miscounting are serious.

Related Date & Time Tools

Browse all Date & Time tools →