Skip to content

Date Difference Calculator

Days between two dates, with or without weekends.

Calculate the number of days, weeks, months, and years between two dates. Includes a business-days count that excludes weekends.

Written and maintained by Mohit PatelLast checked August 4, 2026How we build these

Contracts and notice periods usually count inclusively; everyday usage does not.

Duration

Calendar breakdown
Business days
Weekend days

Business days exclude Saturdays and Sundays only. Public holidays vary by region, so subtract those yourself.

How the Date Difference Calculator works

Counts the gap between two dates in every useful unit at once, and separately counts business days by excluding Saturdays and Sundays: the figure you need for delivery windows, notice periods, and project deadlines.

Also known as: days between dates · how many days until · date duration calculator · difference between two dates · difference between 2 dates · difference between dates · diff between two dates · two date difference

Inclusive and exclusive counting

The days between 1 March and 5 March is either four or five, depending on whether both endpoints are counted. Both conventions are used and neither is wrong.

Exclusive counting, giving four, is the arithmetic difference and is what most software returns. Inclusive counting, giving five, is what people usually mean when they ask how many days something lasts.

Hotel bookings, hire agreements and event durations frequently use one convention while the customer assumes the other, which is a recurring source of billing disputes.

Working days

Business day calculations exclude weekends and public holidays, and public holidays vary by country, by region and by year.

England and Wales, Scotland and Northern Ireland have different bank holidays. US federal holidays differ from state holidays. Any working-day calculation is only as good as the holiday list behind it.

Contracts frequently specify working days for notice periods and payment terms, and the definition should be in the contract. Where it is not, the local convention applies and the two parties may have different local conventions.

Months, which are not a fixed length

Adding a month to 31 January gives a date that does not exist. Conventions differ: clamp to 28 or 29 February, or roll over to 2 or 3 March.

Most software clamps, which means adding one month twice from 31 January gives 31 March in some implementations and 28 March in others, since the second addition starts from the clamped date.

That non-associativity is genuinely surprising and it is why date arithmetic in software is a well-known source of bugs. For anything contractual, specifying the actual dates rather than a number of months avoids it entirely.

Daylight saving and leap seconds

Days are not all 24 hours long. In territories observing daylight saving, one day a year has 23 hours and one has 25.

Which means a duration in hours across a clock change is not the number of days times 24. Anything scheduling across those dates needs to work in absolute time rather than in local time.

Leap seconds have been inserted into UTC periodically to keep it aligned with the Earth's rotation, and a decision has been taken to discontinue them by 2035. They affect systems requiring sub-second accuracy and nothing else.

Calendar changes in historical dates

The switch from the Julian to the Gregorian calendar happened at different times in different countries. Catholic Europe changed in 1582; Britain and its colonies in 1752, dropping eleven days; Russia not until 1918.

Which means a date before those changes is ambiguous unless the calendar is specified. British historical dates are frequently annotated Old Style or New Style for this reason.

The new year also moved. Until 1752, the legal year in England began on 25 March, so a date in January 1700 by contemporary reckoning is January 1701 by ours. Historical date arithmetic without accounting for this produces confident and wrong answers.

For anything that will be relied on, storing and calculating in UTC and converting to local time only for display avoids most of the traps at once. Time zones move, daylight saving rules change by legislation with limited notice, and a date stored as local time in a database becomes ambiguous the moment either happens. This is why software that gets dates right does the arithmetic in absolute time and treats the calendar as a presentation layer, and why software that does not eventually produces a meeting scheduled an hour out.

Where to go next

The Date Difference question rarely arrives on its own. These are the ones that usually come with it:

Frequently asked questions

Should the end date be included in the count?

By default this calculator counts the gap between the dates, so 1 March to 3 March is 2 days. Contracts and notice periods often count inclusively, making it 3 days. Toggle 'include end date' to switch, and check which convention your situation uses.

How are business days counted?

Every day that is not a Saturday or Sunday within the range. Public holidays are not deducted because they vary by country and region, so subtract them manually for an exact working-day figure.

Why are months and days shown separately?

Because months have unequal lengths, a duration like '90 days' is not cleanly '3 months'. The years-months-days breakdown follows the calendar, while the total-days figure is the exact count.

Does this handle dates before 1970 or far in the future?

Yes. The calculation uses the proleptic Gregorian calendar, so historical and future dates both work. Note that dates before the Gregorian reform of 1582 will not match contemporary historical records.

Related calculators