hasibai

Date & time

Days between dates calculator

Count the gap between two dates in every unit that matters, including working days. The one decision that changes the answer is whether the end day itself counts.

Hotels and interest count nights. Holiday entitlement and court deadlines usually count both ends.

Optional. Comma-separated dates in YYYY-MM-DD form.

Duration
Choose two dates to see the gap.

The inclusive-count problem

Ask two people how many days there are from Monday to Friday and you will get two answers. One says four, counting the nights. The other says five, counting the days you are present. Both are right for their purpose, and neither is right for the other’s.

The rule of thumb: if you are counting elapsed time — interest accruing, a hotel bill, a subscription — count the nights, because nothing happens on the morning you leave. If you are counting occupied days — annual leave, a prison sentence, a conference — count both ends, because you are there on both.

Nights = end − start    Inclusive days = end − start + 1

Legal deadlines vary by jurisdiction and are worth checking rather than assuming. Many systems exclude the day the clock starts and include the day it ends, and several push a deadline landing on a weekend or holiday to the next working day.

Why months are not a fixed unit

A month is anywhere from 28 to 31 days, so “three months” is not a fixed number of days. This calculator counts whole calendar months first and reports the leftover days separately, which matches how people describe durations: a baby is “four months and two weeks”, not “138 days”.

End-of-month dates create a genuine ambiguity. What is one month after 31 January? There is no 31 February, so the answer is clamped to the 28th or 29th. That means the operation is not reversible: 31 January plus one month is 28 February, but 28 February minus one month is 28 January.

Working days and the holiday problem

Business-day counts drive delivery estimates, payment terms and statutory deadlines. Weekends are easy to exclude because they follow a fixed pattern. Public holidays are not, since they differ by country, by region within a country, and by year.

Rather than guess your jurisdiction, this calculator lets you paste in the holidays that apply to you. Any weekday you list is removed from the working-day count. Holidays falling on a weekend are already excluded and are not double-counted.

Leap years, quietly

A year is 365.2422 days, so the calendar adds a day every four years, skips that addition in century years, then restores it every fourth century. 1900 was not a leap year; 2000 was. Any range crossing 29 February picks up the extra day automatically here, because the count works from real calendar dates rather than multiplying years by 365.

Common questions

Should I include the end date or not?

Include it when you are counting days you occupy or are present for, such as annual leave or a hotel stay measured in days rather than nights. Exclude it when measuring elapsed time, such as interest, notice periods counted in clear days, or age. If a contract or court rule governs the count, follow its wording rather than a general convention.

How many working days are in a year?

Roughly 260 in a non-leap year with a Monday-to-Friday week, before public holidays. Subtracting eight to twelve public holidays, which is typical across most countries, leaves about 248 to 252. The exact figure moves each year depending on which day 1 January falls on.

Why does the month count sometimes look off by one?

Whole months are counted only when the same day of the month has been reached. From 15 January to 14 February is zero whole months and 30 days, not one month, because the 15th has not come round again. Once the anniversary day passes, the month count ticks over.

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

Yes. The calculation works from calendar components rather than a timestamp, so historical dates and dates centuries ahead both count correctly under the current Gregorian rules. Dates before the Gregorian reform of 1582 are extrapolated backwards rather than reflecting the Julian calendar actually in use at the time.